# 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`](create-client-token.md). 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](../objects.md#searchrequest), as JSON. ```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`](../objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](../objects.md#warning), empty when there is nothing to say. `data` is a [MapAnswer](../objects.md#mapanswer). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](../../errors/client_id_must_be_opaque.md), [`shape_invalid`](../../errors/shape_invalid.md), [`shape_too_large`](../../errors/shape_too_large.md), [`validation_failed`](../../errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](../../errors/client_token_account_mismatch.md), [`client_token_expired`](../../errors/client_token_expired.md), [`client_token_invalid`](../../errors/client_token_invalid.md), [`client_token_required`](../../errors/client_token_required.md), [`invalid_api_key`](../../errors/invalid_api_key.md), [`key_revoked`](../../errors/key_revoked.md), [`missing_api_key`](../../errors/missing_api_key.md) | | 403 | [`account_pending`](../../errors/account_pending.md), [`account_suspended`](../../errors/account_suspended.md), [`origin_not_allowed`](../../errors/origin_not_allowed.md), [`secret_key_in_browser`](../../errors/secret_key_in_browser.md), [`tier_insufficient`](../../errors/tier_insufficient.md) | | 404 | [`not_found`](../../errors/not_found.md) | | 429 | [`rate_limited`](../../errors/rate_limited.md) | | 500 | [`data_stale`](../../errors/data_stale.md), [`internal_error`](../../errors/internal_error.md), [`temporarily_unavailable`](../../errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](../../concepts/responses-and-errors.md)). ## 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: ```json { "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): ```json { "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._