POST /v1/listings/map
Pins and clusters for a map, with the filters as a JSON body.
| Access | |
|---|---|
| Keys | publishable or secret |
| Plan | every plan |
| Environment | live and sandbox |
| Acts for | the account |
| While the account is suspended | refused |
| During a data stop | refused |
Headers
| Name | Description |
|---|---|
X-Client-Token |
Optional, with a publishable key: a token your server minted for a consumer with POST /v1/client-tokens. With it, each listing says whether it is a favorite of theirs (isFavorite). |
X-Client-Id |
Optional, with a secret key: your own opaque ID for a consumer, to the same end. |
Body
A SearchRequest, as JSON.
{
"status": [
"active"
],
"location": {
"bbox": [
-75.42,
40,
-75.3,
40.08
]
}
}
Answers
200: Pins, or clusters when more than 500 listings match
The answer is { data, meta, compliance, warnings }: meta holds requestId, environment and dataLastUpdatedAt; compliance is the block of notices to show; warnings is a list of Warning, empty when there is nothing to say.
data is a MapAnswer.
Errors
Every error has the same body, and says how to fix it (responses and errors).
More
The same filters as the search (paging and sort keys are ignored), for a map. GET takes them
as query keys, POST as the JSON body of the search schema, so a drawn location.shape
(Premium) can drive the map; for the same query the two answer exactly alike. With 500 or
fewer matching located listings:
{ "data": { "total": 3, "pins": [ { "listingKey": "…", "lat": 40.01, "lng": -75.3, "price": 400000, "status": "active" } ], "clusters": [] } }
Above 500, clusters on a world-aligned grid (a power-of-two fraction of a degree, at most 16
cells across the request's bbox; without one, across the shape's bounding box when the
request has a drawn or saved shape, else across the whole region):
{ "data": { "total": 600, "pins": [], "clusters": [ { "lat": 40.4, "lng": -75.8, "count": 37, "bbox": [-75.81, 40.39, -75.79, 40.41] } ], "gridCellDegrees": 0.0220 } }
Only listings with a shown address and a point inside the seven jurisdictions appear or are
counted. A hidden price is a null pin price. Zoom in (a smaller bbox) to turn clusters into
pins.
This page is made from the route's own declaration by npm run openapi. To change it, change the declaration or its explanation, never this file.