A listing's photos
https://idx.ruuster.com/v1/listings/{listingId}/photospublishable or secret key · 1 unit · cached 900 s
Get every photo of one listing, in gallery order, with sizes and alt text.
Every photo of one listing, in the board's order, each with its url, width, height, order
and alt text. Use it for a lightbox or a gallery you load after the page, when you don't need the
rest of the listing.
What to know
limitcaps the number of photos, up to 100.- Use the
alttext as it comes. It never contains a hidden street address. photoAttrsfrom@ruuster/idxbuilds the<img>attributes, with asrcsetfor photos onphotos.ruuster.com. Photos: sizes, alt text and loading.- A removed listing answers 410 here too.
- With photo ids turned on for your account, each photo also has a stable
idandsizes. With MLS captions turned on as well, it has the board's owncaptionandroomwhere the board sends them. With customer fields turned on,customholds your own photo fields. Building on our data.
Path parameters
| Name | Type | Description |
|---|---|---|
listingId |
uuid | The listing's id (a uuid), as id on every listing the API returns. An MLS number is not an id: find it with /v1/suggest groups=listing. |
Query parameters
| Name | Type | Description |
|---|---|---|
limit |
integer 1 to 100, default 100 | At most this many photos (1 to 100). |
format |
enum, default json | json = the public API shapes; widget = the shapes the Ruuster widget reads (for the widget and its adapters). Values: json, widget. |
Response
The answer is { ok: true, data, meta }. These are the fields of data; meta carries brokerageId, freshness.asOf, mls (each board's display rules) and canonical.
| Field | Type | Description |
|---|---|---|
photos |
array of object | Photos in order (the first limit). |
photos[].url |
string | https URL of the photo. |
photos[].width |
integer or null | Pixels, when known. |
photos[].height |
integer or null | Pixels, when known. |
photos[].order |
integer | 0-based position. |
photos[].alt |
string | Alt text (never the street when the address is hidden). |
photos[].id |
string | A stable id for this photo (the same whichever host serves it). Store your own fields against it. Present only where the account has photo ids turned on. |
photos[].sizes |
array of object | The photo at 480, 800 and 1200 pixels wide (on the photo CDN only; empty elsewhere). Present only with photo ids. |
photos[].sizes[].width |
integer | Pixels wide. |
photos[].sizes[].url |
string | https URL of this size. |
photos[].caption |
string or null | The MLS's own caption for the photo, passed through as plain text; null when the MLS sent none. Present only with photo captions. |
photos[].room |
string or null | The MLS's own room name for the photo; null when the MLS sent none. Present only with photo captions. |
photoCount |
integer | How many photos the listing has. |
custom |
object | Your account's own fields on this listing and its photos (set by your enrichment hook). Only your account sees them. Present only where custom fields are turned on and you have values. |
custom.listing |
array of object | Your fields on this listing, by key. |
custom.listing[].key |
string | Your field's key. |
custom.listing[].value |
string or number or boolean | The value, of the field's own type (text is plain text within its length). |
custom.photos |
array of object | Your fields on this listing's photos, by photo id and key. |
custom.photos[].photoId |
string | The photo's id (photos[].id). |
custom.photos[].key |
string | Your field's key. |
custom.photos[].value |
string or number or boolean | The value, of the field's own type (text is plain text within its length). |
Errors
These are the error codes this endpoint can answer. Every error has the same body; Errors explains each code and what to show.
invalid_parameter, secret_key_in_url, invalid_credentials, missing_credentials, payment_required, access_revoked, brokerage_not_enabled, origin_not_allowed, origin_required, secret_key_in_browser, mls_not_in_scope, not_found, listing_removed, daily_quota_exceeded, rate_limited, internal_error, api_paused, source_unavailable