================================================================================ PAGE: apidata.one API documentation URL: https://docs.apidata.one/ ================================================================================ # apidata.one API documentation Real-estate listing data for Bright MLS's region (DE, MD, NJ, PA, VA, WV and DC), for the websites of Bright's member brokers and agents. Base URL for every call: `https://api.apidata.one/v1`. One host serves both environments; **the key prefix picks the environment** (`_test_` for the sandbox, `_live_` for real data), never the URL. Start with the [quickstart](https://docs.apidata.one/quickstart.md): ten minutes with a sandbox key, which you get by signing up in the [portal](https://app.apidata.one). Building with an AI tool? Give it [the prompt and the files made for it](https://docs.apidata.one/guides/building-with-ai.md). ## Concepts - [Authentication: keys, client tokens, client IDs, browsers](https://docs.apidata.one/concepts/authentication.md) - [Responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md) - [Rate limits](https://docs.apidata.one/concepts/rate-limits.md) - [Plans: Basic and Premium](https://docs.apidata.one/concepts/plans.md): what Premium adds, and which plan a request gets - [Places](https://docs.apidata.one/concepts/places.md) - [Hidden addresses](https://docs.apidata.one/concepts/hidden-addresses.md) - [Drawn shapes](https://docs.apidata.one/concepts/shapes.md) (Premium) - [Idempotency](https://docs.apidata.one/concepts/idempotency.md) - [Webhooks and notices](https://docs.apidata.one/concepts/webhooks.md): the seven notice types, receiving and verifying a webhook ## Guides - [The sandbox](https://docs.apidata.one/guides/sandbox.md): the made-up world behind test keys, its listings that never change, and going live by swapping the key - [Building with AI](https://docs.apidata.one/guides/building-with-ai.md): a prompt to paste into your AI tool, the files to hand it, and the patterns it should write - [Map search](https://docs.apidata.one/guides/map-search.md): pins, clusters and a list that follow the same filters - [Autocomplete](https://docs.apidata.one/guides/autocomplete.md): a search box that completes, and what to do with each suggestion - [Saved searches and alerts](https://docs.apidata.one/guides/saved-searches-and-alerts.md): from a visitor's saved search to the email your site sends - [Webhooks, step by step](https://docs.apidata.one/guides/webhooks.md): write the endpoint, register it, store its secret, act on each notice - [Alert emails](https://docs.apidata.one/guides/alert-emails.md): what an email with listing content must carry - [Compliance](https://docs.apidata.one/guides/compliance.md): what every page with a listing must show, and where each text comes from - [An SEO-friendly site](https://docs.apidata.one/guides/seo.md): pages built on your server, one address a listing, a sitemap, prompt removal - [Going live](https://docs.apidata.one/guides/going-live.md): who can, what you are asked for, live keys, billing in short ## Reference - [Every endpoint](https://docs.apidata.one/reference.md), one page each: who may call it, what it takes, what it answers field by field, and the errors it can answer - [Every object](https://docs.apidata.one/reference/objects.md), field by field - [The OpenAPI 3.1 document](https://docs.apidata.one/openapi.json): the same, for tools Pages about a whole area: [listings](https://docs.apidata.one/reference/listings.md), [favorites](https://docs.apidata.one/reference/favorites.md), [saved searches](https://docs.apidata.one/reference/saved-searches.md), [saved shapes](https://docs.apidata.one/reference/saved-shapes.md), [webhook endpoints](https://docs.apidata.one/reference/webhook-endpoints.md), [compliance](https://docs.apidata.one/reference/compliance.md) and [sandbox triggers](https://docs.apidata.one/reference/sandbox-triggers.md). Premium: place outlines, school districts, drawn and saved shapes. A key on a Basic account gets [`403 tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) for them, never a partial answer. Alerts: every tier has saved searches, favorites' change notices, webhooks and the events list. The API records thin notices and your site sends its own emails. A saved search whose criteria need Premium reads `paused_tier` on a Basic account. ## Errors One page per code, under [errors/](https://docs.apidata.one/errors). Every error response links to its page in `docs`. ## Changes The [changelog](https://docs.apidata.one/changelog.md) lists what changed in each version. ================================================================================ PAGE: Changelog URL: https://docs.apidata.one/changelog/ ================================================================================ # Changelog What changed in the API and its docs, newest first. Within `/v1`, changes only add: a new endpoint, a new field, a new value where a list of values is open. A field or an endpoint that will go away is announced here first, and answers carry `Deprecation` and `Sunset` headers before it does. [`GET /v1/status`](https://docs.apidata.one/reference/endpoints/get-status.md) reports the version that is running. Write code that ignores a field it does not know, and that treats an error `code` it does not know by its HTTP status. ## 0.9.0 **New** - **The developer portal,** at [app.apidata.one](https://app.apidata.one): sign up and get a sandbox account with a test key pair at once; make and revoke keys; keep your website addresses; see each key's usage; ask to go live; manage billing. Keys are made in the portal from now on ([going live](https://docs.apidata.one/guides/going-live.md)). - **`GET /v1/listings/keys`:** every listing the API serves, by key, with the time it last changed, for building a sitemap. Secret keys only, with a rate limit of its own ([reference](https://docs.apidata.one/reference/endpoints/list-listing-keys.md)). - **Usage by key and day:** every answered request is counted against its key, and a `429` as a rate-limit hit. The portal shows 90 days, by UTC day, beside each key's limits. Usage is shown, never billed. - **A secret key seen in a browser is reported to you.** The request is still refused with [`403 secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) and the key flagged; now the account's Owners also get one email about it. - **An OpenAPI 3.1 document** at [`/openapi.json`](https://docs.apidata.one/openapi.json), a reference page for each endpoint made from it, and the docs as text for AI tools ([`llms.txt`](https://docs.apidata.one/llms.txt), [`llms-full.txt`](https://docs.apidata.one/llms-full.txt), every page also as `.md`). - **New guides:** [map search](https://docs.apidata.one/guides/map-search.md), [autocomplete](https://docs.apidata.one/guides/autocomplete.md), [saved searches and alerts](https://docs.apidata.one/guides/saved-searches-and-alerts.md), [webhooks, step by step](https://docs.apidata.one/guides/webhooks.md), [going live](https://docs.apidata.one/guides/going-live.md), [compliance](https://docs.apidata.one/guides/compliance.md), [an SEO-friendly site](https://docs.apidata.one/guides/seo.md) and [building with AI](https://docs.apidata.one/guides/building-with-ai.md). - **A sample site,** at [demo.apidata.one](https://demo.apidata.one): a small search site built on the server with a test key, with a map, saved listings, a sitemap, and every disclosure where the rules put it. Its source is published with the launch. **Changed** - **The sandbox's removal notices.** `listing.removed` now reaches a sandbox account only while it is looking: it has a webhook endpoint, it read `GET /v1/events` in the last 30 days, or its own trigger asked for the removal ([the sandbox](https://docs.apidata.one/guides/sandbox.md#removal-notices-in-the-sandbox)). Live is unchanged: every account gets every removal. - **Every `429` is counted as a rate-limit hit** for its key, whichever limit refused it. ## 0.8.0 **Changed** - **The API never answers `502`, `503` or `504` itself.** `temporarily_unavailable` and `data_stale` are sent as `500`, with their JSON body and `Retry-After`: tell them from `internal_error` by `error.code`. An HTML page with one of those three statuses comes from the hosting platform ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). - **`sort=newest` orders by a listing's latest status change,** every status in one timeline ([listings](https://docs.apidata.one/reference/endpoints/search-listings.md#newest-first)). Cursors made before the change are refused with `400 validation_failed` on `cursor`: start again from the first page. - **A request path the server can't read** (a broken percent-escape, or a part over 100 characters) answers `400 validation_failed` with `fields[0].path` of `path`. - **`500 temporarily_unavailable`** also covers a database that could not be reached before the request began. Repeating the request is safe. - **The visitor's address for rate limits** is the one our own front door reports. A forwarding header you send, such as `X-Forwarded-For`, is never used. ## Earlier Versions 0.1 to 0.7 were built before the API was open to anyone outside. These docs describe the API as it is now. ================================================================================ PAGE: Quickstart URL: https://docs.apidata.one/quickstart/ ================================================================================ # Quickstart Ten minutes with a sandbox key. The [sandbox](https://docs.apidata.one/guides/sandbox.md) is a made-up world that answers exactly like live, so everything below works unchanged on live once you swap the keys. **Get your keys:** sign up in the [portal](https://app.apidata.one) with your email address. Your sandbox account is ready at once, with a test key pair: `sk_test_…` for your server and `pk_test_…` for the browser. Each key is shown once, so copy it then; a key you lose is revoked and replaced on the account's keys page. Every call goes to `https://api.apidata.one/v1` with `Authorization: Bearer `. ```bash export SK_TEST="sk_test_…" # your secret test key: on your server only, never in a page ``` ## 1. Search ```bash curl -H "Authorization: Bearer $SK_TEST" "https://api.apidata.one/v1/listings?status=active&price.max=500000&limit=3" ``` The answer holds `data` (the listings), `meta` (paging and `dataLastUpdatedAt`) and `compliance` (the notices your pages must show). See [listings](https://docs.apidata.one/reference/listings.md). ## 2. One listing ```bash curl -H "Authorization: Bearer $SK_TEST" "https://api.apidata.one/v1/listings/SBX900000009" ``` `SBX900000009` is one of the sandbox's [listings that never change](https://docs.apidata.one/guides/sandbox.md#listings-that-never-change): it always has 150 photos. Try `SBX900000001` to see how a hidden address looks. ## 3. A consumer's favorite Your server speaks for one of your site's users with `X-Client-Id`, an ID of your own for that user (never an email address): ```bash curl -X POST -H "Authorization: Bearer $SK_TEST" -H "X-Client-Id: user-42" -H "Content-Type: application/json" \ -d '{"listingKey":"SBX900000009"}' "https://api.apidata.one/v1/favorites" ``` In the browser, use the `pk_test_…` key with a [client token](https://docs.apidata.one/reference/endpoints/create-client-token.md) instead. See [authentication](https://docs.apidata.one/concepts/authentication.md). ## 4. A saved search, and an alert on demand ```bash curl -X POST -H "Authorization: Bearer $SK_TEST" -H "X-Client-Id: user-42" -H "Content-Type: application/json" \ -d '{"criteria":{"status":["active"],"price":{"max":500000}},"alertFrequency":"instant"}' \ "https://api.apidata.one/v1/saved-searches" ``` The sandbox changes by itself every 5 minutes, so this search will alert before long. To see it now, send a [sandbox trigger](https://docs.apidata.one/reference/sandbox-triggers.md) with the `id` you just got: ```bash curl -X POST -H "Authorization: Bearer $SK_TEST" -H "X-Client-Id: user-42" -H "Content-Type: application/json" \ -d '{"event":"saved_search.matches","savedSearchId":""}' "https://api.apidata.one/v1/sandbox/triggers" ``` ## 5. Read the notice ```bash curl -H "Authorization: Bearer $SK_TEST" "https://api.apidata.one/v1/events" ``` Within about 10 seconds the list holds a `saved_search.matches` notice naming the new listing. **While you build on your own computer, this list is how you get notices.** Read it every minute: it carries everything a webhook would, `listing.removed` among them, and it needs nothing from your side but the secret key. A webhook endpoint needs a public `https` address, which a site on `localhost` does not have. Once your site is deployed, register a [webhook endpoint](https://docs.apidata.one/reference/webhook-endpoints.md) to get the same notices within seconds ([webhooks, step by step](https://docs.apidata.one/guides/webhooks.md)), and keep reading the list as the way to catch up after an outage. apidata.one never emails your visitors: your site sends its own ([saved searches and alerts](https://docs.apidata.one/guides/saved-searches-and-alerts.md)). ## Where next - [Building with AI](https://docs.apidata.one/guides/building-with-ai.md): a prompt to paste into your AI tool, and the patterns it should write. - [Map search](https://docs.apidata.one/guides/map-search.md) and [autocomplete](https://docs.apidata.one/guides/autocomplete.md). - [Compliance](https://docs.apidata.one/guides/compliance.md): what every page with a listing must show. - [An SEO-friendly site](https://docs.apidata.one/guides/seo.md): pages built on your server, a sitemap, prompt removal. ## Going live Swap the `_test_` keys for `_live_` keys. Nothing else changes. [Going live](https://docs.apidata.one/guides/going-live.md) says how an account gets its live keys. ================================================================================ PAGE: The sandbox URL: https://docs.apidata.one/guides/sandbox/ ================================================================================ # The sandbox The sandbox is a made-up world for building and testing your site. It answers exactly like the live API (the same endpoints, the same shapes, the same errors), and you reach it with a test key: `pk_test_…` in the browser and `sk_test_…` on your server. Nothing in it is a real listing, and nothing you do in it touches live data. **Going live is changing the key.** Swap `_test_` keys for `_live_` keys and nothing else: the host and every path stay the same. Place IDs you found in the sandbox are the same places on live. ## What is in it - **About 20,000 listings** across the whole region (Pennsylvania, New Jersey, Delaware, Maryland, Washington DC, Virginia and West Virginia), in every county and at every status: Active, Coming Soon, Active Under Contract, Pending and Closed. Every property class and every structure type appears. - **Real places, made-up homes.** Towns, counties, ZIP codes and school districts are the real public ones, with the same place IDs as live. Streets, people, offices and schools are invented: an office is always called "Sandbox …", phone numbers are 555 numbers, emails end in `example.com`, and tour and video links point at `https://example.com/…`. - **Keys you can tell apart.** A sandbox listing key starts with `SBX` and so does its MLS number. Treat a listing key as text in both environments: live keys are digits, sandbox keys are not. - **Photos are drawings.** Each photo is a simple drawing marked SANDBOX, in the same five sizes as live photos, so your layout can be tested without real pictures. - **Features, rooms, open houses, price history**: all there, as on live. Two things the sandbox does not have: postal-city and subdivision places (search by city name, ZIP code, county or municipality instead), and, for a listing whose address is hidden in Pennsylvania or New Jersey, the match by municipality that live also makes. A hidden-address listing in the sandbox is found by its state, county, ZIP code and school district. ## Listings that never change These listings have fixed keys and always show the same thing, so you can build a test around each one. The sandbox's own changes and your triggers never touch them. | Key | What it is | What it shows | | --- | --- | --- | | `SBX900000001` | Hidden address | The address, the coordinates and the parcel are null; it is found by state, county and ZIP, never on a map. | | `SBX900000002` | Hidden address inside a community and a school district | As the hidden address above, and still found by its school district and its community. | | `SBX900000003` | Coming Soon with no photos | No photos, no days on market, no price history and no tour, with the date it is expected on the market. | | `SBX900000004` | Closed with a sale | The sale price, the sale date and the selling office and agent. | | `SBX900000005` | A town in two counties (first county) | The same town name as the next case, in another county. | | `SBX900000006` | A town in two counties (second county) | The same town name as the case before, in another county. | | `SBX900000007` | No list price | The list price is null. | | `SBX900000008` | Price may not be shown | Every price field is null because the listing does not allow prices to be displayed. | | `SBX900000009` | A very large gallery | 150 photos. | | `SBX900000010` | Open house in person | An upcoming open house held in person. | | `SBX900000011` | Open house by video | An upcoming open house held by live video, with its link. | | `SBX900000012` | Open house in person and by video | An upcoming open house held both ways, with its link. | | `SBX900000013` | Open house that has ended | Its open house was yesterday, so the open-house list is empty. | | `SBX900000014` | Rooms | A room list with sizes, levels and features. | | `SBX900000015` | Back on market | Went under contract and came back; the price history shows each price it had. | | `SBX900000016` | A past MLS number | Listed before under another MLS number, and found by either one. | | `SBX900000017` | The lowest sale price | A list price of $1,000, the lowest of any listing for sale. A lease's monthly rent can be lower. | | `SBX900000018` | The highest price | A list price of $45,000,000. | | `SBX900000019` | No bedrooms | A studio: zero bedrooms. | | `SBX900000020` | Many bedrooms | Fourteen bedrooms. | | `SBX900000021` | The oldest year built | Built in 1720. | | `SBX900000022` | The newest year built | New construction, built this year. | | `SBX900000023` | Remarks in other scripts | Remarks in Cyrillic, Japanese, Arabic, Greek and Hebrew, returned whole. | | `SBX900000024` | No attribution | Stored without a listing office name, so it is never served: 404 by key and in no search. | | `SBX900000025` | Withheld | Stored, then withheld by a record we could not read, so it is never served: 404 by key and in no search. | | `SBX900000026` | No coordinates | No point: found by its town, county and ZIP names, and absent from every map search. | | `SBX900000027` | Photos hidden off market | Closed, with the off-market photo hide: of its photos only the two chosen ones remain, and no tour. | | `SBX900000028` | Tour and video links | A 3D tour link and a video link beside the gallery. | | `SBX900000029` | Land | Land: bedrooms, baths and living area are null. | | `SBX900000030` | Days on site may not be shown | Days on market and the dates it is counted from are null because the listing does not allow them to be displayed. | `SBX900000001` lies in Baltimore City, Maryland (ZIP 21207). `SBX900000002` lies in Frederick County, Maryland (ZIP 21703), in the Frederick County Public Schools district; its community is "Sandbox Hollow Commons", so `location.subdivisions=Sandbox Hollow Commons|MD` finds it. `SBX900000005` and `SBX900000006` are both in Telford, Pennsylvania, one in Bucks County and one in Montgomery County. Open-house dates and the Coming Soon date of these listings are moved forward once a day, so an upcoming open house is always upcoming. Nothing else about them changes. ## The sandbox changes by itself Every 5 minutes a few listings change, the way live data does: prices move, listings go under contract, close, or come back on the market, a photo or an open house is added, new listings arrive, and once an hour a couple are removed. Within any hour every kind of change happens. So your saved searches and favorites produce real notices in the sandbox without you doing anything: instant alerts follow each round of changes, and daily and weekly digests go out at 07:00 New York time, as on live. `meta.dataLastUpdatedAt` is the time of the last round. The 12-hour stop of live data never applies to the sandbox. ## Removal notices in the sandbox On live, every account gets a `listing.removed` notice for every removed listing. The sandbox is shared by everyone who signs up, so there it goes only to the accounts that are looking. A sandbox account gets `listing.removed` for a removal when one of these holds: - it has a webhook endpoint (any endpoint, whatever events it subscribes to); - it read its [events list](https://docs.apidata.one/reference/endpoints/list-events.md) (`GET /v1/events`) in the last 30 days; - its own [trigger](https://docs.apidata.one/reference/sandbox-triggers.md) asked for that removal. A sandbox account that has not read its events for 30 days, and has no endpoint, gets no removal notices until it reads them again. From then on it gets them as before, but not the ones it missed: when you come back to the sandbox after a while, check the listings you stored against the list of listing keys and delete the ones that are gone. `favorite.listing_removed` is not affected: a consumer who saved a listing is always told when it is removed, in the sandbox as on live. ## Making something happen now To test one case without waiting, send a [sandbox trigger](https://docs.apidata.one/reference/sandbox-triggers.md): a new listing that matches one of your saved searches, a change to one of your favorites, or the removal of a listing a trigger made. The change is real, so the notice, the webhook delivery and the [events list](https://docs.apidata.one/reference/endpoints/list-events.md) follow as they would on live. The sandbox is shared: a change you trigger is visible to every sandbox user, and another developer's changes may match your searches too. Listings made by triggers are removed after 24 hours. ## Tiers in the sandbox A test key carries the tier it was issued with, Basic or Premium, so you can try both. A saved search is checked for alerts at the tier of the key that created it or last changed its criteria. ================================================================================ PAGE: Building with AI URL: https://docs.apidata.one/guides/building-with-ai/ ================================================================================ # Building with AI Most sites on this API are written with an AI tool: Claude, ChatGPT, Cursor, Lovable and others. These docs are made for that. This page gives you a prompt to paste, the files to hand your tool, the patterns it should produce, and what to check in what it wrote. ## What to give your tool | File | What it is | | --- | --- | | [`https://docs.apidata.one/llms-full.txt`](https://docs.apidata.one/llms-full.txt) | Every page of these docs in one text file. Give it this when the tool can read a long file | | [`https://docs.apidata.one/llms.txt`](https://docs.apidata.one/llms.txt) | An index: each page with one line about it and a link | | [`https://docs.apidata.one/openapi.json`](https://docs.apidata.one/openapi.json) | The API as an OpenAPI 3.1 document: every endpoint, parameter, answer and error | | Any page with `.md` in place of `.html` | That page as plain Markdown | Build with a **test key** first. The [sandbox](https://docs.apidata.one/guides/sandbox.md) answers exactly like live, costs nothing, and has a listing for every awkward case. ## The prompt Paste this before you describe the site you want. It states the rules a site on this API must keep. ```text You are building a real-estate search site on the apidata.one API (https://api.apidata.one/v1). Read https://docs.apidata.one/llms-full.txt before writing code, and follow these rules exactly. KEYS - There are two keys. The secret key (sk_...) stays on the server, in an environment variable. It never appears in browser code, in a page, in a NEXT_PUBLIC_ or VITE_ variable, or in git. - The publishable key (pk_...) is the only key allowed in browser code. Use it only for what must run in the browser: a moving map, a search box that completes, a favorite button. - Every request sends "Authorization: Bearer ". The key picks the environment: _test_ keys reach the sandbox, _live_ keys reach real listings. The host and the paths never change. PAGES - Build listing pages and search pages ON THE SERVER with the secret key, so that they work without scripts and search engines can read them. Do not build a browser-only app. - A listing's page address is built from its listingKey, and the listing is looked up by listingKey alone: /listing/{listingKey}/{words}. Take the words from the listing's "slug" field. Never build an address from the street address. - Treat listingKey as text, never as a number. A VISITOR'S OWN DATA (favorites, saved searches, saved shapes) - The API never trusts a visitor's identity sent from the browser. Give each signed-in visitor an opaque ID (a UUID; never an email address or a phone number). - On the server: the secret key plus the header "X-Client-Id: ". - In the browser: the publishable key plus "X-Client-Token", a short-lived token the server mints for that visitor with POST /v1/client-tokens. Add a server route that mints it for the signed-in visitor, and refresh it before it expires (15 minutes by default). - Send an "Idempotency-Key" header (a new UUID for each action) on every POST that saves something. WHAT EVERY PAGE WITH A LISTING MUST SHOW - Every answer with listings has a "compliance" object beside "data". Show its texts as given: copyright, accuracy and lastUpdated on every page with a listing; idxSource, personalUse and availability on the home page or every search page; advertisingBrokerage.name on every page with a listing. Never hard-code these texts: read them from the answer each time. - Every listing card shows attribution.listOfficeName. A listing's detail page shows the listing office's name with its phone or email in the top quarter of the page, in the same size and colour as the other details. - Closed listings show compliance.closed.label and both of its statements. Coming Soon listings show compliance.comingSoon.label. - Photos are shown whole: CSS "object-fit: contain", never "cover". Never crop, overlay, filter or otherwise alter a photo. Use the photo URLs the API returns, with a plain tag, and do not pass them through an image optimizer or a CDN that keeps its own copies. - When a listing has addressDisplay "withheld", its address is null. Show the listing's addressNotice instead, and never show, guess or rebuild the address anywhere: not in the page, its title, its URL, its meta tags, its structured data or on a map. - A field that is null or missing must not be shown and must not be computed (for example days on market or price history for a Coming Soon listing, or a hidden price). FRESHNESS AND REMOVAL - Do not store listings in your own database. Fetch them from the API when a page is built. A built page may be kept for a few minutes to answer quickly. Never show one that is more than 12 hours old. - Handle the notice "listing.removed" (by webhook, or by reading GET /v1/events every minute): delete every stored copy of the listings it names, and answer 410 Gone for their pages. - A 404 with error.code "listing_not_found" means the listing is gone: show a "no longer available" page. - A 500 with error.code "data_stale" means live data is temporarily stopped: show "temporarily unavailable" and never a stored copy. ERRORS AND LIMITS - Every error is JSON: { "error": { "code", "message", "fix", "docs", "requestId" } }. Decide by error.code, never by the message text. Log requestId. - 429 "rate_limited" and 500 "temporarily_unavailable" or "data_stale" carry a Retry-After header: wait that long, then retry. Most HTTP libraries do not retry a 500 by themselves. - An HTML page with status 502, 503 or 504 is not from the API: retry after a few seconds. - In the browser, call the API once when the visitor stops typing or stops moving the map (wait about 250 ms), and cancel the call that is no longer needed. TEST AGAINST THE SANDBOX - Use the test keys. Check these fixed listings: SBX900000001 (hidden address), SBX900000003 (Coming Soon, no photos), SBX900000004 (Closed), SBX900000008 (prices not shown), SBX900000009 (150 photos), SBX900000024 (not served: 404). ``` ## The patterns, in Fastify A plain Node server that builds its pages. Nothing here needs a build step. **A listing page, built on the server:** ```js import Fastify from 'fastify'; const API = 'https://api.apidata.one/v1'; const secret = { Authorization: `Bearer ${process.env.APIDATA_SECRET_KEY}` }; // server only const app = Fastify(); app.get('/listing/:listingKey/:words?', async (request, reply) => { const r = await fetch(`${API}/listings/${encodeURIComponent(request.params.listingKey)}`, { headers: secret }); if (r.status === 404) return reply.code(404).type('text/html').send(notAvailablePage()); if (!r.ok) { return reply.code(503).header('Retry-After', r.headers.get('retry-after') ?? '300') .type('text/html').send(unavailablePage()); } const { data: listing, compliance } = await r.json(); return reply.type('text/html').send(listingPage(listing, compliance)); // escape every value }); ``` **A client token for the signed-in visitor**, so that the browser can save a favorite with the publishable key: ```js app.post('/api/client-token', async (request, reply) => { const visitor = await signedInVisitor(request); // your own sign-in if (!visitor) return reply.code(401).send(); const r = await fetch(`${API}/client-tokens`, { method: 'POST', headers: { ...secret, 'Content-Type': 'application/json' }, body: JSON.stringify({ clientId: visitor.opaqueId }), // a UUID of yours, never an email address }); if (!r.ok) return reply.code(502).send(); return (await r.json()).data; // { token, expiresAt } }); ``` ```js // In the browser: the publishable key and the visitor's token. async function saveFavorite(listingKey) { const { token } = await (await fetch('/api/client-token', { method: 'POST' })).json(); return fetch('https://api.apidata.one/v1/favorites', { method: 'POST', headers: { Authorization: 'Bearer pk_test_…', 'X-Client-Token': token, 'Content-Type': 'application/json', 'Idempotency-Key': crypto.randomUUID(), }, body: JSON.stringify({ listingKey }), }); } ``` ## The same patterns, in Next.js Many tools write Next.js. The rules are the same; these are the places it goes wrong. **A listing page is a server component.** It runs on the server only, so the secret key is safe there: ```jsx // app/listing/[listingKey]/[[...words]]/page.jsx import { notFound } from 'next/navigation'; export const dynamic = 'force-dynamic'; // build from the API on each request: no stored copy export default async function ListingPage({ params }) { const { listingKey } = await params; const r = await fetch(`https://api.apidata.one/v1/listings/${encodeURIComponent(listingKey)}`, { headers: { Authorization: `Bearer ${process.env.APIDATA_SECRET_KEY}` }, cache: 'no-store', }); if (r.status === 404) notFound(); if (!r.ok) throw new Error('listings are temporarily unavailable'); // shown by error.jsx const { data: listing, compliance } = await r.json(); return (

{listing.address ? listing.address.line1 : listing.addressNotice}

Listed by {listing.attribution.listOfficeName} {listing.attribution.listOfficePhone ? `, ${listing.attribution.listOfficePhone}` : ''}

{listing.photos.items.map((photo) => ( // A plain : the API's own URL, shown whole. ))}

{compliance.advertisingBrokerage.name}

{compliance.copyright} {compliance.accuracy}

{compliance.lastUpdated}

); } ``` **The client token comes from a route handler:** ```js // app/api/client-token/route.js import { NextResponse } from 'next/server'; export async function POST(request) { const visitor = await signedInVisitor(request); // your own sign-in if (!visitor) return new NextResponse(null, { status: 401 }); const r = await fetch('https://api.apidata.one/v1/client-tokens', { method: 'POST', headers: { Authorization: `Bearer ${process.env.APIDATA_SECRET_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ clientId: visitor.opaqueId }), cache: 'no-store', }); if (!r.ok) return new NextResponse(null, { status: 502 }); return NextResponse.json((await r.json()).data, { headers: { 'Cache-Control': 'no-store' } }); } ``` Where Next.js sites go wrong: - **The secret key in a `NEXT_PUBLIC_` variable, or in a file marked `'use client'`.** Either one ships it to every visitor. The API refuses a secret key that arrives from a browser ([`403 secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md)) and flags it: revoke that key and make another. - **Pages kept for a day.** Static generation and long `revalidate` times keep copies of listings. Build listing pages on each request, or keep them for minutes, and drop them when `listing.removed` arrives. - **`next/image` with `fill` and the `cover` fit.** That crops photos. Use a plain `` with `object-fit: contain`, or `next/image` with `unoptimized`: the API already gives five sizes, and an image optimizer keeps its own copies of photos. - **A `fetch` from a client component straight to the API with the secret key.** Client components call the API with the publishable key, or call your own route handlers. ## Check what the tool wrote - [ ] Search the code for `sk_`: it appears only where the server reads an environment variable - [ ] View a listing page's source in the browser: the listing is in the HTML, and no secret key is - [ ] `SBX900000001`: no address anywhere on the page, in its title or in its address - [ ] `SBX900000003`: a Coming Soon label, no photo, no days on market, nothing broken - [ ] `SBX900000004`: the Closed label and both statements - [ ] `SBX900000024`: a "no longer available" page, not an error page - [ ] The disclosures on every page with a listing, read from `compliance` - [ ] Photos whole on a narrow screen and a wide one - [ ] A handler for `listing.removed`, and `410 Gone` afterwards The [compliance guide](https://docs.apidata.one/guides/compliance.md) and [an SEO-friendly site](https://docs.apidata.one/guides/seo.md) explain each rule, and the sample site at [demo.apidata.one](https://demo.apidata.one) follows all of them. ================================================================================ PAGE: Map search URL: https://docs.apidata.one/guides/map-search/ ================================================================================ # Map search A map with pins, and a list of cards beside it, both following the same filters. This guide builds it with two calls: [`GET /v1/listings/map`](https://docs.apidata.one/reference/endpoints/map-listings.md) for the map and [`GET /v1/listings`](https://docs.apidata.one/reference/endpoints/search-listings.md) for the list. ## The two calls Both take the same filters. For the area on screen, send the map's corners as `location.bbox`: ``` GET /v1/listings/map?location.bbox=-75.42,40.00,-75.30,40.08&status=active&price.max=600000 GET /v1/listings?location.bbox=-75.42,40.00,-75.30,40.08&status=active&price.max=600000&limit=24 ``` `location.bbox` is `minLng,minLat,maxLng,maxLat`: west, south, east, north. The map call answers with pins, or with clusters when the area holds more than 500 listings: ```json { "data": { "total": 3, "pins": [ { "listingKey": "805454359664", "lat": 40.01, "lng": -75.3, "price": 400000, "status": "active" } ], "clusters": [] } } ``` ```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.022 } } ``` - **A pin** has the key, the point, the list price (null when the price may not be shown) and the status. For anything more, such as a card when the visitor clicks, fetch `GET /v1/listings/{listingKey}`. - **A cluster** has its center, how many listings it stands for, and the box that holds them. When the visitor clicks one, zoom the map to its `bbox`: a smaller area turns clusters into pins. The list call answers with listing objects, 24 a page, with `meta.page.total` and a `nextCursor` for the next page. ## In the browser, with the publishable key A map moves in the browser, so call from the browser with your **publishable** key (`pk_…`). It is made to be seen in a page: it works only from the website addresses on your account (and from `localhost`, for a test key), and by itself it can only read. Your secret key (`sk_…`) never goes into a page ([authentication](https://docs.apidata.one/concepts/authentication.md)). ```html
    ``` `showCards`, `showDisclosures` and `showUnavailable` are yours. A card shows at least the listing office's name, photos use `object-fit: contain`, and the page shows the `compliance` texts ([compliance](https://docs.apidata.one/guides/compliance.md)). ### Keep the calls few A publishable key's requests share [limits](https://docs.apidata.one/concepts/rate-limits.md) per key and per visitor address: 20 a second, with bursts of 50. A map can use that up quickly if every small movement calls the API. - **Wait until the map rests** (the 250 ms above), and **abort the call you no longer need.** - On `429 rate_limited`, wait `Retry-After` seconds and try once more. A script can read the header. - Don't fetch a detail for every pin. Fetch one when the visitor asks for it. ## Searching a town, a ZIP code or a county Let the visitor type a name ([autocomplete](https://docs.apidata.one/guides/autocomplete.md)), then search the place by its ID and move the map to it: ``` GET /v1/places/pl_… → "bbox": [-75.35, 39.98, -75.25, 40.06] GET /v1/listings/map?location.placeIds=pl_… GET /v1/listings?location.placeIds=pl_…&limit=24 ``` Filters combine with AND, so `location.placeIds` together with `location.bbox` finds the place's listings inside the area on screen. ## Listings that are never on the map A listing whose address is hidden has no point, so it is never a pin, never in a cluster and never found by `location.bbox`, a radius or a drawn shape ([hidden addresses](https://docs.apidata.one/concepts/hidden-addresses.md)). It **is** found by a place, a city or a ZIP code. So for a search by place, the list can hold listings the map does not, and its `total` can be larger than the map's. Show those cards with their `addressNotice` in place of an address, and no "show on map" link. ## Premium: outlines and drawn shapes - **A place's outline:** [`GET /v1/places/{placeId}/geometry?zoom=`](https://docs.apidata.one/reference/endpoints/get-place-geometry.md) with the map's zoom returns a GeoJSON outline simplified for that zoom. Draw it once for a place and zoom; it has [limits of its own](https://docs.apidata.one/concepts/rate-limits.md#place-outlines). - **A shape the visitor draws:** send it as `location.shape` in the body of `POST /v1/listings/map` and `POST /v1/listings/search` ([drawn shapes](https://docs.apidata.one/concepts/shapes.md)). A drawn shape exists in the `POST` forms only. - **A shape the visitor keeps:** [save it](https://docs.apidata.one/reference/saved-shapes.md) and send its `location.shapeId`, which also works in the `GET` forms and in a saved search. A key on a Basic account gets [`403 tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) for these. Searching a place by its ID works on every tier. ## Sorting by distance `sort=distance` on the list needs a center: send `location.radius.center=lng,lat` and `location.radius.meters`. Like every spatial filter, it finds only listings with a shown address. ## Map tiles The example loads its map pictures from OpenStreetMap's own tile servers, which are free and meant **for light use only**. They are fine for building and for a demo. A site with real traffic needs a tile provider of its own (many offer OpenStreetMap-based tiles): change the tile address and its credit line, and nothing else. ## On your server instead The same two calls work from your server with the secret key, which is how a page is built for visitors without scripts and for search engines ([an SEO-friendly site](https://docs.apidata.one/guides/seo.md)). Many sites do both: the first view built on the server, and the moving map in the browser. ================================================================================ PAGE: Autocomplete: a search box that completes URL: https://docs.apidata.one/guides/autocomplete/ ================================================================================ # Autocomplete: a search box that completes One call serves a search box: [`GET /v1/autocomplete`](https://docs.apidata.one/reference/endpoints/autocomplete.md) answers what the visitor may mean, in groups, from the second character on. This guide shows what to send, and what to do with each kind of suggestion. ``` GET /v1/autocomplete?q=ardm ``` ```json { "data": { "places": [ { "placeId": "pl_…", "kind": "cdp", "displayName": "Ardmore (CDP), Montgomery County, PA", "state": "PA", "center": { "lat": 40.01, "lng": -75.29 } } ], "postalCodes": [], "addresses": [ { "listingKey": "805454359664", "mlsNumber": "PAMC2141234", "status": "active", "address": { "line1": "12 ARDMORE AVE", "unit": null, "city": "Ardmore", "state": "PA", "postalCode": "19003" } } ], "mlsNumbers": [] }, "meta": { "requestId": "req_…", "environment": "test" } } ``` Each group holds at most ten suggestions. Show them under headings, in the order you like. ## What to do with a suggestion | Group | The visitor chose | Then | | --- | --- | --- | | `places` | a town, a county, a township, a community, a subdivision | Search it by its ID: `GET /v1/listings?location.placeIds=pl_…`. Move your map to the place with [`GET /v1/places/{placeId}`](https://docs.apidata.one/reference/endpoints/get-place.md), which gives its `bbox` | | `postalCodes` | a ZIP code | Search it by `location.placeIds` with its `placeId`, or by `location.postalCodes=19003` | | `addresses` | one listing, by its address | Go to that listing's page, by its `listingKey` | | `mlsNumbers` | one listing, by a current or past MLS number | Go to that listing's page, by its `listingKey` | | `schoolDistricts` (Premium) | a school district | Search it by `location.placeIds` with its `placeId` | - **Show `displayName` as it is.** It tells look-alikes apart: there are several Washington Townships in Pennsylvania, and `Washington Township, Berks County, PA` names one. - **A listing found by its MLS number may have a hidden address.** It then comes with `address: null` and `addressDisplay: "withheld"`: show the MLS number, and no address. A hidden address never matches in `addresses`. - **Keep the place's ID, not its name,** in your page's address and in a saved search. A name can change; the ID stays. A place ID is the same in the sandbox and on live. ## Ask for the groups you show `types` names the groups you want, and leaves the rest out of the answer: ``` GET /v1/autocomplete?q=1908&types=postalCodes,places GET /v1/autocomplete?q=PAMC21&types=mlsNumbers ``` - A box that searches areas only needs `types=places,postalCodes`. Those two (and `schoolDistricts`) keep working during a [data stop](https://docs.apidata.one/errors/data_stale.md); `addresses` and `mlsNumbers` are listing content, so a request that asks for them, or leaves `types` out, answers `500 data_stale` as a whole while the stop is on. - `schoolDistricts` is Premium. With `types` left out, a key on a Basic account simply gets the other four groups; asking for the group by name on Basic is [`403 tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md). ## Nearest first `near=lng,lat` orders each group by distance from a point: the center of the map on screen, or the visitor's own position if they shared it. ``` GET /v1/autocomplete?q=spring&near=-75.30,40.02 ``` ## In the browser A search box runs in the browser, so call with your **publishable** key from one of your account's website addresses: ```js const box = document.querySelector('#search'); let timer = null; let running = null; box.addEventListener('input', () => { clearTimeout(timer); const q = box.value.trim(); if (q.length < 2) return showSuggestions(null); // nothing is searched under two characters timer = setTimeout(async () => { running?.abort(); // an older answer must not overwrite a newer one running = new AbortController(); try { const r = await fetch(`https://api.apidata.one/v1/autocomplete?${new URLSearchParams({ q })}`, { headers: { Authorization: 'Bearer pk_test_…' }, signal: running.signal, }); if (r.ok) showSuggestions((await r.json()).data); } catch { // aborted, or offline: leave what is shown } }, 200); }); ``` - **Wait for a pause in typing** (200 ms here) and **abort the call you no longer need.** A call for every key press uses up your key's [limit](https://docs.apidata.one/concepts/rate-limits.md), which your visitors share by address. - What the visitor typed is taken as it is: `%` and `_` are ordinary characters, and matching ignores upper and lower case. - A [`429 rate_limited`](https://docs.apidata.one/errors/rate_limited.md) carries `Retry-After`. For a search box it is enough to skip that answer: the next key press asks again. ## What it does not search Autocomplete finds places, ZIP codes and listings. It is not a geocoder: an address that is not a listing's finds nothing. Neighborhoods and individual schools are not places yet. ================================================================================ PAGE: Saved searches and alerts URL: https://docs.apidata.one/guides/saved-searches-and-alerts/ ================================================================================ # Saved searches and alerts A visitor saves a search and is told when a listing newly matches it. The API keeps the search and works out the matches; **your site tells the visitor**, by email or however you like. This guide walks through the whole loop. 1. The visitor signs in to **your** site. Your server gives them an opaque client ID. 2. They save a search: `POST /v1/saved-searches`, with an alert frequency. 3. The API records a **notice** when listings newly match. 4. Your server receives the notice (a webhook, or the events list) and fetches the listings. 5. Your site sends the email, with the disclosures an email needs. ## 1. Who the visitor is Saved searches belong to one visitor of your site. The API never sees who they are: your server chooses an **opaque client ID** for each (a UUID is fine; never an email address or a phone number) and speaks for them in one of two ways ([authentication](https://docs.apidata.one/concepts/authentication.md#acting-for-one-consumer-client-tokens)): - **from your server:** your secret key plus `X-Client-Id: `; - **from the browser:** your publishable key plus `X-Client-Token`, a short-lived token your server mints for that visitor with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). Keep the link between the client ID and the visitor's email address in your own database. You need it in step 5, and the API never has it. ## 2. Save the search The `criteria` are the filters of a search, exactly as [`POST /v1/listings/search`](https://docs.apidata.one/reference/endpoints/search-listings.md) takes them, without paging or sorting: ```bash curl -X POST "https://api.apidata.one/v1/saved-searches" \ -H "Authorization: Bearer $SK_TEST" -H "X-Client-Id: 6b1f0a52-visitor" \ -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \ -d '{"name":"Ardmore under 500k","criteria":{"status":["active"],"price":{"max":500000},"location":{"placeIds":["pl_…"]}},"alertFrequency":"daily"}' ``` - **`alertFrequency` is required:** `instant`, `daily`, `weekly` or `off`. Ask the visitor; never guess it. - **Send an `Idempotency-Key`,** so that a repeat after a lost answer does not save the search twice ([idempotency](https://docs.apidata.one/concepts/idempotency.md)). - A visitor may keep up to 100 saved searches. - To save a search around a drawn shape (Premium), [save the shape](https://docs.apidata.one/reference/saved-shapes.md) first and put its `location.shapeId` in the criteria. Show the visitor their searches with `GET /v1/saved-searches`, let them change the frequency with `PATCH`, and delete with `DELETE` ([reference](https://docs.apidata.one/reference/saved-searches.md)). **Show each search's `status`.** A search that reads `paused_tier`, `paused_suspended` or `paused_invalid` is making no alerts, and the visitor should know. A `paused_invalid` search is fixed by saving new criteria. ## 3. What alerts, and when A listing alerts when it is **new**, when its **price** or **status** changes, or when it comes **back on the market**, and it matches the search at the moment the notice is made. | `alertFrequency` | The notice is made | | --- | --- | | `instant` | after each data update, usually within minutes of the change | | `daily` | once a day at 7:00 am Eastern, for the day before | | `weekly` | Mondays at 7:00 am Eastern, for the week before | | `off` | never: the search is only kept | **Listings that already match when the search is saved never alert.** Your site shows those itself, at the moment of saving, with an ordinary search. The same holds after the criteria change and after alerts are turned back on. ## 4. Receive the notice A notice is thin: IDs and the kind of change, never listing content. ```json { "id": "evt_3yQ8mT1xKp7Zc2Nf5Rb9Wd", "type": "saved_search.matches", "createdAt": "2026-11-10T15:00:00.000Z", "accountId": "0b9f6c1e-52a7-4c3e-9d41-7a6f0c2b8e15", "clientId": "6b1f0a52-visitor", "savedSearchId": "ss_Hq2Lw9Xc4Vb7Nm1Kp6Tz3R", "listingKeys": ["300451207716"], "changes": [{ "listingKey": "300451207716", "reasons": ["new"] }] } ``` Take notices one of two ways ([webhooks and notices](https://docs.apidata.one/concepts/webhooks.md)): - **A webhook:** the API sends each notice to an `https://` address on your server ([the webhooks guide](https://docs.apidata.one/guides/webhooks.md)). - **The events list:** your server asks [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md) every minute for what is new. No public address is needed. Either way, **de-duplicate by the notice's `id`**: the same notice can reach you twice. ## 5. Send the email For each notice: 1. Find the visitor by `clientId` in your own database. If they have unsubscribed, stop. 2. Fetch each listing in `listingKeys` **now**: `GET /v1/listings/{listingKey}`. Never build an email from a copy you stored. - `404 listing_not_found`: the listing has left the data. Leave it out. - `500 data_stale`: live data is stopped. Send nothing with listing content, and try later. 3. Fetch [`GET /v1/compliance`](https://docs.apidata.one/reference/compliance.md) once for the texts the email must carry. 4. Send it from your own mail system, to that visitor only. **apidata.one never emails your visitors**, and never has their addresses. An email that shows a listing is a display of Bright's data, with rules of its own: [alert emails](https://docs.apidata.one/guides/alert-emails.md) lists every element and where its text comes from. ## Favorites alert too A visitor's [favorites](https://docs.apidata.one/reference/favorites.md) make two kinds of notice, in the same way: `favorite.listing_updated` (a price, a status, the photos or an open house changed) and `favorite.listing_removed` (the listing left the data: the favorite is gone, and so must be any copy of the listing you kept). ## Try it now, on the sandbox The [sandbox](https://docs.apidata.one/guides/sandbox.md) changes by itself every 5 minutes, so a saved search there alerts before long. To see one at once, send a [sandbox trigger](https://docs.apidata.one/reference/sandbox-triggers.md) with the saved search's ID, and read the notice within about 10 seconds: ```bash curl -X POST "https://api.apidata.one/v1/sandbox/triggers" \ -H "Authorization: Bearer $SK_TEST" -H "X-Client-Id: 6b1f0a52-visitor" -H "Content-Type: application/json" \ -d '{"event":"saved_search.matches","savedSearchId":"ss_…"}' curl -H "Authorization: Bearer $SK_TEST" "https://api.apidata.one/v1/events" ``` ## When a visitor leaves `DELETE /v1/clients/{clientId}` removes everything the API holds for one visitor: favorites, saved searches, saved shapes and their notices. Call it when a visitor closes their account with you or asks to be forgotten ([reference](https://docs.apidata.one/reference/endpoints/delete-client.md)). ## Good to know - **While your account is suspended** no notice is made for a saved search or a favorite's change, and what happened meanwhile never alerts later. After `account.reinstated`, [re-check the listings you stored](https://docs.apidata.one/concepts/webhooks.md#suspension-and-reinstatement). - **After a downgrade to Basic,** searches with Premium criteria read `paused_tier`. Nothing is deleted, and they are active again when the account is Premium. - **More than 500 matches** at once are split over several notices. - **A very large data repair** can hold alerts back for a person to look at ([when a notice is late](https://docs.apidata.one/concepts/webhooks.md#when-a-notice-is-late)). ================================================================================ PAGE: Webhooks, step by step URL: https://docs.apidata.one/guides/webhooks/ ================================================================================ # Webhooks, step by step A webhook is how the API tells your server that something happened: a saved search has new matches, a favorite changed, a listing was removed. This guide sets one up from nothing. [Webhooks and notices](https://docs.apidata.one/concepts/webhooks.md) has every rule in full, and the functions that check a signature in Node.js, Python and PHP. **Not ready for a public address?** Skip all of this and read the same notices from [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md) once a minute. You can add a webhook later; the notices are the same. ## 1. Write the endpoint An endpoint is an `https://` address on your server that takes a `POST`. It has four duties, in this order: 1. **A `ping`** (the header `ApiData-Event-Type: ping`): answer `2xx`, whatever its signature, and do nothing else. 2. **No secret stored yet:** answer `503` to everything else. It comes again later, so nothing is lost. 3. **Check the signature** of everything else with the endpoint's secret, on the body exactly as received, and answer `400` if it fails. 4. **Answer a good notice `2xx` within 10 seconds,** then do the work. Put the notice on a queue first; fetching listings or sending email before you answer is the usual cause of timeouts. ```js import express from 'express'; import { verifyWebhook } from './verify.mjs'; // from the docs: the function is complete as given const app = express(); app.post('/webhooks/apidata', express.raw({ type: 'application/json' }), (req, res) => { const secret = process.env.APIDATA_WEBHOOK_SECRET; // this endpoint's own secret, once stored const verified = Boolean(secret) && verifyWebhook(secret, req.get('ApiData-Signature'), req.body); if (req.get('ApiData-Event-Type') === 'ping') return res.status(204).end(); if (!secret) return res.status(503).end(); if (!verified) return res.status(400).end(); const notice = JSON.parse(req.body.toString('utf8')); queue.add(notice); // answer first, work afterwards res.status(204).end(); }); ``` Take the body **raw**, before any JSON parsing: the signature is over its exact bytes. [`verify.mjs`](https://docs.apidata.one/webhooks/verify.mjs), [`verify.py`](https://docs.apidata.one/webhooks/verify.py) and [`verify.php`](https://docs.apidata.one/webhooks/verify.php) are ready to copy, with [test cases](https://docs.apidata.one/concepts/webhooks.md#test-vectors) to run your own code against. ## 2. Deploy it, then register it Registration sends a `ping` to your address and waits for a `2xx`, so the endpoint must be running first. From your server, with the secret key: ```bash curl -X POST "https://api.apidata.one/v1/webhook-endpoints" \ -H "Authorization: Bearer $SK_TEST" -H "Content-Type: application/json" \ -d '{"url":"https://example.com/webhooks/apidata","eventTypes":["saved_search.matches","favorite.listing_updated","favorite.listing_removed","listing.removed"],"description":"My site"}' ``` - The address must be `https://`, with a host name that resolves to public addresses. - Leave `eventTypes` out to receive all seven types. - If the ping gets no `2xx` in 10 seconds, the answer is [`400 webhook_ping_failed`](https://docs.apidata.one/errors/webhook_ping_failed.md), saying what happened, and nothing is saved. ## 3. Store the secret, at once The answer holds the endpoint and its secret: ```json { "data": { "id": "wh_…", "url": "https://example.com/webhooks/apidata", "eventTypes": ["…"], "enabled": true, "createdAt": "…", "secret": "whsec_…" } } ``` **`secret` is shown this once.** Put it where your endpoint reads it (`APIDATA_WEBHOOK_SECRET` above), like a password. Deliveries start as soon as the endpoint is saved; until the secret is in place your endpoint answers `503` (rule 2) and those notices come again. If you lose the secret, delete the endpoint and register it again. ## 4. Check that it works Send a test ping, signed with the secret you now hold, and look at what became of it: ```bash curl -X POST -H "Authorization: Bearer $SK_TEST" "https://api.apidata.one/v1/webhook-endpoints/wh_…/test" curl -H "Authorization: Bearer $SK_TEST" "https://api.apidata.one/v1/webhook-endpoints/wh_…/deliveries" ``` The delivery list shows each attempt's result: `http_status` with your server's status code, `timeout`, `tls_failed`, `connection_failed`, `redirect_not_followed` or `refused_destination`. Log in your endpoint whether the ping verified: a test ping that does not verify means the stored secret is wrong. On the [sandbox](https://docs.apidata.one/guides/sandbox.md), make a real notice on demand with a [trigger](https://docs.apidata.one/reference/sandbox-triggers.md). ## 5. Act on each type A notice names listings by key and says what kind of change it was, never more. Fetch what you need from the API when you act. | Type | What your site does | | --- | --- | | `saved_search.matches` | Fetch the listings and tell that visitor ([saved searches and alerts](https://docs.apidata.one/guides/saved-searches-and-alerts.md)) | | `favorite.listing_updated` | The same, for a favorite that changed | | `favorite.listing_removed` | Delete every copy of those listings; the favorites are gone | | `listing.removed` | **Delete every copy of those listings** (a stored page, a row, an image), and answer `410 Gone` for their pages | | `account.suspended` | A record that the account was suspended, and when. Nothing to do when it arrives (see below) | | `account.reinstated` | Live access is back. **Re-check every listing you stored**: notices more than 24 hours old were dropped, removals among them | | `data.stale` | `started`: listing routes answer `500 data_stale` until `ended`. Show "temporarily unavailable", never stored copies | **A suspension is learned from the API's answers, not from a webhook.** While an account is suspended nothing is sent to its endpoints, and data routes answer [`403 account_suspended`](https://docs.apidata.one/errors/account_suspended.md): show "temporarily unavailable" and send no alerts when you see it. `account.suspended` is recorded whenever the account is suspended, whoever did it (a payment that failed for 7 days, a subscription that ended, Bright's list of members, or apidata.one), and it reaches you with the other notices that are still good once the account is reinstated. `account.reinstated` is recorded only when live access really comes back ([going live](https://docs.apidata.one/guides/going-live.md#while-an-account-is-suspended)). ## 6. Keep it healthy - **De-duplicate by `id`.** A notice can arrive twice (your `2xx` was lost on the way) and out of order. Keep handled IDs for 30 days. - **A failed delivery is retried for 24 hours,** 14 attempts in all, further apart each time. After that it is `failed` and is not sent again. - **After an outage longer than a day,** catch up from [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md), which keeps every notice for 30 days. - **To change the address or the secret,** register a new endpoint, switch your server over, then delete the old one. An endpoint's address can't be edited. - **To pause,** set `enabled` to `false`. Notices made meanwhile are not sent later; they are in the events list. - An account has up to 10 endpoints. A `test` key's endpoints receive the sandbox's notices, a `live` key's the live ones. ## Building on your own computer Your computer has no public `https://` address, so a webhook can't reach it. Read `GET /v1/events` while you build, or put a tunnel in front of your local server and register the tunnel's address with a test key. Delete that endpoint when you are done. ================================================================================ PAGE: Alert emails URL: https://docs.apidata.one/guides/alert-emails/ ================================================================================ # Alert emails apidata.one never emails your visitors, and never has their addresses. The API records a [notice](https://docs.apidata.one/concepts/webhooks.md) when a saved search has new matches or a favorite changes, and **your site sends the email**. An email that shows listing content is a display of Bright MLS data, and Bright's rules apply to it as they do to a page. This guide lists every element such an email needs and where its text comes from. **Take every text from [`GET /v1/compliance`](https://docs.apidata.one/reference/compliance.md) when you build the email. Never copy one into your template by hand.** The bundle is filled in for your account (your brokerage's name, the current year, the time of the last data update), and its `email` object holds the strings an email needs. ## From a notice to an email 1. A notice arrives by webhook or from [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md). It names listing keys and reasons, never content. 2. For each listing key, fetch the listing: `GET /v1/listings/{listingKey}`, at the moment you send. Never build an email from a copy you stored earlier. - `404 listing_not_found`: the listing has left the data. Leave it out. - `500 data_stale`: live data is not being served. Send nothing with listing content now, and try again later. 3. Fetch `GET /v1/compliance` for the texts below. One call serves the whole batch of emails. 4. Build the email, and send it only to the consumer the notice names (`clientId`), from your own mail system. The `alertFrequency` the consumer chose (`instant`, `daily`, `weekly`) already decides when the notice is made. A digest notice names only listings that still match when it is made. ## Every email that shows a listing | Element | Where it comes from | | -------------------------------------------------------------------- | ------------------------------------------------------------------------- | | "Property information provided by Bright MLS" | `email.source` | | The copyright line, `© {year} Bright MLS…` | `email.copyright` | | The accuracy statement | `email.accuracy` | | On **each listing card**: the listing firm's name | the listing's `attribution.listOfficeName` | | Your brokerage's name | `advertisingBrokerage.name` | | For an agent's email: the states the agent is licensed in | `advertisingBrokerage.licenseStates` | | An unsubscribe link and your physical postal address (CAN-SPAM) | yours: the API has no part in them | The copyright and accuracy statements are required on **every** email with listing content, however small the display. Show your brokerage's name at least as prominently as the agent's or team's name. The copyright line must not read as if Bright MLS were the broker. ## A short card or a thumbnail A minimal display (a photo, the price, a few facts) needs nothing more than the table above, **on one condition: each listing links directly to a page that carries every disclosure.** That is your listing detail page, which renders the listing's full [`compliance`](https://docs.apidata.one/reference/compliance.md) block. A card that links to a search page, your home page or a login wall doesn't meet the condition. ## A full-detail email An email that shows a listing in full (its remarks, its details) also carries all four of these: | Element | Where it comes from | | -------------------------------------------------------------------- | ------------------------ | | The personal, non-commercial use statement | `email.personalUse` | | The not-guaranteed statement | `email.accuracy` | | The statement that listings may no longer be available | `email.availability` | | The date **and time** of the last data update | `email.lastUpdated` | Bright requires no set wording, only that every element is present. The texts in the bundle are the ones Bright's own document gives, so use them as they are. `email.lastUpdated` is the time of the last successful data update, never the time you built the email; on the sandbox it is the time the sandbox's own change job last finished. ## The listing itself What is true of a listing on a page is true of it in an email: - **Photos** are shown whole. Scale them in proportion and never crop, overlay or retouch them. Use the photo URLs the API gives, over `https`. - **A hidden address** stays hidden: show the listing's `addressNotice` in place of the address ([hidden addresses](https://docs.apidata.one/concepts/hidden-addresses.md)). - **A Closed listing** carries the label `closed.label` and both statements, `closed.notAppraisal` and `closed.provider`. **A Coming Soon listing** carries `comingSoon.label`, and no days on market or price history. - Show only what the API returned for the listing at that moment. Nothing from an earlier copy. ## An example footer For a short-card email, with the strings named by their place in the bundle: ``` {advertisingBrokerage.name} · Licensed in {advertisingBrokerage.licenseStates} {email.source} {email.copyright} {email.accuracy} You are receiving this because you saved a search on example.com. Unsubscribe: https://example.com/unsubscribe/… Example Realty, 1 Main St, Ardmore, PA 19003 ``` A full-detail email adds `{email.personalUse}`, `{email.availability}` and `{email.lastUpdated}`. ## Checklist - [ ] Each listing fetched from the API when the email was built, removed ones left out - [ ] `email.source`, `email.copyright` and `email.accuracy` in every email - [ ] The listing firm's name on every card - [ ] Your brokerage's name, and the agent's states of licensure - [ ] Each card links to a detail page with the full `compliance` block - [ ] Full detail: `email.personalUse`, `email.availability` and `email.lastUpdated` as well - [ ] An unsubscribe link and your postal address - [ ] Photos whole, hidden addresses hidden, Closed and Coming Soon labelled - [ ] After a reinstatement, stored listings re-checked before any email goes out ([why](https://docs.apidata.one/concepts/webhooks.md#suspension-and-reinstatement)) ================================================================================ PAGE: Compliance: showing listings as Bright requires URL: https://docs.apidata.one/guides/compliance/ ================================================================================ # Compliance: showing listings as Bright requires Listings are Bright MLS data, and Bright's display rules apply to every page, printout and email that shows one. The API does most of the work: it never returns a field that may not be shown, every answer with listing content carries a [`compliance`](https://docs.apidata.one/reference/compliance.md) block with the required texts, and every listing carries the names that must be credited. What is left for your site is to **show what the API gives, where the rules say.** This guide lists it. **Take every text from the API at the moment you build the page. Never copy one into a template.** The block is filled in for your account (your brokerage's name, the year, the time of the last data update). ## What goes where | Where | Show | From | | --- | --- | --- | | Every page that shows a listing | The copyright line, the accuracy statement and the time of the last update | `compliance.copyright`, `compliance.accuracy`, `compliance.lastUpdated` | | Your home page, or every search page | The IDX source statement, the personal-use statement and the availability statement | `compliance.idxSource`, `compliance.personalUse`, `compliance.availability` | | Every page that shows a listing | Your brokerage's name as licensed, at least as prominent as the agent's or team's name. For an agent's site, the states the agent is licensed in | `compliance.advertisingBrokerage.name`, `.licenseStates` | | Every listing card and thumbnail | The listing office's name | the listing's `attribution.listOfficeName` | | The listing's detail page | The listing office's name with its phone or email, **in the top quarter of the page, in the same size and colour as the other details** | `attribution.listOfficeName`, `listOfficePhone`, `listOfficeEmail` | | A Closed listing | The label, both statements about sale information, and the selling office and agent where given | `compliance.closed.label`, `.notAppraisal`, `.provider`; `attribution.buyerOfficeName`, `buyerAgentName` | | A Coming Soon listing | The label and the date it is expected on the market | `compliance.comingSoon.label`; the listing's `expectedOnMarketDate` | | A page that claims to show every listing | The notice about brokers who don't take part | `completeness` in [`GET /v1/compliance`](https://docs.apidata.one/reference/compliance.md) | `compliance.closed` is present only when the answer holds a Closed listing, and `compliance.comingSoon` only with a Coming Soon one: their presence tells your page to show them. `compliance.renderingRules` repeats the placement rules in words, for a person or an AI tool reading the answer. The copyright line must not read as if Bright MLS were the broker of the listing or of your site. `compliance.poweredBy` is optional: show it if you like. ## Photos, tours and videos - **Show every photo whole.** Use CSS `object-fit: contain`, never `cover`: cropping can cut off the Bright watermark. Scale in proportion and compress if you need to, and do nothing else to a photo: no cropping, no change of shape, no overlay, no retouching or "enhancement", and never remove a watermark. - **Use the URLs the API gives,** over `https`. They are Bright's own, in five sizes. - **Tours and videos are links,** in the detail's `media.links`. Show them as links beside the gallery, never as photos and never in the photo count. - A Closed listing whose seller hides its photos off the market comes with only the photos that may be shown, and no tour. Show what you get. ## Hidden addresses When a seller asks that the address not be shown, the API returns `address: null`, `addressDisplay: "withheld"` and no coordinates ([hidden addresses](https://docs.apidata.one/concepts/hidden-addresses.md)). - Show `addressNotice` in place of the address, or nothing. - **Never rebuild the address from anywhere else:** not in a page title, a URL, a meta tag, structured data, an image caption or a map pin. Use the listing's `slug`, which is made from the city, the state and the `listingKey` only. - Such a listing has no place on a map. It is found by its city, ZIP code, county and place memberships. ## Do not work out what the API leaves out A field that is `null` or absent is one that may not be shown for that listing. Show nothing for it, and never compute a stand-in: - **Coming Soon:** no days on market, no price history, no open houses, no tour. Do not count days yourself, and do not show price changes from before it came on the market. - **Hidden prices, hidden days on market, hidden price history:** some listings come with these null. Leave them blank. - **Estimates and comments:** when a listing's `permissions.avmDisplay` is `false`, show no estimated value for it, from any source, an AI feature included. An estimate is never an "appraisal". When `permissions.consumerComments` is `false`, show no visitor comments or reviews on it. - **Only a Closed listing has a sale.** `price.close`, `closeDate` and the selling office are null for every other status. ## Fresh data, and no copies left behind - **`compliance.lastUpdated` is the time of the last successful data update,** in Eastern time, never the time of the request. Show it as given. - **When `lastUpdated` is `null`, show nothing in its place.** It is `null` when there is no such time to give. On live that does not happen while listings are served. In the sandbox the time is that of its own last change, and it is `null` until the first one has run. Leave the line out then, and still show the copyright line and the accuracy statement. Never write a time of your own, such as the time of the request. - **The 12-hour stop.** If live data could not be refreshed for 12 hours, listing routes answer [`500 data_stale`](https://docs.apidata.one/errors/data_stale.md). Show "temporarily unavailable" then, and never a copy you kept. - **A listing that leaves the data must leave your site at once.** A [`listing.removed` notice](https://docs.apidata.one/concepts/webhooks.md) names it: delete every copy you stored (a stored page, a database row, an image) and answer `410 Gone` for its page. `404 listing_not_found` on a fetch means the same. - **Keep a stored copy short-lived.** Build each page from the API. If you keep built pages to answer quickly, rebuild them often and never show one that is more than 12 hours old: that is the rule the API itself keeps. See [an SEO-friendly site](https://docs.apidata.one/guides/seo.md#caching-and-prompt-removal). ## Printouts, shared pages and emails A printed page, a "share this listing" page and a forwarded page carry the same disclosures as the page itself. An email that shows listing content has its own, shorter list: [alert emails](https://docs.apidata.one/guides/alert-emails.md). ## Try each case on the sandbox The sandbox has a listing for every case above, with a key that never changes ([the list](https://docs.apidata.one/guides/sandbox.md#listings-that-never-change)): `SBX900000001` (a hidden address), `SBX900000003` (Coming Soon, no photos), `SBX900000004` (Closed with a sale), `SBX900000008` (prices that may not be shown), `SBX900000027` (photos hidden off the market), `SBX900000028` (tour and video links) and `SBX900000030` (days on market that may not be shown). ## Checklist - [ ] `copyright`, `accuracy` and `lastUpdated` on every page with a listing - [ ] `idxSource`, `personalUse` and `availability` on the home page or every search page - [ ] Your brokerage's name on every page with a listing, and the states of licensure for an agent - [ ] The listing office's name on every card; name and phone or email in the top quarter of the detail page - [ ] Closed and Coming Soon labelled from the block, with the Closed statements - [ ] Photos whole (`object-fit: contain`), tours and videos as links - [ ] A hidden address nowhere: not in the page, its title, its URL, its meta tags or its markup - [ ] Nothing computed that the API left out - [ ] `data_stale` and `listing.removed` handled, and no stored copy shown past 12 hours ================================================================================ PAGE: Build an SEO-friendly site URL: https://docs.apidata.one/guides/seo/ ================================================================================ # Build an SEO-friendly site Search engines may index your listing pages: Bright's IDX rules allow it. This guide shows how to build pages a search engine can read, with addresses that last, a sitemap, and removal that stays prompt, all within Bright's display rules ([compliance](https://docs.apidata.one/guides/compliance.md)). The short version: 1. Build each page **on your server**, with your secret key. 2. Give each listing **one address, by its `listingKey`**. 3. Write the title, the description and the structured data **only from fields the API returned**. 4. Build your **sitemap from the key list**. 5. Answer **`410 Gone`** for a listing that was removed, and drop every stored copy of it. ## Build pages on the server A page that fills itself in the browser, with a publishable key, is an empty page to many crawlers. Build listing pages and search pages on your server instead: - Your server calls the API with its **secret key** (`sk_…`), which never leaves the server, and sends finished HTML. No CORS, no key in the page. - Keep the publishable key (`pk_…`) for what must run in the browser: a map that moves, a search box that completes as the visitor types, a favorite button ([map search](https://docs.apidata.one/guides/map-search.md), [autocomplete](https://docs.apidata.one/guides/autocomplete.md)). ```js // A listing page, built on the server (Node 24, any framework). app.get('/listing/:listingKey/:words?', async (req, res) => { const r = await fetch(`https://api.apidata.one/v1/listings/${encodeURIComponent(req.params.listingKey)}`, { headers: { Authorization: `Bearer ${process.env.APIDATA_SECRET_KEY}` }, }); if (r.status === 404) return res.status(removedKeys.has(req.params.listingKey) ? 410 : 404).send(gonePage()); if (!r.ok) return res.status(503).set('Retry-After', r.headers.get('retry-after') ?? '300').send(busyPage()); const { data: listing, compliance } = await r.json(); const canonical = listingPath(listing); if (req.path !== canonical) return res.redirect(301, canonical); // the address changed: one address a listing res.send(listingPage(listing, compliance, canonical)); }); ``` ## One address for each listing Use the **`listingKey`** to find a listing, never its street address: ```js // The slug ends with "-" and the listing key: cut that off to get the words. function listingPath(listing) { const words = listing.slug.slice(0, -(listing.listingKey.length + 1)); return `/listing/${listing.listingKey}/${words}`; } // /listing/805454359664/101-main-st-ardmore-pa-19003 // /listing/805454361120/ardmore-pa (a hidden address: city and state only) ``` - **Look the listing up by the key alone.** The words after it are decoration. When they don't match the listing's current `slug`, redirect to the address that does, and name that address in ``. - **The words come from `slug`, never from your own reading of the address.** When a seller asks that an address be hidden, the listing's `slug` loses the street at once, and with the redirect above your old address stops showing it too. - A listing key is text. Live keys are digits today, and sandbox keys start with `SBX`. ## Titles, descriptions and structured data Write them from the listing as the API returned it, at that moment: ```js function listingTitle(l) { const where = l.address ? `${l.address.line1}, ${l.address.city}, ${l.address.state} ${l.address.postalCode}` : `${l.statusLabel} listing`; // a hidden address: no street, in any tag const price = l.price.list === null ? '' : ` | $${l.price.list.toLocaleString('en-US')}`; return `${where}${price}`; } ``` - **A hidden address appears nowhere:** not in the ``, the meta description, an `og:` tag, the structured data, an image's `alt` text or the page's address. A listing with `addressDisplay: "withheld"` has `address: null` and `location: null`; write the page without them. - **A null field stays out.** A hidden price, hidden days on market, a Coming Soon listing's missing price history: leave them out of every tag, and never compute them. - **Structured data** (schema.org JSON-LD) follows the same rule: only what the page itself shows. ```js function listingJsonLd(l, url) { const data = { '@context': 'https://schema.org', '@type': 'RealEstateListing', url, name: listingTitle(l), dateModified: l.updatedAt, image: l.photos.primary ? [l.photos.primary.full ?? l.photos.primary.medium].filter(Boolean) : [], }; if (l.price.list !== null) data.offers = { '@type': 'Offer', price: l.price.list, priceCurrency: 'USD' }; if (l.address) data.about = { '@type': 'Residence', address: { '@type': 'PostalAddress', streetAddress: l.address.line1, addressLocality: l.address.city, addressRegion: l.address.state, postalCode: l.address.postalCode, }, ...(l.location ? { geo: { '@type': 'GeoCoordinates', latitude: l.location.lat, longitude: l.location.lng } } : {}), }; return JSON.stringify(data).replace(/</g, '\\u003c'); // safe inside a <script> tag } ``` Every page built on the server carries the same disclosures as any other page with listings: the `compliance` texts, your brokerage's name, and the listing office's name and contact near the top of a detail page ([what goes where](https://docs.apidata.one/guides/compliance.md#what-goes-where)). Photos keep `object-fit: contain`. ## A sitemap from the key list [`GET /v1/listings/keys`](https://docs.apidata.one/reference/endpoints/list-listing-keys.md) lists every listing the API serves, by key, with the time it last changed. It is for your server, with the secret key: ```js // Every key the API serves, with when each last changed. About 210 requests for a million keys. async function allKeys() { const out = []; let cursor = null; for (;;) { const url = new URL('https://api.apidata.one/v1/listings/keys'); url.searchParams.set('limit', '5000'); if (cursor) url.searchParams.set('cursor', cursor); const r = await fetch(url, { headers: { Authorization: `Bearer ${process.env.APIDATA_SECRET_KEY}` } }); if (r.status === 429) { await new Promise((done) => setTimeout(done, 1000 * Number(r.headers.get('retry-after') ?? 2))); continue; // the same page again } if (!r.ok) throw new Error(`key list: ${r.status}`); const page = await r.json(); out.push(...page.data); // { listingKey, updatedAt } cursor = page.meta.page.nextCursor; if (cursor === null) return out; } } ``` - **`updatedAt` is your `<lastmod>`.** The list holds no address, so a sitemap entry's address is the key alone (`/listing/805454359664`); your page redirects it to the full address. - **A sitemap file holds at most 50,000 addresses.** With more, write several files and a sitemap index that names them. - **Rebuild it on a schedule,** such as once a day. The route has a [limit of its own](https://docs.apidata.one/concepts/rate-limits.md#the-key-list): one request every 2 seconds for a key, with bursts of 5, so a full list takes a few minutes. Honour `Retry-After` on a `429`. - **A key that was on your last list and is not on this one has left the data.** Take it out of the sitemap, delete what you stored for it, and answer `410 Gone` for its page. - The list is for sitemaps. **Do not use it to fetch every listing's detail ahead of time:** build a listing's page when it is asked for (next section). ## Caching and prompt removal A removed listing must leave your site at once, stored pages included. So store as little as you can, for as short a time as you can: - **Build a page when it is asked for,** from the API. To answer crawlers quickly you may keep a built page for a short while (minutes, not days) and rebuild it after that. - **Never show a stored page more than 12 hours old.** That is the rule the API itself keeps for its own data. - **Drop a listing the moment its `listing.removed` [notice](https://docs.apidata.one/concepts/webhooks.md) arrives:** the stored page, any row and any image you kept. Remember only its key, so that its address answers `410 Gone`. Register a [webhook endpoint](https://docs.apidata.one/guides/webhooks.md), or read [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md) every minute. - **A fetch that answers `404 listing_not_found` for a listing you stored or served** means the same: drop it, and remember its key as removed. For a key you never served, the same `404` says only "no such listing": the API can't tell a removed listing from one that never existed, and neither can you. - **During a data stop** ([`500 data_stale`](https://docs.apidata.one/errors/data_stale.md)), do not fall back to stored pages. Answer `503` with a `Retry-After` header and a "temporarily unavailable" page; a search engine then keeps the page in its index and comes back later. - **After an `account.reinstated` notice,** re-check every listing you stored ([why](https://docs.apidata.one/concepts/webhooks.md#suspension-and-reinstatement)). ## What to answer for a listing that is gone | The listing | Answer | Why | | --- | --- | --- | | Removed from the data, and you know it: you got its `listing.removed` notice, or you served it before and it is missing from the key list | `410 Gone`, with a plain page and links to search | It tells a search engine to drop the page for good | | Never existed, or you can't tell: the API answers `404 listing_not_found` for both, so a key you never served is this case | `404 Not Found` | A `410` for an address that never was a page tells a search engine nothing | | Live data is stopped (`data_stale`), or the API can't be reached | `503` with `Retry-After` | The page stays indexed | A `410` page shows nothing of the listing: no address, no photo, no price. ## Crawlers count against your limits Every page a crawler fetches makes your server call the API, and those calls count against your secret key's [limits](https://docs.apidata.one/concepts/rate-limits.md) like any others. A crawler that takes thousands of pages in a burst can use up the bucket your visitors share. - The short store above absorbs most of it: a page built a minute ago is not built again. - Slow down a crawler that asks too fast: answer it `429` or `503` with `Retry-After` from your own server before you call the API. - Search pages with many filters make endless addresses. Let crawlers index a small set (a city's or a ZIP code's listings, built from `location.placeIds` or `location.postalCodes`) and mark the rest `noindex`. ## See it working The sample site at [demo.apidata.one](https://demo.apidata.one) is built this way, on a sandbox key: pages built on the server, addresses by `listingKey`, a sitemap from the key list, `410` for a removed listing, and every disclosure. ## Checklist - [ ] Listing and search pages built on the server with the secret key - [ ] One address a listing, found by `listingKey`; other spellings redirect to it - [ ] Title, description and structured data from the API's fields only; nothing for a null - [ ] A hidden address in no tag, no address and no markup - [ ] A sitemap from `GET /v1/listings/keys`, rebuilt on a schedule, `lastmod` from `updatedAt` - [ ] `listing.removed` handled: every copy dropped, `410 Gone` from then on - [ ] No stored page shown past 12 hours, and none during `data_stale` - [ ] The disclosures on every page a crawler can reach ================================================================================ PAGE: Going live URL: https://docs.apidata.one/guides/going-live/ ================================================================================ # Going live Everything you build runs first on the [sandbox](https://docs.apidata.one/guides/sandbox.md), with test keys, for free. Going live gives your account live keys, which return real Bright MLS listings. This guide says who can go live, what you are asked for, what happens then, and what changes in your code: the keys, and nothing else. ## Before you ask - **Build and test on the sandbox.** It answers exactly like live: the same endpoints, the same fields, the same errors. Test the [listings that never change](https://docs.apidata.one/guides/sandbox.md#listings-that-never-change): a hidden address, Coming Soon, Closed, a listing with no price. Your pages must handle each one before real listings reach them ([compliance](https://docs.apidata.one/guides/compliance.md)). - **You need a Bright MLS membership.** Live data is Bright's, licensed to its member brokers and their agents. You apply as an agent, with your Bright member ID, or as a broker, with your office ID. Your broker must have approved the IDX feed with Bright for this use. ## Ask to go live In the [portal](https://app.apidata.one), an Owner of the account opens **Go live** and gives: | What | Notes | | --- | --- | | Agent or broker | Which of the two you apply as | | Your Bright member ID (agents) or office ID (brokers) | It is checked against Bright's own list of members | | Your brokerage's name, exactly as licensed | It is shown in the disclosures on your pages, so it must match your licence | | The states you are licensed in | Two-letter codes | | The websites that will use the data | Each one's address, such as `https://www.example.com`. A publishable live key works from these addresses only | | A phone number | So that we can reach you about the request | | The tier | Basic or Premium | | Your broker's approval | A box you tick: your broker approved the IDX feed with Bright for this use | Then add a card on the **Billing** page. The card is entered on Stripe's own page, never on apidata.one, and **nothing is charged until your request is approved.** Each request is looked at by a person. Until it is decided, your sandbox works as before, and you can change the request. A live key on an account that is not approved yet answers [`403 account_pending`](https://docs.apidata.one/errors/account_pending.md). ## When it is decided - **Approved:** the first month is charged to your card, and the account's Owners are emailed. If the charge fails, the account is approved but can make no live key until it is paid: fix the card on the Billing page. - **Declined:** the Owners are emailed the reason. Nothing is charged, your sandbox stays, and you can correct the request and send it again. ## Make your live keys Live keys are made on the account's **Live keys** page, by an Owner or a Developer: - **Everyone in the account needs a second sign-in step first:** an authenticator app or a passkey. From the account's first live key on, the portal asks every member for it, and making a key asks for it again if you last passed it more than 15 minutes ago. - **A key is shown once.** Copy it then. It is stored only as a hash, so nobody can show it to you again: **if you lose a key, revoke it and make another.** - An account holds up to 10 live keys that are not revoked. Revoking one takes effect on the next request. - The account's Owners get an email whenever a live key is made. ## Change your code: the keys Swap each `_test_` key for its `_live_` key: `sk_live_…` on your server, `pk_live_…` in the browser. **Nothing else changes**: the host, every path and every field stay the same, and a place ID you found in the sandbox is the same place on live. What is different about live data: - **Listings are real,** and their keys are digits, not `SBX…`. Treat a listing key as text. - **A publishable live key works only from the website addresses your request named,** matched exactly on scheme, host and port: `https://www.example.com` does not cover `https://example.com`. `localhost` is for test keys only ([authentication](https://docs.apidata.one/concepts/authentication.md#browsers-and-domains)). To add or change a live address after approval, write to support@apidata.one. - **The 12-hour stop applies.** If live data could not be refreshed for 12 hours, listing routes answer [`500 data_stale`](https://docs.apidata.one/errors/data_stale.md) until it is fresh again. Show "temporarily unavailable", never a copy you kept. - **Every removal reaches you.** A live account gets a `listing.removed` [notice](https://docs.apidata.one/concepts/webhooks.md) for every listing that leaves the data. Delete every copy you stored when it arrives. - **Search engines and other crawlers count.** Every page a crawler fetches from your site makes your site call the API, and those calls count against your keys' [limits](https://docs.apidata.one/concepts/rate-limits.md) like any others ([an SEO-friendly site](https://docs.apidata.one/guides/seo.md)). ## Billing, in short The [terms](https://apidata.one/terms/) hold the full rules. In short: - **Basic is $99 a month and Premium $199 a month,** plus applicable tax, billed monthly. - **Changing plan** is done on Stripe's billing page, which the portal's Billing page opens. An upgrade applies at once, a downgrade at the end of the month you paid for. - **If a renewal payment fails,** your live keys keep working for 7 days while the card is tried again. If it is still unpaid then, the account is suspended until the payment goes through, and it is lifted by itself when it does. If the payment has not succeeded within 14 days, the subscription ends and nothing more is charged. - **Cancelling** is done on the same page. Live access goes on until the end of the month you paid for; there is no refund for part of a month. Then the account is suspended. - **Your sandbox and your test keys stay,** whatever happens to the live account. ## While an account is suspended A suspension stops live listing data and keeps everything else, so that you and your visitors lose nothing by it: - Data routes answer [`403 account_suspended`](https://docs.apidata.one/errors/account_suspended.md). `GET /v1/account`, reading and deleting your visitors' saved data, and minting client tokens keep working, so you can still export or delete what they saved. - Saved searches read `paused_suspended` and make no notices, and nothing is sent to your webhook endpoints. An `account.suspended` notice is recorded when it starts. - **Your keys are kept.** After a subscription has ended, your keys and your visitors' saved data are kept for 90 days from the suspension, in case you come back. Then your visitors' data is deleted. Closing the account in the portal deletes everything sooner. **Coming back** after a subscription ended: ask to go live again on the same page. When the request is approved and the new subscription's first month is paid, the suspension lifts and **the same live keys work again**. An `account.reinstated` notice is recorded, notices more than 24 hours old are dropped, and your site must then [re-check the listings it stored](https://docs.apidata.one/concepts/webhooks.md#suspension-and-reinstatement). An account is also suspended, whatever its payments, when its agent or broker is no longer on Bright's list of members, and reinstated when they are back on it. ## Checklist - [ ] Every page tested on the sandbox against the listings that never change - [ ] The request sent from **Go live**, and a card added on **Billing** - [ ] After approval: a second sign-in step for everyone in the account - [ ] Live keys made, copied once, `sk_live_…` kept on the server only - [ ] Your website addresses on the account exactly as visitors' browsers send them - [ ] A handler for `500 data_stale` and one for `listing.removed` ================================================================================ PAGE: Authentication URL: https://docs.apidata.one/concepts/authentication/ ================================================================================ # Authentication ## Two kinds of key, two environments Every request to a key-protected endpoint sends `Authorization: Bearer <key>`. | Prefix | Where it lives | Environment | What it can do | | ---------- | --------------------- | ---------------------- | ------------------------------------------------------------------------- | | `pk_test_` | your website (browser)| [sandbox](https://docs.apidata.one/guides/sandbox.md) (made-up data) | public reads; consumer features with a client token; CORS from your domains and `localhost` | | `pk_live_` | your website (browser)| live | same, from your authorized domains only | | `sk_test_` | your server only | sandbox | everything in the account, including minting client tokens | | `sk_live_` | your server only | live | everything in the account | The environment comes from the key, never from the URL. Going live means swapping the key. You make and revoke keys in the [portal](https://app.apidata.one): test keys from the moment you sign up, live keys once your account is approved to [go live](https://docs.apidata.one/guides/going-live.md). A key is shown once, when it is made, and is stored only as a salted hash, so nobody can show it to you again. **If you lose a key, revoke it and make another.** A key can be revoked at any time; the next request with it gets `401 key_revoked`. ## Never put a secret key in a browser A request that carries an `sk_` key together with a browser `Origin` header, or any `Sec-Fetch-Site` header (browsers add it to every request they make), is refused with `403 secret_key_in_browser`, and the key is flagged as possibly exposed. `GET /v1/account` (with an `sk_` key) lists flagged keys so you can rotate them, the portal's keys page shows the warning, and the account's Owners get one email about each flagged key. The key keeps working from your server until you revoke it. Use the `pk_` key plus a client token in the browser instead. A server that proxies browser requests must not forward the browser's `Origin` and `Sec-Fetch-*` headers, or it looks like the browser. Calls from Node's own `fetch` and other server clients are unaffected. ## Acting for one consumer: client tokens Favorites (and later saved searches, shapes and alerts) belong to one consumer of your site. The API never trusts a consumer identity sent from the browser. Instead: 1. Your server authenticates the consumer however it likes and chooses an **opaque client ID** for them: 1–64 characters of `A-Z a-z 0-9 _ -`. Never an email address (anything with `@`) or a phone number (10 to 15 digits once dashes and underscores are removed); those are refused with `400 client_id_must_be_opaque`. A UUID is fine. The same ID under two accounts is two different people. 2. Your server calls `POST /v1/client-tokens` with its `sk_` key and that `clientId`, and gets a short-lived JWT (default 15 minutes, at most 60). 3. The browser sends `Authorization: Bearer pk_…` plus `X-Client-Token: <jwt>`. 4. The API checks the token's signature, expiry, environment and that it was minted by the same account as the `pk_` key. A token from another account is `401 client_token_account_mismatch`. Your server can also act for a consumer directly: `sk_` key plus `X-Client-Id: <clientId>`. A `clientId` in a query string or body is ignored for authorization. A `pk_` request to a consumer endpoint without a token gets `401 client_token_required`. ## Browsers and domains `pk_` keys work from the account's **authorized domains**, matched exactly on scheme, host and port (`https://example.com` does not cover `http://example.com`, `www.example.com` or `https://example.com:8443`). `pk_test_` keys also work from `localhost` on any port. A request from any other origin is `403 origin_not_allowed` with no CORS headers. The browser's `OPTIONS` preflight carries no key, so it gets the same permissive answer for every site and reveals nothing; the domain list is enforced on the real request. Domain locking stops other websites from embedding your key; it is not anti-scraping, because a non-browser client can forge `Origin`. [Rate limits](https://docs.apidata.one/concepts/rate-limits.md) apply regardless. ## Account status | Status | Effect | | ----------- | --------------------------------------------------------------------------------------------- | | `pending` | a live account awaiting approval to [go live](https://docs.apidata.one/guides/going-live.md) (a sandbox account is active from the start, so `test` keys work); a `live` key gets `403 account_pending` everywhere except `GET /v1/account` with the `sk_` key, so your server can see the status | | `active` | normal | | `suspended` | data writes and listing data get `403 account_suspended`; `GET /v1/account`, reading and deleting consumer data, and minting tokens keep working so you can export or delete | | `closed` | every key is revoked at once; the account is deleted within 30 days | ================================================================================ PAGE: Responses and errors URL: https://docs.apidata.one/concepts/responses-and-errors/ ================================================================================ # Responses and errors ## Success envelope ```json { "data": {}, "meta": { "requestId": "req_…", "environment": "test" } } ``` `data` is an object for one resource and an array for a list. `meta.environment` is `test` or `live`, from the key. Every response also carries an `X-Request-Id` header and the three `RateLimit-*` headers ([rate limits](https://docs.apidata.one/concepts/rate-limits.md)). Responses with listing content add `meta.page` (searches), `meta.dataLastUpdatedAt`, the [`compliance`](https://docs.apidata.one/reference/compliance.md) block and `warnings`: ```json { "data": [], "meta": { "requestId": "req_…", "page": { "limit": 24, "nextCursor": null, "total": 0, "totalIsCapped": false }, "dataLastUpdatedAt": "2026-11-10T14:59:00.000Z", "environment": "live" }, "compliance": {}, "warnings": [ { "code": "close_date_clamped", "message": "…", "fix": "…" } ] } ``` A warning says the request was answered but not exactly as asked (a clamped date, a filter that doesn't apply to some classes, rooms or open houses left out as stale). Codes: `close_date_clamped`, `filter_not_applicable`, `rooms_stale`, `open_houses_stale`. The sandbox answers with the same warnings as live. A warning describes the request, not the page of results: `filter_not_applicable` comes with a `beds` filter whenever the search could return land or commercial listings, even if this page holds only houses ([search](https://docs.apidata.one/reference/endpoints/search-listings.md) says how to avoid it). Responses to key-protected endpoints are `Cache-Control: private, no-store`. ## Error envelope ```json { "error": { "code": "client_token_required", "message": "This endpoint acts for one consumer and needs a client token.", "fix": "Mint a token on your server with POST /v1/client-tokens (sk_ key) and send it as the X-Client-Token header with your pk_ key.", "docs": "https://docs.apidata.one/errors/client_token_required", "requestId": "req_…" } } ``` `validation_failed` adds `fields: [{ path, problem, expected }]`. Messages say what is wrong and `fix` says exactly what to do. Every code has its own page under [errors/](https://docs.apidata.one/errors). | HTTP | Codes | | ---- | -------------------------------------------------------------------------------------------------------- | | 400 | `validation_failed`, `client_id_must_be_opaque`, `pagination_limit_reached`, `shape_invalid`, `shape_too_large`, `webhook_url_invalid`, `webhook_destination_refused`, `webhook_ping_failed` | | 401 | `missing_api_key`, `invalid_api_key`, `key_revoked`, `client_token_required`, `client_token_invalid`, `client_token_expired`, `client_token_account_mismatch` | | 403 | `secret_key_in_browser`, `secret_key_required`, `origin_not_allowed`, `account_suspended`, `account_pending`, `tier_insufficient` | | 404 | `not_found` (an object outside your account or consumer, a place, or an unknown route or method), `listing_not_found` | | 409 | `idempotency_conflict`, `limit_reached`, `shape_in_use` | | 429 | `rate_limited`, `quota_exceeded` (both carry `Retry-After`) | | 500 | `internal_error` (always carries a `requestId`), `data_stale` (listing content more than 12 hours old; carries `Retry-After`), `temporarily_unavailable` (a write kept losing a race, or the service was busy, or its database slow to answer or out of reach; carries `Retry-After`, and repeating the request is safe) | The API itself never answers `502`, `503` or `504`. `data_stale` and `temporarily_unavailable` are sent as `500`, with the JSON body above and their `Retry-After` header: tell them from `internal_error` by `error.code`, never by the status. Retry those two after `Retry-After`. Most HTTP client libraries retry a `503` by themselves but not a `500`, so write that retry yourself. An HTML page with status `502`, `503` or `504` does not come from the API. It is the hosting platform's own answer while it could not reach the API, for example for a moment during a deploy. It has no JSON body and no `requestId`; retry it after a few seconds. Some codes add fields of their own beside `code` and `message`, inside `error`: `limit` (`limit_reached`), `savedSearchIds` (`shape_in_use`), `result` and `statusCode` (`webhook_ping_failed`). Each code's page says which. ## Order of checks A request is checked in this order, and the first failure is the one reported: the key (missing, malformed, unknown, revoked), the browser check (an `sk_` key in a browser), the origin (a `pk_` key from an unlisted domain), the key type (a `pk_` key on an `sk_`-only endpoint), the client token, the client ID, the account status (pending, suspended), and only then the request body. So a missing header or a malformed body never hides a bad key or a secret key in a browser, and once the origin check has passed, a listed site can read every later error through CORS. ## Request bodies Request bodies are JSON only: `Content-Type: application/json` (UTF-8), at most 64 KiB. Anything else, including form bodies, other charsets and malformed JSON, is `400 validation_failed` with `fields[0].path` of `body`. A request with no body is never refused for its `Content-Type`, whatever that header says: a `DELETE` sent with `Content-Type: application/json` and no body works. A route that needs a body refuses an empty one through its field checks (`fields[0].path` of `body.listingKey` or `body.clientId`). Unknown fields are ignored. The body is read in full before the request is processed, so a slow upload never holds a database connection. A request whose path can't be read is `400 validation_failed` with `fields[0].path` of `path`: a broken percent-escape (`problem` is `malformed`), or a part of the path longer than 100 characters where a route takes a value (`too long`). The answer repeats nothing of the request, and it comes before the key is checked. Three answers come from the HTTP server itself, before the API has a request to work on: - `400 Bad Request` for a malformed HTTP request, including an HTTP/1.1 request with no `Host` header. - `408 Request Timeout` for a request whose headers and body haven't all arrived within 30 seconds. The connection then closes. - `431 Request Header Fields Too Large` for oversized headers. They carry no error envelope and no `requestId`. Nothing was done with the request: send it again on a new connection (after a 400 or a 431, with the request itself put right). ================================================================================ PAGE: Rate limits URL: https://docs.apidata.one/concepts/rate-limits/ ================================================================================ # Rate limits Requests are metered in token buckets: a bucket holds a burst of tokens, refills at a steady rate, and each request takes one. Three buckets exist: | Bucket | Rate | Burst | Who is charged | | ---------------------- | --------------- | ----- | ------------------------------------------------------------------- | | a secret key (`sk_`) | 50 a second | 100 | that key's requests only. A server's traffic never shares a bucket with anyone else's, whatever address it comes from | | a publishable key (`pk_`) | 20 a second | 50 | that key's requests, **and** the address bucket | | an address (IP) | 20 a second | 50 | every request from that address that carries no valid secret key: publishable keys, no key, a malformed, unknown or revoked key, and public routes such as `GET /v1/status` | The address bucket is charged before any key lookup, so a flood of bad keys from one address gets `429 rate_limited` once the bucket is empty, not a stream of `401`s. A valid secret key is looked up first and never touches the address bucket; a secret key that turns out unknown or revoked is charged to the address. The client address is the one our own front door reports for your connection. A forwarding header you send, such as `X-Forwarded-For`, is never used, so a forged header can't move a request into another bucket. ## Headers Every response carries the standard headers for the tighter of the buckets that applied: - `RateLimit-Limit`: the bucket's burst; - `RateLimit-Remaining`: tokens left; - `RateLimit-Reset`: seconds until the bucket is full again. A refused request is `429 rate_limited` with `Retry-After` in seconds. A site can read its 429s. When your publishable key's own bucket refuses a request from one of your listed origins, the 429 carries that origin's CORS headers; when the address's bucket refuses, it carries `Access-Control-Allow-Origin: *`, since that answer says nothing about any account. Both expose `Retry-After` and the `RateLimit-*` headers to scripts (`Access-Control-Expose-Headers`). A site that isn't on the account's list still gets `403 origin_not_allowed` with no CORS headers, and never spends your key's bucket. ## The key list `GET /v1/listings/keys` (secret keys only) has a bucket of its own for each key, on top of that key's usual one: | Bucket | Rate | Burst | | --- | --- | --- | | the key list, for a secret key | one request every 2 seconds | 5 | Every request to the route takes a token from it, whatever it is answered. Past it: `429 rate_limited` with `Retry-After`. On the route's answers the `RateLimit-*` headers show whichever bucket has the fewest requests left, this one or the key's own. Ask for 5,000 keys a page: a full list of a million keys is then about 210 requests, a few minutes. ## Place outlines `GET /v1/places/{placeId}/geometry` (Premium) has two limits of its own, per key, on top of the buckets above: | Limit | Refusal | Counted | | --- | --- | --- | | 60 outlines in any 60 seconds | `429 rate_limited` with `Retry-After` | a rolling count: a slot is free again 60 seconds after its outline was served | | 5,000 outlines a UTC day | `429 quota_exceeded` with `Retry-After` to the next 00:00 UTC | in the database, so a restart doesn't reset it | Only outlines actually served count toward either: a `404`, a `400` or a refused request costs nothing. On an outline answer, `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` show whichever applies with the fewest requests left: the key's or the address's bucket, or the 60-a-minute limit (then `RateLimit-Limit` is 60). The day has its own three headers, on every outline answer (200, 404 and both 429s): - `Outline-Quota-Limit`: 5000; - `Outline-Quota-Remaining`: outlines left today; - `Outline-Quota-Reset`: seconds until 00:00 UTC. A browser script can read all of them. ## Browser traffic A site that calls the API from the browser with a publishable key shares its visitors' address buckets with every other publishable-key user at those addresses (an office, a campus, a mobile carrier's gateway). Keep per-page calls few, debounce autocomplete, and move anything heavy to your server behind the secret key. ================================================================================ PAGE: Plans: Basic and Premium URL: https://docs.apidata.one/concepts/plans/ ================================================================================ # Plans: Basic and Premium Every account is on one of two plans. Both have the whole API except three Premium features. The key you send decides which plan a request gets, and a request that asks for a Premium feature on Basic is refused as a whole, never answered without it. ## What Premium adds | Feature | What it is | Where | | --- | --- | --- | | Place outlines | A place's boundary, to draw on a map | [`GET /v1/places/{placeId}/geometry`](https://docs.apidata.one/reference/endpoints/get-place-geometry.md) | | School districts | School districts as [places](https://docs.apidata.one/concepts/places.md): in autocomplete, in a search by `location.placeIds`, among a listing's `places`. And a listing's own district and schools | [`GET /v1/listings/{listingKey}/schools`](https://docs.apidata.one/reference/endpoints/get-listing-schools.md), `schoolDistricts` in [autocomplete](https://docs.apidata.one/guides/autocomplete.md) | | Shapes | A search or a map inside a shape the visitor draws, and shapes kept for a consumer | [Drawn shapes](https://docs.apidata.one/concepts/shapes.md), [saved shapes](https://docs.apidata.one/reference/saved-shapes.md) | Everything else is on both plans: search, the map, listing details, similar listings, autocomplete, places by ID, favorites, saved searches and their notices, webhooks and the events list, the disclosure texts, and the key list for sitemaps. A key's [rate limits](https://docs.apidata.one/concepts/rate-limits.md) are the same on both. The prices are on the [pricing page](https://apidata.one/pricing/). A Basic answer never holds a shape: a place is its names, its `center` and its `bbox`. ## Which plan a request gets - **A live key** gets the account's plan. - **A test key** gets the plan it was made with. When you make a test key in the portal you choose Basic or Premium, so you can build against either, whatever your live plan is, and before you have one ([the sandbox](https://docs.apidata.one/guides/sandbox.md#tiers-in-the-sandbox)). - [`GET /v1/account`](https://docs.apidata.one/reference/endpoints/get-account.md) says which: `tier` is the plan the key you sent gets. ## A Premium feature on Basic A request that asks for one is answered [`403 tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md), with `capability` naming what it asked for: `shapes` or `schools`. It is refused before anything else in the request is judged, and nothing is ignored silently: you never get the answer without the Premium part. Where an answer is a list that could hold a school district, a Basic key gets the list without them, since it asked for none: autocomplete with `types` left out, a listing's `places`, the places that hold a point, and a place's `parents`. A listing's detail has no `schools` on Basic. ## Changing plan You change plan on Stripe's billing page, which the portal's Billing page opens. An upgrade applies at once, a downgrade at the end of the month you paid for. Either applies from the next request, with the same keys: nothing in your site changes. After a downgrade nothing is deleted: - saved shapes stay stored. They can't be read or searched with until the account is Premium again, and then they are all back; - a saved search whose criteria need Premium reads `paused_tier` and sends no notices. It is active again with Premium, without catching up on what changed meanwhile ([saved searches](https://docs.apidata.one/reference/saved-searches.md#status)). ================================================================================ PAGE: Places URL: https://docs.apidata.one/concepts/places/ ================================================================================ # Places A **place** is a named area a listing can belong to. Every place has a random public ID (`pl_…`), a `kind`, a `displayName` that tells look-alikes apart, and a `center` and `bbox`. Search within a place by its ID on any tier; shapes for drawing are Premium only. ## Kinds | `kind` | What it is | Source | | ----------------- | ---------------------------------------------------------------------------- | --------------------------------------------- | | `state` | One of the seven jurisdictions, DC included | Census TIGER/Line | | `county` | A county or county equivalent. A city that is its own county (Philadelphia, Baltimore, the Virginia independent cities, Washington) is one `county` place flagged `cityCounty` | Census TIGER/Line | | `municipality` | A township, borough, city, town or village. In PA and NJ every inch of the state is in one | Census TIGER/Line (COUSUB in PA and NJ, PLACE elsewhere) | | `cdp` | A census-designated place: an unincorporated community with a Census outline | Census TIGER/Line | | `community` | An unincorporated community with no outline: a point with a 1-mile radius (a request may set 400 to 8,000 m) | USGS GNIS | | `zcta` | A ZIP code area (ZCTAs approximate ZIP codes; PO-box-only ZIPs have none) | Census TIGER/Line | | `postal_city` | A postal city as Bright's `City` field carries it. Its outline, where it has one, is the union of the ZIP areas it is the preferred city of, and is marked `approximate` | Bright lookups and ZCTAs | | `subdivision` | A subdivision as Bright's `SubdivisionName` carries it; no outline | Bright lookups and listings | | `school_district` | A unified, elementary or secondary school district (Premium) | NCES EDGE | Neighborhoods are not places yet. ## Display names Display names always disambiguate: `Washington Township, Berks County, PA`; `Media (borough), Delaware County, PA`; `Bethesda (CDP), Montgomery County, MD`; `Port Penn (community), New Castle County, DE`; `Baltimore (city), MD` beside `Baltimore County, MD`; `Washington, DC`; `19087 (ZIP code area), PA`; `Bryn Mawr (postal city), PA`; `Wynnewood Park (subdivision), Montgomery County, PA`. ## Hierarchy A place can lie in more than one parent: a CDP can cross a township line, and a city can span two counties. Each place lists its parents with the share of its area each one holds, and the largest share is the primary parent used in the display name. ## Memberships Each listing carries the IDs of the places it belongs to. - A listing with a shown address is placed by its coordinates in every county, municipality, CDP, ZIP area and school district whose boundary covers the point, plus its state, its postal city and its subdivision. - A listing whose address is withheld, or that has no coordinates, is placed only by its own fields: state, county, postal city, ZIP area (from its ZIP code), school district and subdivision, and in Pennsylvania and New Jersey its municipality. It is never placed in a CDP, never by a point, and never at (0,0). Memberships are computed when a listing is stored and recomputed whenever boundaries change. ## Shapes Shapes come in three zoom tiers, simplified and quantized (4 decimals at low and mid zoom, 5 at high zoom), clipped to the shoreline. Full-precision boundaries are used only on the server to decide memberships and are never returned. Shapes are a Premium feature; Basic responses carry no geometry beyond `center` and `bbox`. ## Sources and attribution Boundaries come from public-domain sources: Census TIGER/Line and cartographic boundary files, USGS GNIS and NCES EDGE. Each place carries `source`, `vintage` and, where a source requires it, `attribution`. School objects also carry `asOf` and the notice "School assignments are subject to change; verify with the school district." The table above names each source in words. The `source` field itself is a code, such as `census_tiger` or `nces_edge`; the [places reference](https://docs.apidata.one/reference.md#places) lists all six. ================================================================================ PAGE: Hidden addresses URL: https://docs.apidata.one/concepts/hidden-addresses/ ================================================================================ # Hidden addresses A seller may ask that a listing's address not be shown. Bright marks the listing, and apidata.one never stores the address, coordinates, directions, tax IDs or the exact tax and assessment amounts of such a listing: they are stripped as the data arrives, so no route and no bug can leak them. What you receive, and what to show: | Field | Withheld listing | | ----------------------------------------- | ---------------------------------------------------------------------- | | `address` | `null`, as a whole: no street, and no city, state or ZIP code either | | `addressDisplay` | `"withheld"` | | `addressNotice` | `"Contact Listing Agent for Additional Information"`: show it in place of the address | | `location` | `null`: no pin on the map, no spatial match | | `slug` | city, state and `listingKey` only (`ardmore-pa-805454359664`) | | `directions`, `taxId` | `null` | | `virtualTourUrl`, `media.links` | shown as for any listing: Bright does not require tours or videos to be hidden with the address. A tour page may itself name the street | | `openHouses` | `[]` | | `features` | without the building name and the exact tax and assessment amounts | | `places` (a listing's own answer only) | the places the listing belongs to, as for any listing: its city, county, ZIP code, subdivision and the rest, each a [PlaceRef](https://docs.apidata.one/reference/objects.md#placeref) | | a search result | carries no `places` and no part of the address: the notice is all there is to show | **What to show.** Put `addressNotice` where the address would be. On the listing's own page you may also say where the home is, from the names in its `places` (its city or its county, never anything finer than what `places` gives). A card in a list of results has only the notice. Don't take a city from the `slug` to print it: the slug is for the page's address. ## Finding them A withheld listing is found through its city, ZIP code, subdivision, county and place memberships, and by its MLS number, never through a bounding box, a radius, a community's mile or the map, and never through address autocomplete. `GET /v1/autocomplete` matches its MLS number and returns it with `address: null` and `addressDisplay: "withheld"`. ## Points outside the region A few listings carry a coordinate that lies in none of the seven jurisdictions (a Bright data error). Those are served with `location: null` while their address shows as usual; they are placed by their own fields and never appear on the map. ================================================================================ PAGE: Drawn shapes URL: https://docs.apidata.one/concepts/shapes/ ================================================================================ # Drawn shapes A Premium search or map can be limited to a shape the visitor draws: `location.shape` in the body of `POST /v1/listings/search` or `POST /v1/listings/map`. It combines with every other filter (AND). A key on a Basic account gets `403 tier_insufficient` with `capability: "shapes"`, before anything else about the request is judged. ```json { "status": ["active"], "price": { "max": 600000 }, "location": { "shape": { "type": "Polygon", "coordinates": [[[-75.32, 39.99], [-75.28, 39.99], [-75.28, 40.03], [-75.32, 40.03], [-75.32, 39.99]]] } } } ``` ## What is accepted - a GeoJSON `Polygon` with exactly **one ring** (no holes); - every position exactly `[longitude, latitude]`: two numbers, inside ±180 and ±90; - the ring **closed**: its last position repeats its first; - **3 to 200 corners**. The closing repeat isn't a corner, and a position that repeats the one before it is dropped; - the ring doesn't cross or touch itself. Either winding order is fine; - at most **5,000 km²**. The largest county in the region is about 4,035 km²; for a whole city or county, search its place with `location.placeIds` instead. Edges are straight lines in longitude and latitude, as a web map draws them. A drawn shape is `POST` only: in a query string, `location.shape` is `400 validation_failed`. One shape per request. To reuse a shape, [save it](https://docs.apidata.one/reference/saved-shapes.md) and send its `location.shapeId`, which also works in the `GET` forms. ## What it finds Listings whose point lies inside the shape or on its edge, and that pass the other filters. A listing whose address is withheld, a listing with no coordinates and a listing whose point lies outside the seven jurisdictions are **never** found or counted by a shape, however it is drawn: they are found through their city, ZIP code, subdivision and place memberships (see [hidden addresses](https://docs.apidata.one/concepts/hidden-addresses.md)). On the map, clusters are laid on a grid sized from the request's `bbox` if it has one, else from the shape's own bounding box. ## Errors A shape that isn't acceptable is refused with one of two codes, each with the field it came in (`location.shape`, or `geometry` when [saving](https://docs.apidata.one/reference/saved-shapes.md)) and a `reason`: | Code | `reason` | What was wrong | | --- | --- | --- | | [`shape_invalid`](https://docs.apidata.one/errors/shape_invalid.md) | `not_a_polygon` | not an object of `type: "Polygon"` with `coordinates` (a `MultiPolygon`, a `Feature`, a string) | | | `holes_not_allowed` | more than one ring | | | `bad_coordinate` | a position that isn't exactly two numbers in range (a third number, an elevation, is refused too) | | | `not_closed` | the last position doesn't repeat the first | | | `too_few_vertices` | fewer than three corners | | | `self_intersecting` | the ring crosses or touches itself | | [`shape_too_large`](https://docs.apidata.one/errors/shape_too_large.md) | `too_many_vertices` | more than 200 corners; the error carries `vertices` and `maxVertices` | | | `area_too_large` | more than 5,000 km²; the error carries `areaSqKm` and `maxAreaSqKm` | ```json { "error": { "code": "shape_invalid", "message": "The ring crosses or touches itself.", "fix": "…", "docs": "…/errors/shape_invalid", "requestId": "req_…", "fields": [ { "path": "location.shape", "problem": "self_intersecting", "expected": "…" } ], "field": "location.shape", "reason": "self_intersecting" } } ``` An error never repeats a coordinate. A body over 64 KiB is `400 validation_failed` naming the size, whatever it holds. ## A drawn shape is never kept The API doesn't store a drawn shape, write it to a log, or put it in a cursor or an error. Only a shape the consumer chooses to save is stored. A page cursor is bound to the shape it was made for: sent with another shape, it is `400 validation_failed` on `cursor`. ================================================================================ PAGE: Idempotency URL: https://docs.apidata.one/concepts/idempotency/ ================================================================================ # Idempotency Three requests save something for a consumer: `POST /v1/favorites`, `POST /v1/saved-shapes` and `POST /v1/saved-searches`. A fourth saves something for the account: `POST /v1/webhook-endpoints` ([below](#webhook-endpoints)). If the answer to one never arrives (a dropped connection, a timeout), sending it again could save twice. Send an `Idempotency-Key` header and the repeat is safe: ``` POST /v1/saved-shapes Idempotency-Key: <a new random UUID for this action> ``` ## The rules - **The key** is 1 to 255 printable ASCII characters. Use a new random value, such as a UUID, for each action, and repeat it only to retry that same request unchanged. Never build the key from the action itself: two visitors saving the same listing would then send the same key. A key outside those limits is `400 validation_failed` on `header.Idempotency-Key`. - **A repeat** with the same key and the same request, after the first succeeded, returns the first answer again, with its status and its `data`, and the header `Idempotency-Replayed: true`. Nothing is saved a second time. The envelope's `meta.requestId` is the repeat's own. "The same request" means the same route, the same consumer and the same JSON body; spacing and the order of an object's keys don't matter. - **A different request under a used key** is `409 idempotency_conflict`. So is the same key from another consumer of your account: keys are reserved per account, and one consumer's stored answer is never shown to another. - **A repeat while the first is still running** is `409 idempotency_conflict` with `Retry-After: 1`. Retry after that and you get the stored answer. - **Only successes are kept.** A request that ended in a 4xx or 5xx leaves nothing behind, so sending it again runs it again. - **A key answers for 24 hours.** After that it is free, and a request under it runs as new. - Records are deleted with the consumer (`DELETE /v1/clients/{clientId}`). Other routes ignore the header. In the browser, `Idempotency-Key` may be sent and `Idempotency-Replayed` read (CORS allows both). ## Webhook endpoints `POST /v1/webhook-endpoints` accepts the header too. It acts for the account, not for a consumer, and two things differ: - **A repeat never returns the secret.** A repeat of a registration that succeeded returns the same endpoint with `Idempotency-Replayed: true` and **without `secret`**: the secret is shown once and is never kept where it could be shown again. If the first answer was lost and you don't have the secret, delete the endpoint (`DELETE /v1/webhook-endpoints/{id}`) and create it again with a new key. - **Registration takes time,** because it waits for your endpoint to answer a ping. A repeat that arrives while the first request is still pinging is `409 idempotency_conflict` with `Retry-After: 1`, and only one ping is sent. A registration that failed (the ping was refused or not answered) leaves nothing behind: the same key runs it again. ## Without a key Both requests are already safe to repeat in the simple case: saving a listing the consumer has saved before returns the existing favorite with `200`. A saved shape has no such natural identity, so a repeat without a key saves a second shape. Send the key. ================================================================================ PAGE: Webhooks and notices URL: https://docs.apidata.one/concepts/webhooks/ ================================================================================ # Webhooks and notices When something happens that your site should act on, the API records a **notice**: a saved search has new matches, a favorite changed, a listing was removed, your account was suspended or reinstated, live data stopped or came back. You get notices in one of two ways, or both: - **Webhooks:** you [register an endpoint](https://docs.apidata.one/reference/webhook-endpoints.md) (an `https://` URL on your server) and the API sends each notice to it as a signed `POST`. - **The events list:** your server asks [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md) for the notices since the last one it handled. Use this when your server has no public address, or to catch up after an outage. A notice is thin on purpose: **IDs and the kind of change, never listing content.** No price, address, remarks, photo or name is ever in a notice. When you act on one, fetch the listing through the API, so what you show or send is current and carries its [`compliance`](https://docs.apidata.one/reference/compliance.md) block. apidata.one never emails your visitors: your site sends its own ([alert emails](https://docs.apidata.one/guides/alert-emails.md)). Every tier has notices, webhooks and the events list. They are per environment: a `test` key sees the sandbox's, a `live` key the live ones. The [sandbox](https://docs.apidata.one/guides/sandbox.md) changes by itself every 5 minutes, so its saved searches and favorites produce real notices, and a [sandbox trigger](https://docs.apidata.one/reference/sandbox-triggers.md) makes one on demand. ## The notice ```json { "id": "evt_3yQ8mT1xKp7Zc2Nf5Rb9Wd", "type": "saved_search.matches", "createdAt": "2026-11-10T15:00:00.000Z", "accountId": "0b9f6c1e-52a7-4c3e-9d41-7a6f0c2b8e15", "clientId": "visitor-8841", "savedSearchId": "ss_Hq2Lw9Xc4Vb7Nm1Kp6Tz3R", "listingKeys": ["300451207716"], "changes": [{ "listingKey": "300451207716", "reasons": ["new"] }] } ``` | Field | Meaning | | --------------- | ----------------------------------------------------------------------------------- | | `id` | The notice's ID, `evt_…`. The same notice always has the same ID: de-duplicate by it | | `type` | One of the seven types below | | `createdAt` | When the notice was recorded | | `accountId` | Your account | | `clientId` | The consumer it concerns. Only on the three consumer types | | `savedSearchId` | The saved search. Only on `saved_search.matches` | | `listingKeys` | The listings concerned, at most 500. Empty on the account and data types | | `changes` | What happened, by type (below). Always an array | The webhook's body and the events list's item are the same JSON. ## The seven types | Type | For | Recorded when | `changes` | | -------------------------- | ------------ | ------------------------------------------------------------------------- | ------------------------------------------------------ | | `saved_search.matches` | one consumer | listings that match a saved search are new or changed, at its `alertFrequency` | `[{ "listingKey": "…", "reasons": ["new"] }]` | | `favorite.listing_updated` | one consumer | a sync cycle changed one or more of the consumer's favorites | `[{ "listingKey": "…", "kinds": ["price"] }]` | | `favorite.listing_removed` | one consumer | favorites of the consumer were removed from the data | `["removed"]` | | `listing.removed` | the account | listings were removed from the data | `["removed"]` | | `account.suspended` | the account | the account was suspended | `["suspended"]` | | `account.reinstated` | the account | the account was reinstated | `["reinstated"]` | | `data.stale` | the account | live listing data stopped being served, and again when serving resumed | `["started"]` or `["ended"]` | - **`saved_search.matches`:** one entry per listing, in the order of `listingKeys`. `reasons` holds one or more of `new` (the listing is new to the data), `price_change`, `status_change` and `back_on_market` (Active again after Pending or Active Under Contract). A notice names only listings that match the search at the moment it is made, and never one the consumer's own search through the API wouldn't return. Listings that matched when the search was created never alert. More than 500 matches are split over several notices. - **`favorite.listing_updated`:** one entry per listing. `kinds` holds one or more of `price`, `status`, `photos` and `open_house`. - **`favorite.listing_removed` and `listing.removed`:** the listings in `listingKeys` are gone from the data. **Delete every copy you stored** (a cached page, a row in your database, an image). A removed favorite is deleted on our side too. On live, every account gets `listing.removed` for every removal, whether or not it ever showed the listing. In the [sandbox](https://docs.apidata.one/guides/sandbox.md#removal-notices-in-the-sandbox) an account gets it only while it is looking: see there. - **`data.stale`:** `["started"]` means live listing routes now answer [`500 data_stale`](https://docs.apidata.one/errors/data_stale.md); `["ended"]` means they answer again. - **`account.suspended` and `account.reinstated`:** see [suspension](#suspension-and-reinstatement) below. A **`ping`** is not a notice. It is sent only to an endpoint that is being registered or tested, and never appears in the events list: ```json { "id": "dlv_7Jc4Xn2Qw8Lm5Vt1Zr9Kb3", "type": "ping", "createdAt": "2026-11-10T15:00:00.000Z", "accountId": "0b9f6c1e-52a7-4c3e-9d41-7a6f0c2b8e15", "listingKeys": [], "changes": [] } ``` Answer it with a 2xx, whether or not its signature verifies, and do nothing else with it ([why](#receiving-a-webhook)). Its `id` is its delivery's ID. ## Receiving a webhook Each notice is sent to every enabled endpoint of the account whose `eventTypes` include its type, as: ``` POST /your/path HTTP/1.1 Content-Type: application/json User-Agent: apidata.one-webhooks/1 ApiData-Signature: t=1794322802,v1=<64 hex characters> ApiData-Event-Id: evt_… ApiData-Event-Type: saved_search.matches ApiData-Delivery-Id: dlv_… ApiData-Attempt: 1 {"id":"evt_…","type":"saved_search.matches", … } ``` | Header | Meaning | | --------------------- | -------------------------------------------------------------------------- | | `ApiData-Signature` | Proof that the request is ours and fresh. [Verify it](#verifying-the-signature) | | `ApiData-Event-Id` | The notice's ID (for a ping, the delivery's ID) | | `ApiData-Event-Type` | The notice's type, or `ping` | | `ApiData-Delivery-Id` | This notice's delivery to this endpoint, as the delivery list shows it | | `ApiData-Attempt` | 1 for the first attempt, 2 for the first retry, and so on | What your endpoint must do, in this order: 1. **Answer every `ping` with a 2xx, and never act on one.** A ping is a request whose `ApiData-Event-Type` header is `ping`. Answer it 2xx **whether or not its signature verifies**: the ping that registers an endpoint is signed with a secret you haven't been given yet. A ping carries nothing, so there is nothing to act on. 2. **Until the endpoint's secret is stored on your server, answer every other request `503`.** It is then retried for 24 hours, by which time the secret is in place, and nothing is lost. Never answer 2xx to a notice you can't verify: a 2xx means "received", and that notice is never sent again. 3. **Once the secret is stored, verify every other request**, and answer one that fails `400`. 4. **Answer a verified notice with any 2xx within 10 seconds.** Store the notice or put it on a queue, answer, and do the work afterwards. Fetching listings or sending email before you answer is the usual cause of timeouts. 5. **De-duplicate by `id`.** A notice can arrive more than once (your 2xx was lost on the way and we retried), and notices can arrive out of order. Keep the IDs you have handled for at least 30 days. **Deliveries start the moment an endpoint is saved**, which is before your server has stored its secret. A new endpoint receives every notice given out after it is saved, and that can include one recorded a few seconds before. Rule 2 covers them: they are answered `503` and come again, the first time a minute later. What counts as a failure: any status that isn't 2xx, **a redirect (never followed)**, no answer within 10 seconds, a TLS certificate that doesn't verify for your host name, or no connection. At most 64 KiB of your answer is read, and none of it is kept. **Retries.** A failed delivery is tried again after 1, 2, 4, 8, 16, 32, 64 and 128 minutes, then about every 4 hours, with the last attempt 24 hours after the first: 14 attempts at most. After that the delivery is `failed` and is not sent again. The notice itself stays in [the events list](https://docs.apidata.one/reference/endpoints/list-events.md) for its 30 days, so a server that was down for longer catches up from there. The [delivery list](https://docs.apidata.one/reference/endpoints/list-webhook-deliveries.md) shows every delivery of the last 30 days with its attempts and last result. **Pace.** At most two requests at a time go to one endpoint, and one at a time while its last attempt failed. **Your address is checked on every attempt.** The host name is resolved again each time, and the request is refused (`refused_destination`) unless every address it resolves to is public. Private, loopback, link-local and other reserved ranges are never called. ## Verifying the signature Anyone can send a `POST` to your URL. The signature proves a request came from us, for your endpoint, just now: ``` ApiData-Signature: t={unix seconds},v1={hex HMAC-SHA256(secret, t + "." + body)} ``` - `secret` is the endpoint's secret (`whsec_…`), the whole string exactly as it was shown when you created the endpoint. It is shown **once**: keep it on your server like a password. If you lose it, delete the endpoint and create it again. - `t` is the time of this attempt in Unix seconds. Every attempt is signed afresh. - `body` is the request body **exactly as received, byte for byte**. Verify before you parse the JSON: a parsed and re-serialized body is not the same bytes. To verify: compute the HMAC yourself, compare it with `v1` **in constant time**, and **refuse a timestamp more than 5 minutes from your clock** (that stops a recorded request from being replayed later). Read only `t` and `v1`, and ignore any other part of the header. Answer a request that fails with `400` and do nothing else with it. **The first ping can't be verified.** When you [register an endpoint](https://docs.apidata.one/reference/endpoints/create-webhook-endpoint.md), its ping arrives before you have been given the secret, which comes in the answer to that same request. That is why every ping is answered 2xx whatever its signature says. It holds for a second endpoint too: each endpoint has its own secret, and the new one's first ping is signed with the new secret, not with one you already hold. **To check that your verification works,** send [`POST …/{id}/test`](https://docs.apidata.one/reference/endpoints/test-webhook-endpoint.md) once the secret is stored, and log whether its ping verified. A test ping is signed with the secret you hold. The three functions below are complete and have no dependencies. They are also in this repository as runnable files, with the test vectors: [`verify.mjs`](https://docs.apidata.one/webhooks/verify.mjs), [`verify.py`](https://docs.apidata.one/webhooks/verify.py), [`verify.php`](https://docs.apidata.one/webhooks/verify.php) and [`vectors.json`](https://docs.apidata.one/webhooks/vectors.json). ### Node.js ```js import { createHmac, timingSafeEqual } from 'node:crypto'; /** * True when `header` is a valid ApiData-Signature for `body` under `secret`. * * secret the endpoint's secret, exactly as it was shown when the endpoint was created * header the value of the ApiData-Signature header * body the request body exactly as received: a Buffer, before any JSON parsing * now the current time in Unix seconds (left out: the clock) */ export function verifyWebhook(secret, header, body, now = Math.floor(Date.now() / 1000)) { if (typeof secret !== 'string' || secret === '' || typeof header !== 'string') return false; let timestamp = null; const signatures = []; for (const part of header.split(',')) { const at = part.indexOf('='); if (at < 0) continue; const name = part.slice(0, at); const value = part.slice(at + 1); if (name === 't') timestamp = value; else if (name === 'v1') signatures.push(value); } if (timestamp === null || !/^[0-9]{1,15}$/.test(timestamp)) return false; // Refuse a timestamp more than five minutes from now, in either direction. if (Math.abs(now - Number(timestamp)) > 300) return false; const expected = Buffer.from( createHmac('sha256', secret).update(`${timestamp}.`).update(body).digest('hex'), ); let valid = false; for (const signature of signatures) { const given = Buffer.from(signature); // Constant time: never compare signatures with === . if (given.length === expected.length && timingSafeEqual(given, expected)) valid = true; } return valid; } ``` With Express, take the raw body for the webhook route, not the parsed one. The handler follows the rules [above](#receiving-a-webhook) in their order: ```js app.post('/webhooks/apidata', express.raw({ type: 'application/json' }), (req, res) => { const secret = process.env.APIDATA_WEBHOOK_SECRET; // this endpoint's own secret, once stored const verified = Boolean(secret) && verifyWebhook(secret, req.get('ApiData-Signature'), req.body); if (req.get('ApiData-Event-Type') === 'ping') { console.log(`apidata ping, verified: ${verified}`); return res.status(204).end(); // every ping: 2xx, verified or not, and nothing else } if (!secret) return res.status(503).end(); // no secret stored yet: retried, never lost if (!verified) return res.status(400).end(); const notice = JSON.parse(req.body.toString('utf8')); queue.add(notice); // answer first, work afterwards res.status(204).end(); }); ``` ### Python ```python import hashlib import hmac import time def verify_webhook(secret, header, body, now=None): """True when `header` is a valid ApiData-Signature for `body` under `secret`. secret the endpoint's secret, exactly as it was shown when the endpoint was created header the value of the ApiData-Signature header body the request body exactly as received: bytes, before any JSON parsing now the current time in Unix seconds (left out: the clock) """ if not isinstance(secret, str) or secret == "" or not isinstance(header, str): return False if isinstance(body, str): body = body.encode("utf-8") if now is None: now = int(time.time()) timestamp = None signatures = [] for part in header.split(","): name, found, value = part.partition("=") if not found: continue if name == "t": timestamp = value elif name == "v1": signatures.append(value) if timestamp is None or not (timestamp.isascii() and timestamp.isdigit()): return False if len(timestamp) > 15: return False # Refuse a timestamp more than five minutes from now, in either direction. if abs(now - int(timestamp)) > 300: return False signed = timestamp.encode("ascii") + b"." + body expected = hmac.new(secret.encode("utf-8"), signed, hashlib.sha256).hexdigest() valid = False for signature in signatures: # Constant time: never compare signatures with == . if hmac.compare_digest(expected.encode("ascii"), signature.encode("utf-8")): valid = True return valid ``` With Flask, the same rules in the same order: ```python import json import os from flask import Flask, request app = Flask(__name__) @app.post("/webhooks/apidata") def apidata_webhook(): secret = os.environ.get("APIDATA_WEBHOOK_SECRET", "") # this endpoint's own secret, once stored body = request.get_data() verified = verify_webhook(secret, request.headers.get("ApiData-Signature", ""), body) if request.headers.get("ApiData-Event-Type") == "ping": app.logger.info("apidata ping, verified: %s", verified) return "", 204 # every ping: 2xx, verified or not, and nothing else if not secret: return "", 503 # no secret stored yet: retried, never lost if not verified: return "", 400 queue.put(json.loads(body)) # answer first, work afterwards return "", 204 ``` With Django, the header is `request.headers.get("ApiData-Signature", "")` and the body is `request.body`. ### PHP ```php /** * True when $header is a valid ApiData-Signature for $body under $secret. * * $secret the endpoint's secret, exactly as it was shown when the endpoint was created * $header the value of the ApiData-Signature header: $_SERVER['HTTP_APIDATA_SIGNATURE'] * $body the request body exactly as received: file_get_contents('php://input') * $now the current time in Unix seconds (left out: the clock) */ function apidata_verify_webhook(string $secret, string $header, string $body, ?int $now = null): bool { if ($secret === '') { return false; } $now = $now ?? time(); $timestamp = null; $signatures = []; foreach (explode(',', $header) as $part) { $at = strpos($part, '='); if ($at === false) { continue; } $name = substr($part, 0, $at); $value = (string) substr($part, $at + 1); if ($name === 't') { $timestamp = $value; } elseif ($name === 'v1') { $signatures[] = $value; } } if ($timestamp === null || preg_match('/^[0-9]{1,15}$/D', $timestamp) !== 1) { return false; } // Refuse a timestamp more than five minutes from now, in either direction. if (abs($now - (int) $timestamp) > 300) { return false; } $expected = hash_hmac('sha256', $timestamp . '.' . $body, $secret); $valid = false; foreach ($signatures as $signature) { // Constant time: never compare signatures with == or === . if (hash_equals($expected, $signature)) { $valid = true; } } return $valid; } ``` The same rules in the same order: ```php $secret = getenv('APIDATA_WEBHOOK_SECRET') ?: ''; // this endpoint's own secret, once stored $body = file_get_contents('php://input'); $verified = apidata_verify_webhook($secret, $_SERVER['HTTP_APIDATA_SIGNATURE'] ?? '', $body); if (($_SERVER['HTTP_APIDATA_EVENT_TYPE'] ?? '') === 'ping') { error_log('apidata ping, verified: ' . ($verified ? 'yes' : 'no')); http_response_code(204); // every ping: 2xx, verified or not, and nothing else exit; } if ($secret === '') { http_response_code(503); // no secret stored yet: retried, never lost exit; } if (!$verified) { http_response_code(400); exit; } $notice = json_decode($body, true); // store the notice or queue it here; answer first, work afterwards http_response_code(204); ``` ### Test vectors [`vectors.json`](https://docs.apidata.one/webhooks/vectors.json) holds 16 cases: the secret, the timestamp, the body, the header, the time on your clock (`now`, Unix seconds) and whether verification must pass. They include a valid signature, **a tampered body**, **an old timestamp**, a timestamp from the future, a refreshed timestamp on an old signature, another secret, and an empty secret. Run your own code against all of them before you rely on it. Each of the three files answers one case on standard input: ``` echo '{"secret":"whsec_…","header":"t=…,v1=…","body":"{…}","now":1794322803}' | node verify.mjs ``` and prints `true` or `false` (`python verify.py` and `php verify.php` work the same way). ## Suspension and reinstatement While your account is suspended: - **Nothing is sent** to any endpoint, and `GET /v1/events` answers [`403 account_suspended`](https://docs.apidata.one/errors/account_suspended.md). - Saved searches read `paused_suspended` and produce no notices, and favorites produce no change notices. Changes that happen during the suspension never alert later. - Removal notices (`listing.removed`, `favorite.listing_removed`) and `account.suspended` are still recorded. When the account is reinstated, `account.reinstated` is recorded. **Notices more than 24 hours old at that moment are dropped**, from deliveries and from the events list alike; the rest go out. **After a reinstatement, re-check every listing page or copy you stored.** The dropped notices can include removals. For each listing you kept, ask [`GET /v1/listings/{listingKey}`](https://docs.apidata.one/reference/endpoints/get-listing.md) again: [`404 listing_not_found`](https://docs.apidata.one/errors/listing_not_found.md) means delete it, and anything else replaces what you had. Do this when you receive `account.reinstated`. ## When a notice is late - **During a data stop** (between `data.stale` `started` and `ended`), saved-search and favorite change notices wait, and are worked out when the data is fresh again. Removal notices and `data.stale` itself are never held. - **A sync cycle that changes far more listings than usual** is held for a person to look at before any alert goes out. It is then released, and its notices arrive late, or discarded, and they never arrive. This protects your visitors from a flood of alerts caused by a data repair. - **Daily and weekly searches** are gathered at 7:00 am Eastern (weekly on Mondays), and name only listings that still match at that moment. ## Limits | What | Limit | | ---------------------------------------- | --------------------------------------------- | | Endpoints per account | 10 | | Listing keys in one notice | 500 | | Time to answer a webhook | 10 seconds | | Attempts per delivery | 14, over 24 hours | | Notices and deliveries kept | 30 days | | Endpoint registrations and tests | 10 in any 10 minutes, per account | ================================================================================ PAGE: Reference URL: https://docs.apidata.one/reference/ ================================================================================ # Reference Every endpoint, by group. Each page says who may call the endpoint, what it takes, what it answers field by field, and which errors it can answer. The same is in the [OpenAPI document](https://docs.apidata.one/openapi.json). ## Listings - [`GET /v1/listings`](https://docs.apidata.one/reference/endpoints/search-listings.md): Search listings, with the filters as query keys - [`GET /v1/listings/{listingKey}`](https://docs.apidata.one/reference/endpoints/get-listing.md): One listing, in full - [`GET /v1/listings/{listingKey}/schools`](https://docs.apidata.one/reference/endpoints/get-listing-schools.md): A listing's school district, and the schools its agent entered. Premium. - [`GET /v1/listings/{listingKey}/similar`](https://docs.apidata.one/reference/endpoints/get-similar-listings.md): Listings like this one: same city and class, near its price and size - [`GET /v1/listings/keys`](https://docs.apidata.one/reference/endpoints/list-listing-keys.md): Every served listing's key and last change time, for a sitemap. Secret key only. - [`GET /v1/listings/map`](https://docs.apidata.one/reference/endpoints/map-listings.md): Pins and clusters for a map, with the filters as query keys - [`POST /v1/listings/map`](https://docs.apidata.one/reference/endpoints/map-listings-body.md): Pins and clusters for a map, with the filters as a JSON body - [`POST /v1/listings/search`](https://docs.apidata.one/reference/endpoints/search-listings-body.md): Search listings, with the filters as a JSON body ## Search box - [`GET /v1/autocomplete`](https://docs.apidata.one/reference/endpoints/autocomplete.md): Suggestions for a search box: places, ZIP codes, addresses and MLS numbers ## Places - [`GET /v1/places/{placeId}`](https://docs.apidata.one/reference/endpoints/get-place.md): A place's names, center and bounding box - [`GET /v1/places/{placeId}/geometry`](https://docs.apidata.one/reference/endpoints/get-place-geometry.md): A place's outline, simplified for a map zoom. Premium. - [`GET /v1/places/containing`](https://docs.apidata.one/reference/endpoints/get-places-containing.md): The places that hold a point ## Consumers - [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md): Mint a short-lived token that lets a browser act for one consumer. Secret key only. - [`DELETE /v1/clients/{clientId}`](https://docs.apidata.one/reference/endpoints/delete-client.md): Delete everything stored for one consumer. Secret key only. ## Favorites - [`GET /v1/favorites`](https://docs.apidata.one/reference/endpoints/list-favorites.md): A consumer's favorites, newest first - [`POST /v1/favorites`](https://docs.apidata.one/reference/endpoints/create-favorite.md): Save a listing for a consumer - [`GET /v1/favorites/{id}`](https://docs.apidata.one/reference/endpoints/get-favorite.md): One favorite - [`DELETE /v1/favorites/{id}`](https://docs.apidata.one/reference/endpoints/delete-favorite.md): Remove a favorite ## Saved searches - [`GET /v1/saved-searches`](https://docs.apidata.one/reference/endpoints/list-saved-searches.md): A consumer's saved searches, newest first - [`POST /v1/saved-searches`](https://docs.apidata.one/reference/endpoints/create-saved-search.md): Save a search for a consumer, with how often it alerts - [`GET /v1/saved-searches/{id}`](https://docs.apidata.one/reference/endpoints/get-saved-search.md): One saved search - [`PATCH /v1/saved-searches/{id}`](https://docs.apidata.one/reference/endpoints/update-saved-search.md): Change a saved search's name, criteria or alert frequency - [`DELETE /v1/saved-searches/{id}`](https://docs.apidata.one/reference/endpoints/delete-saved-search.md): Delete a saved search ## Saved shapes - [`GET /v1/saved-shapes`](https://docs.apidata.one/reference/endpoints/list-saved-shapes.md): A consumer's saved shapes, newest first, without their geometry. Premium. - [`POST /v1/saved-shapes`](https://docs.apidata.one/reference/endpoints/create-saved-shape.md): Save a shape a consumer drew. Premium. - [`GET /v1/saved-shapes/{id}`](https://docs.apidata.one/reference/endpoints/get-saved-shape.md): One saved shape, with its geometry. Premium. - [`DELETE /v1/saved-shapes/{id}`](https://docs.apidata.one/reference/endpoints/delete-saved-shape.md): Delete a saved shape. Premium. ## Webhooks and notices - [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md): The account's notices, oldest first: the pull alternative to webhooks. Secret key only. - [`GET /v1/webhook-endpoints`](https://docs.apidata.one/reference/endpoints/list-webhook-endpoints.md): The account's webhook endpoints, newest first. Secret key only. - [`POST /v1/webhook-endpoints`](https://docs.apidata.one/reference/endpoints/create-webhook-endpoint.md): Register an address for notices; its secret is shown once, in this answer. Secret key only. - [`GET /v1/webhook-endpoints/{id}`](https://docs.apidata.one/reference/endpoints/get-webhook-endpoint.md): One webhook endpoint. Secret key only. - [`PATCH /v1/webhook-endpoints/{id}`](https://docs.apidata.one/reference/endpoints/update-webhook-endpoint.md): Change an endpoint's notice types or description, or pause it. Secret key only. - [`DELETE /v1/webhook-endpoints/{id}`](https://docs.apidata.one/reference/endpoints/delete-webhook-endpoint.md): Delete an endpoint, with its secret and its delivery list. Secret key only. - [`GET /v1/webhook-endpoints/{id}/deliveries`](https://docs.apidata.one/reference/endpoints/list-webhook-deliveries.md): An endpoint's deliveries of the last 30 days, newest first. Secret key only. - [`POST /v1/webhook-endpoints/{id}/test`](https://docs.apidata.one/reference/endpoints/test-webhook-endpoint.md): Send a signed ping to an endpoint. Secret key only. ## Account - [`GET /v1/account`](https://docs.apidata.one/reference/endpoints/get-account.md): Your account: its plan, status, website addresses and, for a secret key, its keys - [`GET /v1/compliance`](https://docs.apidata.one/reference/endpoints/get-compliance.md): Every disclosure text, for footers and email templates - [`GET /v1/lookups/{name}`](https://docs.apidata.one/reference/endpoints/get-lookup.md): One of the API's lists of values, with a label for each - [`GET /v1/status`](https://docs.apidata.one/reference/endpoints/get-status.md): Whether the service runs and how fresh its data is. No key needed ## Sandbox - [`POST /v1/sandbox/triggers`](https://docs.apidata.one/reference/endpoints/create-sandbox-trigger.md): Make a change happen in the sandbox now: a match, a favorite that changes, a removal. Secret key only. Sandbox only. - [`GET /v1/sandbox/triggers/{id}`](https://docs.apidata.one/reference/endpoints/get-sandbox-trigger.md): How a sandbox trigger ended. Secret key only. Sandbox only. ## Objects and topics - [Objects](https://docs.apidata.one/reference/objects.md): every object, field by field - [Compliance](https://docs.apidata.one/reference/compliance.md) - [Favorites](https://docs.apidata.one/reference/favorites.md) - [Listings](https://docs.apidata.one/reference/listings.md) - [Sandbox triggers](https://docs.apidata.one/reference/sandbox-triggers.md) - [Saved searches](https://docs.apidata.one/reference/saved-searches.md) - [Saved shapes](https://docs.apidata.one/reference/saved-shapes.md) - [Webhook endpoints](https://docs.apidata.one/reference/webhook-endpoints.md) _This page is made from the API's own declarations by `npm run openapi`. To change it, change the declaration or its explanation, never this file._ ================================================================================ PAGE: GET /v1/listings URL: https://docs.apidata.one/reference/endpoints/search-listings/ ================================================================================ # GET /v1/listings Search listings, with the filters as query keys. | 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 | ## Query The search's filters as query keys: dotted keys for nested fields, commas between the items of a list, and `Name|ST` for a city or a subdivision. The same search as a JSON body is a [SearchRequest](https://docs.apidata.one/reference/objects.md#searchrequest), where each filter is described. | Key | Example | Description | | --- | --- | --- | | `status` | `active,pending` | Statuses, separated by commas. Left out: active. | | `propertyClass` | `residential,land` | Property classes, separated by commas. | | `structureType` | `detached,condo_apartment` | Structure types, separated by commas. | | `price.min` | `300000` | The lowest list price, in US dollars. | | `price.max` | `450000` | The highest list price, in US dollars. | | `beds.min` | `3` | The lowest number of bedrooms. | | `beds.max` | `5` | The highest number of bedrooms. | | `baths.min` | `2` | The lowest number of baths, a half bath counting half. | | `baths.max` | `3.5` | The highest number of baths, a half bath counting half. | | `livingAreaSqft.min` | `1500` | The lowest living area, in square feet. | | `livingAreaSqft.max` | `3000` | The highest living area, in square feet. | | `lotSizeAcres.min` | `0.25` | The lowest lot size, in acres. | | `lotSizeAcres.max` | `2` | The highest lot size, in acres. | | `yearBuilt.min` | `1990` | The lowest year built. | | `yearBuilt.max` | `2020` | The highest year built. | | `closeDate.from` | `2026-01-01` | Closed on or after this day. | | `closeDate.to` | `2026-06-30` | Closed on or before this day. | | `keywords` | `fenced yard` | Words searched in the public remarks and the feature lists. | | `location.placeIds` | `pl_…,pl_…` | Place IDs, separated by commas: any kind on every plan, except school districts, which are Premium. | | `location.postalCodes` | `19003,19041` | ZIP codes, separated by commas. | | `location.cities` | `Bryn Mawr\|PA,Dover\|DE` | Cities as Name\|ST, separated by commas. | | `location.subdivisions` | `Wynnewood Park\|PA` | Subdivisions as Name\|ST, separated by commas. | | `location.bbox` | `-75.42,40.00,-75.30,40.08` | minLng,minLat,maxLng,maxLat. | | `location.radius.center` | `-75.3,40.01` | lng,lat. | | `location.radius.meters` | `1609` | The radius in metres. Alone, with one community among the place IDs: that community's radius, from 400 to 8000. | | `location.shapeId` | `shp_…` | Premium. A saved shape's ID, of the consumer the request acts for. | | `listAgentMlsId` | `3012345` | The listing or co-listing agent's MLS ID. | | `listOfficeMlsId` | `OFFICE1` | The listing or co-listing office's MLS ID. | | `openHouse.from` | `2026-12-05` | An open house on or after this day. | | `openHouse.to` | `2026-12-06` | An open house on or before this day. | | `modifiedSince` | `2026-11-01T00:00:00Z` | Changed at or after this instant. | | `hasBasement` | `true` | true to require it. | | `hasFireplace` | `true` | true to require it. | | `hasPool` | `true` | true to require it. | | `seniorCommunity` | `true` | true to require it. | | `petsAllowed` | `true` | true to require it. | | `newConstruction` | `true` | true to require it. | | `waterfront` | `true` | true to require it. | | `garage` | `true` | true to require it. | | `sort` | `newest` | One of price_asc, price_desc, newest, beds_desc, baths_desc, sqft_desc, close_date_desc, distance. Left out: price_asc. | | `limit` | `24` | 1 to 100. Left out: 24. | | `cursor` | `c_…` | The previous page's nextCursor. | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | Optional, with a publishable key: a token your server minted for a consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/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. | ## Answers ### 200: One page of listings, with the count, the disclosures and any warnings The answer is `{ data, meta, compliance, warnings }`: `meta` holds `requestId`, `environment` and `dataLastUpdatedAt`; [`compliance`](https://docs.apidata.one/reference/objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](https://docs.apidata.one/reference/objects.md#warning), empty when there is nothing to say. `data` is a list of [ListingSummary](https://docs.apidata.one/reference/objects.md#listingsummary). `meta.page` is a [SearchPage](https://docs.apidata.one/reference/objects.md#searchpage). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`pagination_limit_reached`](https://docs.apidata.one/errors/pagination_limit_reached.md), [`shape_invalid`](https://docs.apidata.one/errors/shape_invalid.md), [`shape_too_large`](https://docs.apidata.one/errors/shape_too_large.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More One search schema, two forms. `POST /v1/listings/search` takes it as a JSON body; `GET /v1/listings` takes it flattened into query keys (one request, cacheable, linkable): | Body | Query | | ------------------------------------------------- | -------------------------------------------------------- | | `{ "price": { "min": 300000, "max": 450000 } }` | `price.min=300000&price.max=450000` | | `{ "status": ["active", "pending"] }` | `status=active,pending` | | `{ "location": { "placeIds": ["pl_a", "pl_b"] } }`| `location.placeIds=pl_a,pl_b` | | `{ "location": { "bbox": [-75.42, 40.00, -75.30, 40.08] } }` | `location.bbox=-75.42,40.00,-75.30,40.08` | | `{ "location": { "cities": [{ "name": "Bryn Mawr", "state": "PA" }] } }` | `location.cities=Bryn Mawr\|PA` | | `{ "location": { "radius": { "center": [-75.3, 40.01], "meters": 1609 } } }` | `location.radius.center=-75.3,40.01&location.radius.meters=1609` | | `{ "hasPool": true }` | `hasPool=true` | Dotted keys build nested objects, commas separate list items, and cities and subdivisions are `Name|ST` items. A key outside the schema is `400 validation_failed` naming it, in both forms; every problem in a request is reported at once in `fields`. `location.shape` (a drawn shape) exists in the body form only. ### Filters Each filter is described where it is listed: as a query key on the page of `GET /v1/listings`, and as a field of the body under [SearchRequest](https://docs.apidata.one/reference/objects.md#searchrequest). Every filter is optional, and they combine with AND. `location.schoolIds` is not available: search by individual school waits for attendance-zone data. It is `403 tier_insufficient` on Basic and `400 validation_failed` on Premium. Search a **school district** with its place ID in `location.placeIds` (Premium). A Premium field sent with a key on a Basic account is `403 tier_insufficient` with `capability` (`shapes` or `schools`), before anything else in the request is judged; it is never ignored. `location.schoolDistrictIds` no longer exists (a school district is a place): it is `400 validation_failed` as an unknown key. Location kinds combine with AND. Spatial kinds (`bbox`, `radius`, a drawn or saved shape, a community place, the map) match listings with a shown address and a point inside the seven jurisdictions only, so a hidden-address listing is found through its city, ZIP, subdivision or place memberships, never through a shape. Filters that mean nothing for some classes (beds and baths for land and commercial listings, living area for land) apply only where they mean something; those listings stay in the results and the response carries the warning `filter_not_applicable`. That warning is about the search, not about the page you got. It comes whenever `beds`, `baths` or `livingAreaSqft` is sent and the search could return a class the filter means nothing for, even when every listing on this page is a house. Its `message` names those classes and its `fix` says how to leave them out: add a `propertyClass` filter with the classes you want, such as `propertyClass=residential`. With that, the filter applies to everything the search can return, and no warning comes. A site that searches homes only should send `propertyClass` on every search; one that shows land and commercial listings beside homes can ignore the warning. ### Newest first `sort=newest` orders every listing by its **latest status change**, newest first: a new listing, one back on the market, a move under contract or a close. A listing back on the market counts as new again. - Every status is in the one timeline. A Coming Soon listing sorts by its status change like any other, not by its expected on-market date. - A listing whose days on market Bright hides sorts like the rest. A sort shows an order, never a date or a count: such a listing still has no `daysOnMarket`. - Listings that changed at the same moment come in a fixed order, and a listing with no status change comes last. - The sandbox sorts the same way as live. ### Prices Bright hides When Bright flags a listing's prices as not for display, its price fields are null, it can't match a price filter, and price sorts put it last in both directions. Likewise a listing with hidden price history has no `priceHistory`, and one with hidden days-on-site has no `daysOnMarket` or on-market dates. ### Response ```json { "data": [ { "listingKey": "805454359664", "…": "a ListingSummary" } ], "meta": { "requestId": "req_…", "page": { "limit": 24, "nextCursor": "c_…", "total": 1234, "totalIsCapped": false }, "dataLastUpdatedAt": "2026-11-10T14:59:00.000Z", "environment": "live" }, "compliance": { "…": "the compliance block" }, "warnings": [ { "code": "close_date_clamped", "message": "…", "fix": "…" } ] } ``` `total` is exact up to 10,000 and `totalIsCapped` says when it stopped counting. Pages are read with `cursor` (opaque, signed, bound to the filters and the sort: a cursor sent with other filters or another sort, or altered, is `400 validation_failed` on `cursor`). A search can page through at most 10,000 results: the cursor that would start past that answers `400 pagination_limit_reached`; narrow the filters or sort differently. `nextCursor` is null on the last page. If the meaning of a sort ever changes, cursors made before the change are refused the same way (`400 validation_failed` on `cursor`): start again from the first page. _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._ ================================================================================ PAGE: GET /v1/listings/{listingKey} URL: https://docs.apidata.one/reference/endpoints/get-listing/ ================================================================================ # GET /v1/listings/{listingKey} One listing, in full. | 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 | ## Path | Name | Type | Description | | --- | --- | --- | | `listingKey` | string | **Required.** The listing's key. With ?mlsNumber=true, an MLS number, current or past, in its place. | ## Query | Name | Type | Description | | --- | --- | --- | | `mlsNumber` | string | To look a listing up by an MLS number, current or past: "true", with the number in the path; or the number itself. | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | Optional, with a publishable key: a token your server minted for a consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/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. | ## Answers ### 200: The listing, with the disclosures and any warnings The answer is `{ data, meta, compliance, warnings }`: `meta` holds `requestId`, `environment` and `dataLastUpdatedAt`; [`compliance`](https://docs.apidata.one/reference/objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](https://docs.apidata.one/reference/objects.md#warning), empty when there is nothing to say. `data` is a [ListingDetail](https://docs.apidata.one/reference/objects.md#listingdetail). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`listing_not_found`](https://docs.apidata.one/errors/listing_not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The detail is [the listing object](https://docs.apidata.one/reference/listings.md#the-listing-object) plus these. Each is listed with its type under [ListingDetail](https://docs.apidata.one/reference/objects.md#listingdetail); this table says more about when a field is filled: | Field | Content | | ------------------ | ----------------------------------------------------------------------------------------- | | `remarks` | the public remarks | | `directions`, `taxId` | only when the address is shown | | `virtualTourUrl` | the listing's tour link exactly as Bright sent it, with `https://` in front only when it had no scheme (a value that names no website is `null`). Shown for a withheld address too; `null` for Coming Soon and under the off-market hide | | `media` | `{ links: [{ mediaKey, kind, url, order, caption }] }`: the listing's virtual tours and videos as links, in display order. `kind` is `tour`, `video` or `other` (a link Bright filed as a photo that is neither, such as a document share). Each `url` is Bright's, unaltered except for `https://` added where it had no scheme; an `http://` link stays `http://`. Never in `photos` or its count; `[]` for Coming Soon and under the off-market hide. A listing whose address is withheld shows its links like any other | | `features` | an object of Bright's fields in lowerCamelCase, the `YN` suffix kept (`basementYN`, `basement`, `heating`, `interiorFeatures`, `taxAnnualAmount`, …): booleans, numbers and arrays of display strings; empty values are left out | | `rooms` | `[{ type, level, length, width, area, dimensions, features, description, order }]` in display order, for on-market listings (`[]` when the listing has none). `null` with the warning `rooms_stale` and `details.syncedAt` (the set's last complete pull, or `null`) when the set was never pulled or its refresh is more than 12 hours overdue: an old set is never served. A listing that isn't on the market has `rooms: null` with no warning | | `openHouses` | `[{ id, date, startTime, endTime, method, virtualUrl, remarks }]`, public open houses that haven't ended; `method` is `in_person`, `virtual` or `in_person_and_virtual`; `[]` with the warning `open_houses_stale` while the open-house feed is more than 12 hours old | | `places` | `[{ placeId, kind, displayName }]` the listing belongs to; names only, never geometry; school districts on Premium only | | `schools` | **Premium only** (a Basic detail has no such key): the object [`GET /v1/listings/{listingKey}/schools`](https://docs.apidata.one/reference/endpoints/get-listing-schools.md) serves, without its `listingKey` | | `priceHistory` | `[{ date, price, kind }]` (`kind` is `list` or `close`): dated events only. `date` is a calendar date, `YYYY-MM-DD`, in Eastern time (America/New_York), never a timestamp. A `list` entry is a list price on the Eastern date it took effect; the `close` entry is the close price on the close date, equal to `closeDate`, and only a Closed listing has one. Oldest first; on one date, `list` entries come before the `close` entry and keep the order they happened in. A listing whose record shows no dated price change has no `list` entry (`[]` when it also isn't closed): its current price is `price.list`. Nothing from a Coming Soon period is included, and no list price dated from the close on (a later day than the close date, or at or after the change that recorded the listing as closed). A listing that was closed and is back on the market has no `close` entry, and the list prices it gets from then on are shown. Absent for Coming Soon and when Bright hides the history | | `listingIdHistory` | `[{ mlsNumber, firstSeenAt, lastSeenAt }]`: MLS numbers the listing has carried | | `photos.items` | every gallery photo in order: `{ mediaKey, order, caption, urls }`, Bright's five sizes on its media host over https | The path value is the `listingKey`. To look a listing up by its MLS number, current or past, send `?mlsNumber=true` with the number in the path, or `?mlsNumber=<number>`. A listing that isn't served (unknown, left the feed, or kept from display) is `404 listing_not_found`. _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._ ================================================================================ PAGE: GET /v1/listings/{listingKey}/schools URL: https://docs.apidata.one/reference/endpoints/get-listing-schools/ ================================================================================ # GET /v1/listings/{listingKey}/schools A listing's school district, and the schools its agent entered. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | Premium | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | refused | ## Path | Name | Type | Description | | --- | --- | --- | | `listingKey` | string | **Required.** The listing's key. With ?mlsNumber=true, an MLS number, current or past, in its place. | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | Optional, with a publishable key: a token your server minted for a consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/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. | ## Answers ### 200: The listing's schools The answer is `{ data, meta, compliance, warnings }`: `meta` holds `requestId`, `environment` and `dataLastUpdatedAt`; [`compliance`](https://docs.apidata.one/reference/objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](https://docs.apidata.one/reference/objects.md#warning), empty when there is nothing to say. `data` is a [ListingSchoolsAnswer](https://docs.apidata.one/reference/objects.md#listingschoolsanswer). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`listing_not_found`](https://docs.apidata.one/errors/listing_not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More **Premium only** (`403 tier_insufficient` with `capability: "schools"` on Basic). ```json { "data": { "listingKey": "805454359664", "district": { "placeId": "pl_…", "displayName": "Lower Merion School District, PA", "districtType": "unified", "grades": "KG-12" }, "districts": [ { "placeId": "pl_…", "displayName": "Lower Merion School District, PA", "districtType": "unified", "grades": "KG-12" } ], "assigned": [ { "level": "elementary", "name": "PENN VALLEY", "source": "listing" }, { "level": "middle_or_junior", "name": "WELSH VALLEY", "source": "listing" }, { "level": "high", "name": "HARRITON", "source": "listing" } ], "asOf": "2026-11-09T18:30:00.000Z", "notice": "School assignments are subject to change; verify with the school district." }, "meta": { "…": "as for the detail" }, "compliance": { "…": "the compliance block" }, "warnings": [] } ``` - `district` is the school district the listing lies in, as a place: search it with its `placeId` in `location.placeIds`, and read more about it with `GET /v1/places/{placeId}`. `null` when the listing lies in no district. Where a listing lies in two (an elementary and a secondary district, as in parts of New Jersey), `districts` lists both and `district` is the first of them: a unified district before an elementary one before a secondary one. - `assigned` is what the listing's agent entered, as Bright sends it: up to one school per level, in the order `elementary`, `middle_or_junior`, `high`. `source` is `listing`: the names come from the listing, not from a school authority. Empty when the agent entered none (most listings name no school). - `asOf` is the listing's `updatedAt`. - A listing whose address is withheld has the same object; its district comes from the district the listing itself names, never from a point. - The listing's own rules apply: `500 data_stale` during the 12-hour stop, and `404 listing_not_found` for a listing that isn't served. _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._ ================================================================================ PAGE: GET /v1/listings/{listingKey}/similar URL: https://docs.apidata.one/reference/endpoints/get-similar-listings/ ================================================================================ # GET /v1/listings/{listingKey}/similar Listings like this one: same city and class, near its price and size. | 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 | ## Path | Name | Type | Description | | --- | --- | --- | | `listingKey` | string | **Required.** The listing's key. With ?mlsNumber=true, an MLS number, current or past, in its place. | ## Query | Name | Type | Description | | --- | --- | --- | | `limit` | integer | How many: 1 to 10. 3 when left out. | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | Optional, with a publishable key: a token your server minted for a consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/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. | ## Answers ### 200: The similar listings, nearest price first The answer is `{ data, meta, compliance, warnings }`: `meta` holds `requestId`, `environment` and `dataLastUpdatedAt`; [`compliance`](https://docs.apidata.one/reference/objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](https://docs.apidata.one/reference/objects.md#warning), empty when there is nothing to say. `data` is a list of [ListingSummary](https://docs.apidata.one/reference/objects.md#listingsummary). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`listing_not_found`](https://docs.apidata.one/errors/listing_not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Up to `limit` (1 to 10, default 3) listings in the same city and property class, with the same on-market or closed status, within ±10% of the subject's price and living area, nearest price first. A subject with no shown price or no living area is matched without that range, with the warning `filter_not_applicable`. _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._ ================================================================================ PAGE: GET /v1/listings/keys URL: https://docs.apidata.one/reference/endpoints/list-listing-keys/ ================================================================================ # GET /v1/listings/keys Every served listing's key and last change time, for a sitemap. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | refused | ## Query | Name | Type | Description | | --- | --- | --- | | `limit` | integer | Keys a page: 1 to 5,000. 1,000 when left out. | | `cursor` | string | The nextCursor of the page before, exactly as it came. Left out for the first page. | | `status` | string | Only listings of these statuses, separated by commas: active, active_under_contract, coming_soon, pending, closed. Left out: every listing the API serves. | ## Answers ### 200: One page of keys, in key order The answer is `{ data, meta }`; `meta` holds `requestId`, `environment` and `page`. `data` is a list. Each item: | Field | Type | Description | | --- | --- | --- | | `listingKey` | string | | | `updatedAt` | string or null | The listing's own updatedAt: your sitemap's lastmod. | `meta.page` is a [CursorPage](https://docs.apidata.one/reference/objects.md#cursorpage). Header `RateLimit-Limit`: Of whichever bucket has the fewest requests left: this route's own, or the key's. ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The key list, for a sitemap: every listing the API serves, by its `listingKey`, with the time it last changed. Call it from your server, on a schedule. ```json { "data": [ { "listingKey": "301234567890", "updatedAt": "2026-11-28T14:02:11.000Z" }, { "listingKey": "301234567891", "updatedAt": "2026-10-03T09:15:40.000Z" } ], "meta": { "requestId": "req_…", "environment": "live", "page": { "limit": 1000, "nextCursor": "c_…" } } } ``` - **What is in it** is exactly what `GET /v1/listings/{listingKey}` answers `200` for, in `listingKey` order. A listing whose address is hidden is in it (its detail is served, without the address). A listing that left the feed, or is kept from display, is not: its detail is `404 listing_not_found`. - **`updatedAt`** is the listing's own `updatedAt`, as its detail gives it. Use it as your sitemap's `lastmod`, and to decide which of your pages to refresh. - **Keys and times, and nothing else.** No address, no price, no count of the whole list: page until `nextCursor` is `null`. - **A cursor belongs to the list it came from.** With another `status` filter, or on a search, it is `400 validation_failed`. Start again from the first page. - **A key that was on your last list and is not on this one** has left the feed: remove its page and answer `410 Gone` for it. Don't keep a copy of a listing the API no longer serves. ([`listing.removed`](https://docs.apidata.one/concepts/webhooks.md) notices tell you the same sooner.) - **Its own rate limit:** one request every 2 seconds for a key, with bursts of 5, on top of the key's usual limit ([rate limits](https://docs.apidata.one/concepts/rate-limits.md#the-key-list)). At 5,000 keys a page a full list of a million keys is about 210 requests, and takes a few minutes. Past the limit: `429 rate_limited` with `Retry-After`. - Like every listing route, it answers `500 data_stale` while live data is over 12 hours old. Build your pages' addresses from the `listingKey` alone, never from an address. _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._ ================================================================================ PAGE: GET /v1/listings/map URL: https://docs.apidata.one/reference/endpoints/map-listings/ ================================================================================ # GET /v1/listings/map Pins and clusters for a map, with the filters as query keys. | 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 | ## Query The search's filters as query keys: dotted keys for nested fields, commas between the items of a list, and `Name|ST` for a city or a subdivision. The same search as a JSON body is a [SearchRequest](https://docs.apidata.one/reference/objects.md#searchrequest), where each filter is described. | Key | Example | Description | | --- | --- | --- | | `status` | `active,pending` | Statuses, separated by commas. Left out: active. | | `propertyClass` | `residential,land` | Property classes, separated by commas. | | `structureType` | `detached,condo_apartment` | Structure types, separated by commas. | | `price.min` | `300000` | The lowest list price, in US dollars. | | `price.max` | `450000` | The highest list price, in US dollars. | | `beds.min` | `3` | The lowest number of bedrooms. | | `beds.max` | `5` | The highest number of bedrooms. | | `baths.min` | `2` | The lowest number of baths, a half bath counting half. | | `baths.max` | `3.5` | The highest number of baths, a half bath counting half. | | `livingAreaSqft.min` | `1500` | The lowest living area, in square feet. | | `livingAreaSqft.max` | `3000` | The highest living area, in square feet. | | `lotSizeAcres.min` | `0.25` | The lowest lot size, in acres. | | `lotSizeAcres.max` | `2` | The highest lot size, in acres. | | `yearBuilt.min` | `1990` | The lowest year built. | | `yearBuilt.max` | `2020` | The highest year built. | | `closeDate.from` | `2026-01-01` | Closed on or after this day. | | `closeDate.to` | `2026-06-30` | Closed on or before this day. | | `keywords` | `fenced yard` | Words searched in the public remarks and the feature lists. | | `location.placeIds` | `pl_…,pl_…` | Place IDs, separated by commas: any kind on every plan, except school districts, which are Premium. | | `location.postalCodes` | `19003,19041` | ZIP codes, separated by commas. | | `location.cities` | `Bryn Mawr\|PA,Dover\|DE` | Cities as Name\|ST, separated by commas. | | `location.subdivisions` | `Wynnewood Park\|PA` | Subdivisions as Name\|ST, separated by commas. | | `location.bbox` | `-75.42,40.00,-75.30,40.08` | minLng,minLat,maxLng,maxLat. | | `location.radius.center` | `-75.3,40.01` | lng,lat. | | `location.radius.meters` | `1609` | The radius in metres. Alone, with one community among the place IDs: that community's radius, from 400 to 8000. | | `location.shapeId` | `shp_…` | Premium. A saved shape's ID, of the consumer the request acts for. | | `listAgentMlsId` | `3012345` | The listing or co-listing agent's MLS ID. | | `listOfficeMlsId` | `OFFICE1` | The listing or co-listing office's MLS ID. | | `openHouse.from` | `2026-12-05` | An open house on or after this day. | | `openHouse.to` | `2026-12-06` | An open house on or before this day. | | `modifiedSince` | `2026-11-01T00:00:00Z` | Changed at or after this instant. | | `hasBasement` | `true` | true to require it. | | `hasFireplace` | `true` | true to require it. | | `hasPool` | `true` | true to require it. | | `seniorCommunity` | `true` | true to require it. | | `petsAllowed` | `true` | true to require it. | | `newConstruction` | `true` | true to require it. | | `waterfront` | `true` | true to require it. | | `garage` | `true` | true to require it. | | `sort` | `newest` | One of price_asc, price_desc, newest, beds_desc, baths_desc, sqft_desc, close_date_desc, distance. Left out: price_asc. | | `limit` | `24` | 1 to 100. Left out: 24. | | `cursor` | `c_…` | The previous page's nextCursor. | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | Optional, with a publishable key: a token your server minted for a consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/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. | ## 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`](https://docs.apidata.one/reference/objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](https://docs.apidata.one/reference/objects.md#warning), empty when there is nothing to say. `data` is a [MapAnswer](https://docs.apidata.one/reference/objects.md#mapanswer). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`shape_invalid`](https://docs.apidata.one/errors/shape_invalid.md), [`shape_too_large`](https://docs.apidata.one/errors/shape_too_large.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/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._ ================================================================================ PAGE: POST /v1/listings/map URL: https://docs.apidata.one/reference/endpoints/map-listings-body/ ================================================================================ # 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`](https://docs.apidata.one/reference/endpoints/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](https://docs.apidata.one/reference/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`](https://docs.apidata.one/reference/objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](https://docs.apidata.one/reference/objects.md#warning), empty when there is nothing to say. `data` is a [MapAnswer](https://docs.apidata.one/reference/objects.md#mapanswer). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`shape_invalid`](https://docs.apidata.one/errors/shape_invalid.md), [`shape_too_large`](https://docs.apidata.one/errors/shape_too_large.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/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._ ================================================================================ PAGE: POST /v1/listings/search URL: https://docs.apidata.one/reference/endpoints/search-listings-body/ ================================================================================ # POST /v1/listings/search Search listings, 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`](https://docs.apidata.one/reference/endpoints/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](https://docs.apidata.one/reference/objects.md#searchrequest), as JSON. ```json { "status": [ "active" ], "price": { "max": 500000 }, "beds": { "min": 3 }, "location": { "placeIds": [ "pl_Hq2Lw9Xc4Vb7Nm1Kp6Tz3R" ] }, "sort": "newest", "limit": 24 } ``` ## Answers ### 200: One page of listings, with the count, the disclosures and any warnings The answer is `{ data, meta, compliance, warnings }`: `meta` holds `requestId`, `environment` and `dataLastUpdatedAt`; [`compliance`](https://docs.apidata.one/reference/objects.md#compliance) is the block of notices to show; `warnings` is a list of [Warning](https://docs.apidata.one/reference/objects.md#warning), empty when there is nothing to say. `data` is a list of [ListingSummary](https://docs.apidata.one/reference/objects.md#listingsummary). `meta.page` is a [SearchPage](https://docs.apidata.one/reference/objects.md#searchpage). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`pagination_limit_reached`](https://docs.apidata.one/errors/pagination_limit_reached.md), [`shape_invalid`](https://docs.apidata.one/errors/shape_invalid.md), [`shape_too_large`](https://docs.apidata.one/errors/shape_too_large.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More One search schema, two forms. `POST /v1/listings/search` takes it as a JSON body; `GET /v1/listings` takes it flattened into query keys (one request, cacheable, linkable): | Body | Query | | ------------------------------------------------- | -------------------------------------------------------- | | `{ "price": { "min": 300000, "max": 450000 } }` | `price.min=300000&price.max=450000` | | `{ "status": ["active", "pending"] }` | `status=active,pending` | | `{ "location": { "placeIds": ["pl_a", "pl_b"] } }`| `location.placeIds=pl_a,pl_b` | | `{ "location": { "bbox": [-75.42, 40.00, -75.30, 40.08] } }` | `location.bbox=-75.42,40.00,-75.30,40.08` | | `{ "location": { "cities": [{ "name": "Bryn Mawr", "state": "PA" }] } }` | `location.cities=Bryn Mawr\|PA` | | `{ "location": { "radius": { "center": [-75.3, 40.01], "meters": 1609 } } }` | `location.radius.center=-75.3,40.01&location.radius.meters=1609` | | `{ "hasPool": true }` | `hasPool=true` | Dotted keys build nested objects, commas separate list items, and cities and subdivisions are `Name|ST` items. A key outside the schema is `400 validation_failed` naming it, in both forms; every problem in a request is reported at once in `fields`. `location.shape` (a drawn shape) exists in the body form only. ### Filters Each filter is described where it is listed: as a query key on the page of `GET /v1/listings`, and as a field of the body under [SearchRequest](https://docs.apidata.one/reference/objects.md#searchrequest). Every filter is optional, and they combine with AND. `location.schoolIds` is not available: search by individual school waits for attendance-zone data. It is `403 tier_insufficient` on Basic and `400 validation_failed` on Premium. Search a **school district** with its place ID in `location.placeIds` (Premium). A Premium field sent with a key on a Basic account is `403 tier_insufficient` with `capability` (`shapes` or `schools`), before anything else in the request is judged; it is never ignored. `location.schoolDistrictIds` no longer exists (a school district is a place): it is `400 validation_failed` as an unknown key. Location kinds combine with AND. Spatial kinds (`bbox`, `radius`, a drawn or saved shape, a community place, the map) match listings with a shown address and a point inside the seven jurisdictions only, so a hidden-address listing is found through its city, ZIP, subdivision or place memberships, never through a shape. Filters that mean nothing for some classes (beds and baths for land and commercial listings, living area for land) apply only where they mean something; those listings stay in the results and the response carries the warning `filter_not_applicable`. That warning is about the search, not about the page you got. It comes whenever `beds`, `baths` or `livingAreaSqft` is sent and the search could return a class the filter means nothing for, even when every listing on this page is a house. Its `message` names those classes and its `fix` says how to leave them out: add a `propertyClass` filter with the classes you want, such as `propertyClass=residential`. With that, the filter applies to everything the search can return, and no warning comes. A site that searches homes only should send `propertyClass` on every search; one that shows land and commercial listings beside homes can ignore the warning. ### Newest first `sort=newest` orders every listing by its **latest status change**, newest first: a new listing, one back on the market, a move under contract or a close. A listing back on the market counts as new again. - Every status is in the one timeline. A Coming Soon listing sorts by its status change like any other, not by its expected on-market date. - A listing whose days on market Bright hides sorts like the rest. A sort shows an order, never a date or a count: such a listing still has no `daysOnMarket`. - Listings that changed at the same moment come in a fixed order, and a listing with no status change comes last. - The sandbox sorts the same way as live. ### Prices Bright hides When Bright flags a listing's prices as not for display, its price fields are null, it can't match a price filter, and price sorts put it last in both directions. Likewise a listing with hidden price history has no `priceHistory`, and one with hidden days-on-site has no `daysOnMarket` or on-market dates. ### Response ```json { "data": [ { "listingKey": "805454359664", "…": "a ListingSummary" } ], "meta": { "requestId": "req_…", "page": { "limit": 24, "nextCursor": "c_…", "total": 1234, "totalIsCapped": false }, "dataLastUpdatedAt": "2026-11-10T14:59:00.000Z", "environment": "live" }, "compliance": { "…": "the compliance block" }, "warnings": [ { "code": "close_date_clamped", "message": "…", "fix": "…" } ] } ``` `total` is exact up to 10,000 and `totalIsCapped` says when it stopped counting. Pages are read with `cursor` (opaque, signed, bound to the filters and the sort: a cursor sent with other filters or another sort, or altered, is `400 validation_failed` on `cursor`). A search can page through at most 10,000 results: the cursor that would start past that answers `400 pagination_limit_reached`; narrow the filters or sort differently. `nextCursor` is null on the last page. If the meaning of a sort ever changes, cursors made before the change are refused the same way (`400 validation_failed` on `cursor`): start again from the first page. _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._ ================================================================================ PAGE: GET /v1/autocomplete URL: https://docs.apidata.one/reference/endpoints/autocomplete/ ================================================================================ # GET /v1/autocomplete Suggestions for a search box: places, ZIP codes, addresses and MLS numbers. | 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 when it asks for listing content | ## Query | Name | Type | Description | | --- | --- | --- | | `q` | string | **Required.** What the visitor typed: 2 to 100 characters. Matching is by prefix and ignores case; % and _ are ordinary characters. | | `types` | string | The groups you want, separated by commas: places, schoolDistricts, postalCodes, addresses, mlsNumbers. Left out: every group the key's plan has (schoolDistricts is Premium). Asking for addresses or mlsNumbers makes the request listing content, which the 12-hour stop refuses. | | `near` | string | A point as "lng,lat": each group is ordered by distance from it. | ## Answers ### 200: The suggestions, at most ten a group. Only the groups that were asked for are present The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data`: | Field | Type | Description | | --- | --- | --- | | `places` | list of object | (not always present) Towns, counties, townships, communities and subdivisions by name. Search one with location.placeIds. | | `places[].placeId` | string | | | `places[].kind` | `state`, `county`, `city`, `municipality`, `cdp`, `community`, `zcta`, `postal_city`, `subdivision`, `school_district` | | | `places[].displayName` | string | Show it as it is: it tells look-alikes apart. | | `places[].state` | string or null | | | `places[].center` | object or null | | | `places[].center.lat` | number | | | `places[].center.lng` | number | | | `schoolDistricts` | list of object | (not always present) Premium only. School districts by name. Search one with location.placeIds. | | `schoolDistricts[].placeId` | string | | | `schoolDistricts[].displayName` | string | | | `schoolDistricts[].districtType` | string or null | unified, elementary or secondary. | | `schoolDistricts[].grades` | string or null | Such as "KG-12". | | `postalCodes` | list of object | (not always present) ZIP code areas by prefix. | | `postalCodes[].postalCode` | string | | | `postalCodes[].state` | string or null | | | `postalCodes[].placeId` | string | | | `postalCodes[].displayName` | string | | | `addresses` | list of object | (not always present) Listings by their address, on-market ones first. A listing whose address is withheld never matches here. | | `addresses[].listingKey` | string | | | `addresses[].mlsNumber` | string or null | | | `addresses[].status` | `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | | | `addresses[].address` | object | | | `addresses[].address.line1` | string or null | | | `addresses[].address.unit` | string or null | | | `addresses[].address.city` | string or null | | | `addresses[].address.state` | string or null | | | `addresses[].address.postalCode` | string or null | | | `mlsNumbers` | list of object | (not always present) Listings by a current or past MLS number. | | `mlsNumbers[].listingKey` | string | | | `mlsNumbers[].mlsNumber` | string | The number that matched: the current one, or a past one. | | `mlsNumbers[].current` | boolean | True when the number is the listing's current one. | | `mlsNumbers[].status` | `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | | | `mlsNumbers[].address` | object or null | Null when the address is withheld. | | `mlsNumbers[].address.line1` | string or null | | | `mlsNumbers[].address.city` | string or null | | | `mlsNumbers[].address.state` | string or null | | | `mlsNumbers[].address.postalCode` | string or null | | | `mlsNumbers[].addressDisplay` | `full`, `withheld` | | ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`data_stale`](https://docs.apidata.one/errors/data_stale.md), [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Suggestions for a search box, from two characters: `?q=ardm` plus an optional `types` list and an optional `near=lng,lat` that orders each group by distance from that point. ```json { "data": { "places": [ { "placeId": "pl_…", "kind": "community", "displayName": "Ardmore Park, PA", "state": "PA", "center": { "lat": 40.01, "lng": -75.3 } } ], "schoolDistricts": [ { "placeId": "pl_…", "displayName": "Lower Merion School District, PA", "districtType": "unified", "grades": "KG-12" } ], "postalCodes": [ { "postalCode": "19003", "state": "PA", "placeId": "pl_…", "displayName": "19003 (Ardmore, PA)" } ], "addresses": [ { "listingKey": "…", "mlsNumber": "…", "status": "active", "address": { "line1": "101 MAIN ST", "unit": null, "city": "Ardmore", "state": "PA", "postalCode": "19003" } } ], "mlsNumbers": [ { "listingKey": "…", "mlsNumber": "PAMC2141234", "current": true, "status": "active", "address": { "…": "…" }, "addressDisplay": "full" } ] }, "meta": { "requestId": "req_…", "environment": "live" } } ``` | Group | What it searches | | ------------- | ---------------------------------------------------------------------------------------------------- | | `places` | live places by name (cities, counties, townships, communities, subdivisions); never a retired place, never a school district (those are `schoolDistricts`); ZIP areas are in `postalCodes` | | `schoolDistricts` | **Premium only.** School districts by name. `districtType` is `unified`, `elementary` or `secondary`; `grades` is the lowest and highest grade served, such as `KG-12` or `09-12` (`PK`, `KG`, `01` to `12`), or null. Search a district with its `placeId` in `location.placeIds` | | `postalCodes` | ZIP code areas by prefix (digits only) | | `addresses` | listing addresses only, and only shown ones: a listing whose address is withheld never matches an address. On-market listings first, then closed | | `mlsNumbers` | current and past MLS numbers (letters, digits and hyphens). A withheld listing may match here and is shown with `address: null` and `addressDisplay: "withheld"` | Each group returns at most ten items. `types` names the groups wanted; an unknown group is `400 validation_failed`. With `types` left out a Premium key gets all five groups and a Basic key the other four. A Basic key that asks for `schoolDistricts` in `types` gets `403 tier_insufficient` with `capability: "schools"`. Matching is case-insensitive and by prefix of what was typed (a place also matches when its display name contains the text), and the typed text is taken literally: `%` and `_` are characters, not wildcards. **The 12-hour stop.** `addresses` and `mlsNumbers` are listing content, so a request that asks for them (or leaves `types` out) is `500 data_stale` as a whole while the stop is on. `places`, `schoolDistricts` and `postalCodes`, alone or together, keep working during the stop. _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._ ================================================================================ PAGE: GET /v1/places/{placeId} URL: https://docs.apidata.one/reference/endpoints/get-place/ ================================================================================ # GET /v1/places/{placeId} A place's names, center and bounding box. | 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 | works | ## Path | Name | Type | Description | | --- | --- | --- | | `placeId` | string | **Required.** The place's ID, "pl_…", from autocomplete, from a listing's `places`, or from GET /v1/places/containing. | ## Answers ### 200: The place The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [Place](https://docs.apidata.one/reference/objects.md#place). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More ```json { "data": { "placeId": "pl_…", "kind": "municipality", "name": "Lower Merion", "displayName": "Lower Merion Township, Montgomery County, PA", "state": "PA", "slug": "pa/montgomery-county/lower-merion-township", "typeLabel": "township", "cityCounty": false, "center": { "lat": 40.02, "lng": -75.3 }, "bbox": [-75.35, 39.98, -75.25, 40.06], "radiusMeters": null, "approximate": false, "source": "census_tiger", "license": "public-domain", "attribution": null, "vintage": "2026", "asOf": null, "parents": [ { "placeId": "pl_…", "kind": "county", "displayName": "Montgomery County, PA", "overlapFraction": 1, "primary": true } ] } } ``` - A `community` is a point with a radius: `radiusMeters` (1,609 unless the source says otherwise). - A city that is its own county reads as `kind: "city"`. - A school district is served to Premium keys only: a Basic key gets `403 tier_insufficient` with `capability: "schools"`. Its object adds `ncesId` (the district's NCES ID), `districtType` (`unified`, `elementary` or `secondary`), `grades` (lowest and highest grade, such as `KG-12`; `PK`, `KG`, `01` to `12`) and `notice`: "School assignments are subject to change; verify with the school district." `asOf` and `source` say when and from where the district's boundary comes. - A place that was retired (merged or removed in a rebuild) is `404 not_found` for everyone, and never appears as a parent. So is an ID that doesn't exist. ### `source`: where a place comes from `source` is a code, the same on a place object and on its outline. These six are every code the API serves: | `source` | On places of kind | What it means | | --- | --- | --- | | `census_tiger` | `state`, `county`, `city`, `municipality`, `cdp`, `zcta` | The U.S. Census Bureau's TIGER/Line boundary files. (`city` is how a county that is its own city reads.) | | `nces_edge` | `school_district` | The school district boundaries of the National Center for Education Statistics (its EDGE program). | | `usgs_gnis` | `community` | The U.S. Geological Survey's Geographic Names Information System: a named point, served with a radius and no outline. | | `bright_derived` | `postal_city` | Worked out from Bright MLS data: the city names listings carry, and each ZIP code's preferred city. Its outline, where it has one, is put together from ZIP areas and marked `approximate`. | | `bright_lookup` | `subdivision` | A subdivision name that is in Bright MLS's own list of subdivisions. No outline. | | `bright_listing` | `subdivision` | A subdivision name that listings carry and Bright's list doesn't have. No outline. | `vintage` names the source's edition: the year for the Census files (`"2026"`), the school year for school districts (`"SY2024-25"`), `"current"` for GNIS, and null for the three Bright codes. `asOf` is a date for school districts only, the first day of that school year (`"2024-07-01"`); for every other kind it is null. `license` is `public-domain` and `attribution` is null for every place today. _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._ ================================================================================ PAGE: GET /v1/places/{placeId}/geometry URL: https://docs.apidata.one/reference/endpoints/get-place-geometry/ ================================================================================ # GET /v1/places/{placeId}/geometry A place's outline, simplified for a map zoom. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | Premium | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `placeId` | string | **Required.** The place's ID, "pl_…", from autocomplete, from a listing's `places`, or from GET /v1/places/containing. | ## Query | Name | Type | Description | | --- | --- | --- | | `zoom` | integer | **Required.** The map zoom the outline will be drawn at. Below 0 is read as 0, above 22 as 22. | ## Answers ### 200: The outline The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data`: | Field | Type | Description | | --- | --- | --- | | `placeId` | string | | | `kind` | `state`, `county`, `city`, `municipality`, `cdp`, `community`, `zcta`, `postal_city`, `subdivision`, `school_district` | | | `zoom` | integer | The zoom that was used, from 0 to 22. | | `tier` | `display_lo`, `display_mid`, `display_hi` | Which of the three versions was served: zoom 9 or less, 10 to 12, 13 or more. | | `approximate` | boolean | | | `vertices` | integer | How many corners the outline has: at most 5,000. | | `geometry` | object | A GeoJSON MultiPolygon. Coordinates are [longitude, latitude]. | | `geometry.type` | `MultiPolygon` | | | `geometry.coordinates` | list of any | | | `source` | string | Where the outline comes from: the place's own `source`. | | `attribution` | string or null | | Header `Outline-Quota-Limit`: Outlines a key may be served in a UTC day: 5000. Header `Outline-Quota-Remaining`: Outlines left today. Header `Outline-Quota-Reset`: Seconds until 00:00 UTC. ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`quota_exceeded`](https://docs.apidata.one/errors/quota_exceeded.md), [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More **Premium only** (`403 tier_insufficient` with `capability: "shapes"` on Basic). The place's outline, simplified for the map zoom it will be drawn at: ```json { "data": { "placeId": "pl_…", "kind": "county", "zoom": 11, "tier": "display_mid", "approximate": false, "vertices": 412, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-75.3501, 40.0012], [-75.3498, 40.0021], [-75.3501, 40.0012]]]] }, "source": "census_tiger", "attribution": null }, "meta": { "requestId": "req_…", "environment": "live" } } ``` - `zoom` is required: a whole number, read as 0 below 0 and as 22 above 22 (the answer carries the value used). Without it, or with anything else, `400 validation_failed`. - The zoom picks one of three versions of the outline: `display_lo` at zoom 9 or less, `display_mid` at 10 to 12, `display_hi` at 13 or more. Coordinates have 4 decimals at low and mid zoom and 5 at high zoom. There is no full-precision option. - `geometry` is a GeoJSON `MultiPolygon` of at most 5,000 corners. `vertices` is its corner count: every position except each ring's closing repeat. - `tier` names the version served. If the version for the zoom isn't available for a place, the next coarser one is served and named; never a finer one. - `approximate` is true for an outline put together from other shapes, such as a postal city's (the ZIP areas it is the preferred city of). - `404 not_found` for an ID that doesn't exist, a retired place, and a place that has no outline: a community (a point, searched within its radius), a subdivision (matched by the name each listing carries) and a postal city no ZIP area could be found for. The message says which; `location.placeIds` still searches all three. - A school district's outline is served like any other place's. - Limits: 60 outlines in any 60 seconds and 5,000 a UTC day, per key. See [rate limits](https://docs.apidata.one/concepts/rate-limits.md) for the headers every outline answer carries. _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._ ================================================================================ PAGE: GET /v1/places/containing URL: https://docs.apidata.one/reference/endpoints/get-places-containing/ ================================================================================ # GET /v1/places/containing The places that hold a point. | 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 | works | ## Query | Name | Type | Description | | --- | --- | --- | | `lat` | number | **Required.** The latitude. | | `lng` | number | **Required.** The longitude. | ## Answers ### 200: The places, or an empty list for a point outside the seven jurisdictions The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a list of [PlaceContaining](https://docs.apidata.one/reference/objects.md#placecontaining). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The places whose outline covers the point, the communities whose radius reaches it, and the postal city the covering ZIP area prefers, as a list of place objects: each is the object `GET /v1/places/{placeId}` serves, `parents` included, plus `via`: `geometry`, `radius` or `postal_city`. School districts appear for Premium keys only, as places and as parents; retired places never. An empty list means the point lies outside the seven jurisdictions. _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._ ================================================================================ PAGE: POST /v1/client-tokens URL: https://docs.apidata.one/reference/endpoints/create-client-token/ ================================================================================ # POST /v1/client-tokens Mint a short-lived token that lets a browser act for one consumer. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | works | | During a data stop | works | ## Body | Field | Type | Description | | --- | --- | --- | | `clientId` | string | Your own opaque ID for the consumer: 1 to 64 characters of letters, digits, _ and -. Never an email address or a phone number. | | `expiresInMinutes` | integer | (optional) How long the token lasts. 15 when left out; at most 60. | ```json { "clientId": "u_8f2k", "expiresInMinutes": 15 } ``` ## Answers ### 201: The token, and when it stops working The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data`: | Field | Type | Description | | --- | --- | --- | | `token` | string | Send it as the X-Client-Token header, with your publishable key. | | `expiresAt` | string | Mint a new one before this. | ```json { "data": { "token": "eyJ…", "expiresAt": "2026-11-02T12:15:00.000Z" }, "meta": { "requestId": "req_7Hk2mT1xKp7Zc2Nf5Rb9Wd", "environment": "test" } } ``` ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Call it from your server. It mints a short-lived token that lets your website act for one consumer with your `pk_` key. Request: ```json { "clientId": "u_8f2k", "expiresInMinutes": 15 } ``` - `clientId`: required; your opaque ID for the consumer, 1–64 characters of `A-Z a-z 0-9 _ -`. Missing is `400 validation_failed`. An email address, a phone number or other characters get `400 client_id_must_be_opaque`. - `expiresInMinutes`: optional, default 15, at most 60. A larger value is `400 validation_failed`, never silently shortened. Works while the account is suspended, so your consumers can still read and delete what they saved. Response `201`: ```json { "data": { "token": "eyJ…", "expiresAt": "2026-11-02T12:15:00.000Z" }, "meta": { "requestId": "req_…", "environment": "test" } } ``` The browser then sends `Authorization: Bearer pk_…` and `X-Client-Token: eyJ…`. The token is bound to your account and environment; it is `401 client_token_account_mismatch` with another account's `pk_` key and `401 client_token_invalid` across environments. Mint a new one when it expires (`401 client_token_expired`). _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._ ================================================================================ PAGE: DELETE /v1/clients/{clientId} URL: https://docs.apidata.one/reference/endpoints/delete-client/ ================================================================================ # DELETE /v1/clients/{clientId} Delete everything stored for one consumer. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the consumer the path names | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `clientId` | string | **Required.** The consumer's opaque ID, as your server names them. | ## Answers ### 204: Deleted, whether or not the consumer had any data No body. ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Hard-deletes everything stored for one consumer of your account: favorites, saved shapes, saved searches, the notices recorded for that consumer (with their webhook deliveries) and its `Idempotency-Key` records. Use it for consumer privacy requests. - `{clientId}` is the consumer's opaque ID. An invalid ID is `400 client_id_must_be_opaque`. - Response: `204` with no body, whether or not the consumer had any data (deleting is idempotent). Re-creating the same client afterwards starts empty. - An `X-Client-Id` header on this call is ignored; the path names the consumer. - Works while the account is suspended, so consumers can still be forgotten. - Waits at most about a second for an in-flight write of the same consumer; past that it answers `500 temporarily_unavailable` with `Retry-After`, and nothing is changed. _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._ ================================================================================ PAGE: GET /v1/favorites URL: https://docs.apidata.one/reference/endpoints/list-favorites/ ================================================================================ # GET /v1/favorites A consumer's favorites, newest first. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 200: The favorites The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a list of [Favorite](https://docs.apidata.one/reference/objects.md#favorite). ```json { "data": [ { "id": "fav_3yQ8mT1xKp7Zc2Nf5Rb9Wd", "listingKey": "805454359664", "createdAt": "2026-11-02T12:00:00.000Z" } ], "meta": { "requestId": "req_7Hk2mT1xKp7Zc2Nf5Rb9Wd", "environment": "test" } } ``` ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More ```json { "data": [ { "id": "fav_…", "listingKey": "805454359664", "createdAt": "2026-11-02T12:00:00.000Z" } ], "meta": { "requestId": "req_…", "environment": "test" } } ``` Newest first. Works while the account is suspended. _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._ ================================================================================ PAGE: POST /v1/favorites URL: https://docs.apidata.one/reference/endpoints/create-favorite/ ================================================================================ # POST /v1/favorites Save a listing for a consumer. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | refused | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | | `Idempotency-Key` | A new random value for this action, such as a UUID. A repeat with the same value and the same request gets the first answer again, and nothing is saved twice ([idempotency](https://docs.apidata.one/concepts/idempotency.md)). | ## Body | Field | Type | Description | | --- | --- | --- | | `listingKey` | string | The key of a listing this environment serves. | ```json { "listingKey": "805454359664" } ``` ## Answers ### 200: The consumer had saved this listing before: the same favorite, never a second one The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [Favorite](https://docs.apidata.one/reference/objects.md#favorite). ### 201: Saved The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [Favorite](https://docs.apidata.one/reference/objects.md#favorite). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`listing_not_found`](https://docs.apidata.one/errors/listing_not_found.md) | | 409 | [`idempotency_conflict`](https://docs.apidata.one/errors/idempotency_conflict.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Request `{ "listingKey": "805454359664" }`. Response `201` with the new favorite; posting a listing the consumer already saved returns the same record with `200`, never a duplicate. Refused with `403 account_suspended` while suspended. Writes for one consumer are applied one at a time: a `POST` that overlaps a delete of the same favorite or of the consumer still answers `200` or `201`, and the delete takes effect right after it. A write waits at most about a second for an earlier write of the same consumer; past that, or in the rare case that the write keeps losing a race with changes made outside the API, it answers `500 temporarily_unavailable` with `Retry-After`, and nothing is saved. The same cap applies to `DELETE /v1/favorites/{id}` and `DELETE /v1/clients/{clientId}`. `Idempotency-Key` is accepted: a retry with the same key and body gets the first answer again (its status included) with `Idempotency-Replayed: true`, and saves nothing. See [idempotency](https://docs.apidata.one/concepts/idempotency.md). _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._ ================================================================================ PAGE: GET /v1/favorites/{id} URL: https://docs.apidata.one/reference/endpoints/get-favorite/ ================================================================================ # GET /v1/favorites/{id} One favorite. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The favorite's ID, "fav_…". | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 200: The favorite The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [Favorite](https://docs.apidata.one/reference/objects.md#favorite). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More One favorite, or `404 not_found`. IDs are random (`fav_…`); an ID from another account or another consumer is `404`, never `403`. _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._ ================================================================================ PAGE: DELETE /v1/favorites/{id} URL: https://docs.apidata.one/reference/endpoints/delete-favorite/ ================================================================================ # DELETE /v1/favorites/{id} Remove a favorite. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The favorite's ID, "fav_…". | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 204: Removed No body. ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). _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._ ================================================================================ PAGE: GET /v1/saved-searches URL: https://docs.apidata.one/reference/endpoints/list-saved-searches/ ================================================================================ # GET /v1/saved-searches A consumer's saved searches, newest first. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 200: The saved searches The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a list of [SavedSearch](https://docs.apidata.one/reference/objects.md#savedsearch). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The consumer's saved searches, newest first, each as [the object](https://docs.apidata.one/reference/saved-searches.md#the-object). _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._ ================================================================================ PAGE: POST /v1/saved-searches URL: https://docs.apidata.one/reference/endpoints/create-saved-search/ ================================================================================ # POST /v1/saved-searches Save a search for a consumer, with how often it alerts. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | refused | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | | `Idempotency-Key` | A new random value for this action, such as a UUID. A repeat with the same value and the same request gets the first answer again, and nothing is saved twice ([idempotency](https://docs.apidata.one/concepts/idempotency.md)). | ## Body | Field | Type | Description | | --- | --- | --- | | `name` | string | (optional) A name for the search, 1 to 100 characters. | | `criteria` | [SearchFilters](https://docs.apidata.one/reference/objects.md#searchfilters) | | | `alertFrequency` | `instant`, `daily`, `weekly`, `off` | When matches are gathered into a notice: after each data update, daily at 7:00 am Eastern, Mondays at 7:00 am Eastern, or never. | ```json { "name": "Ardmore under 500k", "criteria": { "price": { "max": 500000 }, "location": { "placeIds": [ "pl_Hq2Lw9Xc4Vb7Nm1Kp6Tz3R" ] } }, "alertFrequency": "daily" } ``` ## Answers ### 201: Saved The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [SavedSearch](https://docs.apidata.one/reference/objects.md#savedsearch). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 409 | [`idempotency_conflict`](https://docs.apidata.one/errors/idempotency_conflict.md), [`limit_reached`](https://docs.apidata.one/errors/limit_reached.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More ```json { "name": "Ardmore under 500k", "criteria": { "price": { "max": 500000 }, "location": { "placeIds": ["pl_…"] } }, "alertFrequency": "daily" } ``` `name` is optional, 1 to 100 characters. Response `201` with [the saved search](https://docs.apidata.one/reference/saved-searches.md#the-object). What `criteria` may hold, and what each `alertFrequency` means, is on [that page](https://docs.apidata.one/reference/saved-searches.md#criteria). - The 101st saved search of a consumer is `409 limit_reached`. - `Idempotency-Key` is accepted: see [idempotency](https://docs.apidata.one/concepts/idempotency.md). - Refused with `403 account_suspended` while the account is suspended. _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._ ================================================================================ PAGE: GET /v1/saved-searches/{id} URL: https://docs.apidata.one/reference/endpoints/get-saved-search/ ================================================================================ # GET /v1/saved-searches/{id} One saved search. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The saved search's ID, "ss_…". | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 200: The saved search The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [SavedSearch](https://docs.apidata.one/reference/objects.md#savedsearch). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). _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._ ================================================================================ PAGE: PATCH /v1/saved-searches/{id} URL: https://docs.apidata.one/reference/endpoints/update-saved-search/ ================================================================================ # PATCH /v1/saved-searches/{id} Change a saved search's name, criteria or alert frequency. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | refused | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The saved search's ID, "ss_…". | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Body Send any of the three; only what you send changes. | Field | Type | Description | | --- | --- | --- | | `name` | string or null | (optional) null removes the name. | | `criteria` | [SearchFilters](https://docs.apidata.one/reference/objects.md#searchfilters) | (optional) | | `alertFrequency` | `instant`, `daily`, `weekly`, `off` | (optional) When matches are gathered into a notice: after each data update, daily at 7:00 am Eastern, Mondays at 7:00 am Eastern, or never. | ```json { "alertFrequency": "instant" } ``` ## Answers ### 200: The saved search as it is now The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [SavedSearch](https://docs.apidata.one/reference/objects.md#savedsearch). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Send any of `name`, `criteria` and `alertFrequency`; only what you send changes. `name: null` removes the name. New `criteria` are checked exactly as on create. An empty body is `400 validation_failed`. Response `200` with the object. - Changing `criteria` starts the search afresh: listings that match the new criteria at that moment don't alert. Sending the same criteria again changes nothing. - Changing only `alertFrequency` neither loses nor repeats a change: whatever hasn't alerted yet goes out at the new frequency. Leaving `off` starts the search afresh. - Refused with `403 account_suspended` while the account is suspended. _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._ ================================================================================ PAGE: DELETE /v1/saved-searches/{id} URL: https://docs.apidata.one/reference/endpoints/delete-saved-search/ ================================================================================ # DELETE /v1/saved-searches/{id} Delete a saved search. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The saved search's ID, "ss_…". | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 204: Deleted No body. ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More `204` with no body, or `404 not_found`. Reads and deletes keep working while the account is suspended. _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._ ================================================================================ PAGE: GET /v1/saved-shapes URL: https://docs.apidata.one/reference/endpoints/list-saved-shapes/ ================================================================================ # GET /v1/saved-shapes A consumer's saved shapes, newest first, without their geometry. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | Premium | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 200: The saved shapes The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a list. Each item: | Field | Type | Description | | --- | --- | --- | | `id` | string | "shp_…". | | `name` | string or null | | | `vertices` | integer | The ring's corners; its closing repeat is not one. | | `areaSqKm` | number | The area on the Earth's surface, in square kilometres. | | `createdAt` | string | | ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The consumer's shapes, newest first, without their geometry: ```json { "data": [ { "id": "shp_…", "name": "Near the station", "vertices": 4, "areaSqKm": 0.037872, "createdAt": "2026-11-11T15:00:00.000Z" } ], "meta": { "requestId": "req_…", "environment": "test" } } ``` _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._ ================================================================================ PAGE: POST /v1/saved-shapes URL: https://docs.apidata.one/reference/endpoints/create-saved-shape/ ================================================================================ # POST /v1/saved-shapes Save a shape a consumer drew. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | Premium | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | refused | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | | `Idempotency-Key` | A new random value for this action, such as a UUID. A repeat with the same value and the same request gets the first answer again, and nothing is saved twice ([idempotency](https://docs.apidata.one/concepts/idempotency.md)). | ## Body | Field | Type | Description | | --- | --- | --- | | `name` | string | (optional) A name for the shape, 1 to 100 characters. | | `geometry` | [DrawnShape](https://docs.apidata.one/reference/objects.md#drawnshape) | | ```json { "name": "Near the station", "geometry": { "type": "Polygon", "coordinates": [ [ [ -75.301, 40.009 ], [ -75.299, 40.009 ], [ -75.299, 40.011 ], [ -75.301, 40.011 ], [ -75.301, 40.009 ] ] ] } } ``` ## Answers ### 201: Saved The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [SavedShape](https://docs.apidata.one/reference/objects.md#savedshape). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`shape_invalid`](https://docs.apidata.one/errors/shape_invalid.md), [`shape_too_large`](https://docs.apidata.one/errors/shape_too_large.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 409 | [`idempotency_conflict`](https://docs.apidata.one/errors/idempotency_conflict.md), [`limit_reached`](https://docs.apidata.one/errors/limit_reached.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Request: ```json { "name": "Near the station", "geometry": { "type": "Polygon", "coordinates": [[[-75.301, 40.009], [-75.299, 40.009], [-75.299, 40.011], [-75.301, 40.011], [-75.301, 40.009]]] } } ``` `name` is optional, 1 to 100 characters. Response `201`: ```json { "data": { "id": "shp_…", "name": "Near the station", "geometry": { "type": "Polygon", "coordinates": [[[-75.301, 40.009], [-75.299, 40.009], [-75.299, 40.011], [-75.301, 40.011], [-75.301, 40.009]]] }, "vertices": 4, "areaSqKm": 0.037872, "createdAt": "2026-11-11T15:00:00.000Z" }, "meta": { "requestId": "req_…", "environment": "test" } } ``` - `vertices` counts corners: the ring's closing position, which repeats the first, isn't one. A position that repeats the one before it is dropped. - `areaSqKm` is the area on the Earth's surface (WGS84). - A shape that isn't acceptable is `400 shape_invalid` or `400 shape_too_large`, naming the field `geometry` and a `reason`; see [drawn shapes](https://docs.apidata.one/concepts/shapes.md). Anything else wrong with the body (an unknown key, a bad name, no `geometry`) is `400 validation_failed`. - The 101st shape is `409 limit_reached`. - `Idempotency-Key` is accepted: see [idempotency](https://docs.apidata.one/concepts/idempotency.md). - Refused with `403 account_suspended` while the account is suspended. _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._ ================================================================================ PAGE: GET /v1/saved-shapes/{id} URL: https://docs.apidata.one/reference/endpoints/get-saved-shape/ ================================================================================ # GET /v1/saved-shapes/{id} One saved shape, with its geometry. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | Premium | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The saved shape's ID, "shp_…". | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 200: The saved shape The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [SavedShape](https://docs.apidata.one/reference/objects.md#savedshape). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More One shape with its `geometry`, as `POST` returned it, or `404 not_found`. _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._ ================================================================================ PAGE: DELETE /v1/saved-shapes/{id} URL: https://docs.apidata.one/reference/endpoints/delete-saved-shape/ ================================================================================ # DELETE /v1/saved-shapes/{id} Delete a saved shape. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | Premium | | Environment | live and sandbox | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The saved shape's ID, "shp_…". | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 204: Deleted No body. ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`client_token_required`](https://docs.apidata.one/errors/client_token_required.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`tier_insufficient`](https://docs.apidata.one/errors/tier_insufficient.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 409 | [`shape_in_use`](https://docs.apidata.one/errors/shape_in_use.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More `204` with no body, or `404 not_found`. Reads and deletes keep working while the account is suspended. A shape that one of the consumer's [saved searches](https://docs.apidata.one/reference/saved-searches.md) names isn't deleted: the answer is [`409 shape_in_use`](https://docs.apidata.one/errors/shape_in_use.md), and `savedSearchIds` lists the searches. Edit or delete those first. _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._ ================================================================================ PAGE: GET /v1/events URL: https://docs.apidata.one/reference/endpoints/list-events/ ================================================================================ # GET /v1/events The account's notices, oldest first: the pull alternative to webhooks. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | works | ## Query | Name | Type | Description | | --- | --- | --- | | `after` | string | The id of the last notice you handled. The answer starts with the one after it. | | `types` | string | Only these notice types, separated by commas: saved_search.matches, favorite.listing_updated, favorite.listing_removed, listing.removed, account.suspended, account.reinstated, data.stale. | | `limit` | integer | Notices a page: 1 to 100. 100 when left out. | ## Answers ### 200: One page of notices. A page can be short, or empty, with hasMore still true The answer is `{ data, meta }`; `meta` holds `requestId`, `environment` and `page`. `data` is a list of [Notice](https://docs.apidata.one/reference/objects.md#notice). `meta.page`: | Field | Type | Description | | --- | --- | --- | | `limit` | integer | | | `hasMore` | boolean | true: call again at once. false: wait, then call with the same `after`. | ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Your account's [notices](https://docs.apidata.one/concepts/webhooks.md), oldest first: the same JSON a webhook carries. Use it when your server has no public address for a webhook, or to catch up after your endpoint was down for longer than the 24 hours a delivery is retried. The list is the whole account's: `X-Client-Id` is not read, and a notice for a consumer carries its `clientId`. It holds only your account's notices, in the environment of the key. ``` GET /v1/events?after=evt_3yQ8mT1xKp7Zc2Nf5Rb9Wd&types=saved_search.matches,listing.removed&limit=100 ``` ```json { "data": [ { "id": "evt_…", "type": "listing.removed", "createdAt": "2026-11-13T15:00:00.000Z", "accountId": "…", "listingKeys": ["300451207716"], "changes": ["removed"] } ], "meta": { "requestId": "req_…", "environment": "live", "page": { "limit": 100, "hasMore": false } } } ``` ### Reading it 1. Call without `after` the first time. Handle each notice in order. 2. Remember the `id` of the last notice you handled, and pass it as `after` on the next call. 3. While `meta.page.hasMore` is `true`, call again at once. When it is `false`, wait (a minute is a sensible pace) and call again with the same `after`. **A page can come back short, or empty, with `hasMore` still `true`.** A notice gets its place in the list when the list is read, a bounded number per call. After a long gap, for instance when you have taken your notices by webhook until now, the list catches up a part at a time. Keep calling while `hasMore` is `true`: every call makes progress. **`after` can be the `id` of any notice of your account,** also one you received by webhook and have never seen in this list. You then get the notices that come after it; until the list has caught up to it, the page is empty and `hasMore` is `true`. **Nothing is skipped.** The list is in the order the API handed notices out, not strictly by `createdAt`: a notice that was recorded a moment late is placed after the ones already served, so a client paging with `after` always reaches it. Order by position in the list, and de-duplicate by `id` if you also receive webhooks. `after` keeps working when its notice is no longer listed: one that was deleted with its consumer or its saved search, or hidden by a reinstatement, still marks your place. ### What the list holds - **30 days.** A notice is deleted 30 days after it was recorded. - **`types`** filters the answer; `after` may name a notice of any type. - A [`ping`](https://docs.apidata.one/concepts/webhooks.md#the-seven-types) is never in the list. - Deleting a consumer (`DELETE /v1/clients/{clientId}`) deletes that consumer's notices, and deleting a saved search deletes its `saved_search.matches` notices. - **After a reinstatement,** notices recorded more than 24 hours before it are no longer listed. [Re-check your stored listings](https://docs.apidata.one/concepts/webhooks.md#suspension-and-reinstatement). ### When it refuses - `400 validation_failed` on `after` when it names no notice of your account: an ID that never existed, another account's, or a notice past its 30 days. **To recover, call again without `after`,** which starts at the oldest notice kept, and skip the IDs you have already handled. This happens to a reader that was stopped for more than 30 days. - `400 validation_failed` for a `limit` out of range, an unknown type in `types`, or a parameter other than these three. - [`403 account_suspended`](https://docs.apidata.one/errors/account_suspended.md) while the account is suspended. - `500 temporarily_unavailable` with `Retry-After` when two readers of the same account call at the same moment and one would have to wait more than a second. Calling again is safe. Run one reader per account. _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._ ================================================================================ PAGE: GET /v1/webhook-endpoints URL: https://docs.apidata.one/reference/endpoints/list-webhook-endpoints/ ================================================================================ # GET /v1/webhook-endpoints The account's webhook endpoints, newest first. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | works | | During a data stop | works | ## Answers ### 200: The endpoints The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a list of [WebhookEndpoint](https://docs.apidata.one/reference/objects.md#webhookendpoint). ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The account's endpoints, newest first, each as [the object](https://docs.apidata.one/reference/webhook-endpoints.md#the-object), never with its secret. _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._ ================================================================================ PAGE: POST /v1/webhook-endpoints URL: https://docs.apidata.one/reference/endpoints/create-webhook-endpoint/ ================================================================================ # POST /v1/webhook-endpoints Register an address for notices; its secret is shown once, in this answer. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `Idempotency-Key` | A new random value for this action, such as a UUID. A repeat with the same value and the same request gets the first answer again, and nothing is saved twice ([idempotency](https://docs.apidata.one/concepts/idempotency.md)). | ## Body | Field | Type | Description | | --- | --- | --- | | `url` | string | https://, with a host name, at most 2,048 characters. It must answer a ping with a 2xx. | | `eventTypes` | list of `saved_search.matches`, `favorite.listing_updated`, `favorite.listing_removed`, `listing.removed`, `account.suspended`, `account.reinstated`, `data.stale` | (optional) The notice types the endpoint receives. Left out when creating: all seven. | | `description` | string | (optional) A note of your own, 1 to 200 characters. | ```json { "url": "https://example.com/webhooks/apidata", "eventTypes": [ "saved_search.matches", "listing.removed" ], "description": "Production site" } ``` ## Answers ### 201: Registered. The answer holds the secret, this once The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data`: | Field | Type | Description | | --- | --- | --- | | `id` | string | "wh_…". | | `url` | string | The https:// address notices are sent to. It can not be changed. | | `eventTypes` | list of `saved_search.matches`, `favorite.listing_updated`, `favorite.listing_removed`, `listing.removed`, `account.suspended`, `account.reinstated`, `data.stale` | The notice types the endpoint receives. | | `description` | string or null | | | `enabled` | boolean | false pauses the endpoint: nothing is sent to it, and what it misses is not sent later. | | `createdAt` | string | | | `secret` | string | (not always present) "whsec_…": what signs requests to this endpoint. Shown this once; a repeat under the same Idempotency-Key leaves it out. | ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md), [`webhook_destination_refused`](https://docs.apidata.one/errors/webhook_destination_refused.md), [`webhook_ping_failed`](https://docs.apidata.one/errors/webhook_ping_failed.md), [`webhook_url_invalid`](https://docs.apidata.one/errors/webhook_url_invalid.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 409 | [`idempotency_conflict`](https://docs.apidata.one/errors/idempotency_conflict.md), [`limit_reached`](https://docs.apidata.one/errors/limit_reached.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More ```json { "url": "https://example.com/webhooks/apidata", "eventTypes": ["saved_search.matches", "listing.removed"], "description": "Production site" } ``` A `url` that isn't `https://`, names an IP address instead of a host name, or holds a user name, a password or a fragment (`#…`) is [`400 webhook_url_invalid`](https://docs.apidata.one/errors/webhook_url_invalid.md). Any other problem with the body is `400 validation_failed`, naming each field under `body.`. **Registration sends a ping.** Before anything is saved, the API: 1. resolves the host and checks that **every** address it resolves to is public. If not: [`400 webhook_destination_refused`](https://docs.apidata.one/errors/webhook_destination_refused.md); 2. sends a signed [`ping`](https://docs.apidata.one/concepts/webhooks.md#the-seven-types) to the URL and waits up to 10 seconds for a 2xx. If it doesn't get one: [`400 webhook_ping_failed`](https://docs.apidata.one/errors/webhook_ping_failed.md), with `result` saying what happened (`timeout`, `http_status` with `statusCode`, `tls_failed`, `connection_failed` or `redirect_not_followed`). So your endpoint must be deployed and answering before you register it. This first ping is signed with the new secret, which you receive only in the answer, so it can't be verified. The rule for your endpoint ([in full](https://docs.apidata.one/concepts/webhooks.md#receiving-a-webhook)): - **answer every `ping` with a 2xx**, whether or not its signature verifies, and never act on one. A ping is a request whose `ApiData-Event-Type` header is `ping`, and it carries nothing; - **until the secret is stored on your server, answer every other request `503`.** It is retried for 24 hours, so nothing is lost. A 2xx would mean "received", and that notice would never come again; - **once the secret is stored, verify every other request**, and answer one that fails `400`. This holds for a second endpoint as well: its registration ping is signed with its own new secret, not with one you already hold. **Deliveries start as soon as the endpoint is saved.** It receives every notice given out from then on, which can include one recorded a few seconds earlier, so store `secret` at once. To check that your verification works, send `POST …/{id}/test` and log whether its ping verified. Response `201`: the object, plus the secret. ```json { "id": "wh_…", "url": "https://example.com/webhooks/apidata", "eventTypes": ["saved_search.matches", "listing.removed"], "description": "Production site", "enabled": true, "createdAt": "2026-11-13T15:00:00.000Z", "secret": "whsec_…" } ``` **Store `secret` now.** It is never shown again, by any route. If you lose it, delete the endpoint and create it again. - The 11th endpoint of an account is `409 limit_reached`. - An account may make 10 registrations and tests in any 10 minutes, and two registrations at the same time. Past that: `429 rate_limited` with `Retry-After`. A request refused for its body or its URL doesn't count. - `Idempotency-Key` is accepted ([idempotency](https://docs.apidata.one/concepts/idempotency.md)). A repeat of a registration that succeeded returns the same endpoint **without `secret`**: the secret is never kept where it could be shown again. If the first answer was lost, delete the endpoint and create it again. A repeat while the first request is still pinging is `409 idempotency_conflict`. - Refused with `403 account_suspended` while the account is suspended. _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._ ================================================================================ PAGE: GET /v1/webhook-endpoints/{id} URL: https://docs.apidata.one/reference/endpoints/get-webhook-endpoint/ ================================================================================ # GET /v1/webhook-endpoints/{id} One webhook endpoint. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The endpoint's ID, "wh_…". | ## Answers ### 200: The endpoint The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [WebhookEndpoint](https://docs.apidata.one/reference/objects.md#webhookendpoint). ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). _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._ ================================================================================ PAGE: PATCH /v1/webhook-endpoints/{id} URL: https://docs.apidata.one/reference/endpoints/update-webhook-endpoint/ ================================================================================ # PATCH /v1/webhook-endpoints/{id} Change an endpoint's notice types or description, or pause it. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The endpoint's ID, "wh_…". | ## Body Send any of the three; only what you send changes. The address can not be changed. | Field | Type | Description | | --- | --- | --- | | `eventTypes` | list of `saved_search.matches`, `favorite.listing_updated`, `favorite.listing_removed`, `listing.removed`, `account.suspended`, `account.reinstated`, `data.stale` | (optional) The notice types the endpoint receives. Left out when creating: all seven. | | `description` | string or null | (optional) null removes it. | | `enabled` | boolean | (optional) | ```json { "enabled": false } ``` ## Answers ### 200: The endpoint as it is now The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [WebhookEndpoint](https://docs.apidata.one/reference/objects.md#webhookendpoint). ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Send any of `eventTypes`, `description` and `enabled`; only what you send changes. `description: null` removes the description. An empty body is `400 validation_failed`. Response `200` with the object. - **The URL can't be changed.** Create a new endpoint for the new URL, then delete the old one. Sending `url` is `400 validation_failed`. - `eventTypes` must name at least one type. To stop deliveries, set `enabled` to `false`. - Refused with `403 account_suspended` while the account is suspended. _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._ ================================================================================ PAGE: DELETE /v1/webhook-endpoints/{id} URL: https://docs.apidata.one/reference/endpoints/delete-webhook-endpoint/ ================================================================================ # DELETE /v1/webhook-endpoints/{id} Delete an endpoint, with its secret and its delivery list. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The endpoint's ID, "wh_…". | ## Answers ### 204: Deleted No body. ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More `204` with no body, or `404 not_found`. Its secret and its delivery list go with it. Works while the account is suspended. _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._ ================================================================================ PAGE: GET /v1/webhook-endpoints/{id}/deliveries URL: https://docs.apidata.one/reference/endpoints/list-webhook-deliveries/ ================================================================================ # GET /v1/webhook-endpoints/{id}/deliveries An endpoint's deliveries of the last 30 days, newest first. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The endpoint's ID, "wh_…". | ## Query | Name | Type | Description | | --- | --- | --- | | `limit` | integer | Deliveries a page: 1 to 100. 50 when left out. | | `cursor` | string | The nextCursor of the page before, exactly as it came. | ## Answers ### 200: One page of deliveries The answer is `{ data, meta }`; `meta` holds `requestId`, `environment` and `page`. `data` is a list of [WebhookDelivery](https://docs.apidata.one/reference/objects.md#webhookdelivery). `meta.page` is a [CursorPage](https://docs.apidata.one/reference/objects.md#cursorpage). ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The endpoint's deliveries of the last 30 days, newest first. ```json { "data": [ { "id": "dlv_…", "eventId": "evt_…", "type": "saved_search.matches", "status": "pending", "attempts": 3, "lastAttemptAt": "2026-11-13T15:03:00.000Z", "nextAttemptAt": "2026-11-13T15:07:00.000Z", "lastResult": "http_status", "lastStatusCode": 500 } ], "meta": { "requestId": "req_…", "environment": "live", "page": { "limit": 50, "nextCursor": null } } } ``` | `lastResult` | What the last attempt came to | | ----------------------- | -------------------------------------------------------------------------- | | `http_status` | Your server answered. A 2xx succeeded; any other status failed | | `timeout` | No answer within 10 seconds | | `refused_destination` | The host resolved to an address that isn't public, so nothing was sent | | `tls_failed` | The TLS certificate did not verify for the URL's host name | | `connection_failed` | The name did not resolve, or no connection could be made | | `redirect_not_followed` | Your server answered with a redirect. Redirects are never followed | Nothing your server answered is ever kept: no body, no headers, only the status code. Paging: `limit` is 1 to 100, 50 by default. When `meta.page.nextCursor` isn't `null`, send it back unchanged as `cursor` for the next page. A cursor this list didn't give is `400 validation_failed`. Works while the account is suspended. _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._ ================================================================================ PAGE: POST /v1/webhook-endpoints/{id}/test URL: https://docs.apidata.one/reference/endpoints/test-webhook-endpoint/ ================================================================================ # POST /v1/webhook-endpoints/{id}/test Send a signed ping to an endpoint. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The endpoint's ID, "wh_…". | ## Answers ### 202: Queued: the ping's delivery, to look up in the delivery list The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [WebhookDelivery](https://docs.apidata.one/reference/objects.md#webhookdelivery). ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Queues a signed `ping` to the endpoint and answers `202` at once with the ping's delivery: ```json { "id": "dlv_…", "eventId": null, "type": "ping", "status": "pending", "attempts": 0, "lastAttemptAt": null, "nextAttemptAt": "2026-11-13T15:00:00.000Z", "lastResult": null, "lastStatusCode": null } ``` The ping is sent within seconds, once, and is never retried. Find its result in the delivery list by `id`. - A disabled endpoint is `400 validation_failed`: enable it first. - Tests count toward the 10 registrations and tests in any 10 minutes. - Refused with `403 account_suspended` while the account is suspended. _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._ ================================================================================ PAGE: GET /v1/account URL: https://docs.apidata.one/reference/endpoints/get-account/ ================================================================================ # GET /v1/account Your account: its plan, status, website addresses and, for a secret key, its keys. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | every plan | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | works | | During a data stop | works | ## Answers ### 200: The account The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [Account](https://docs.apidata.one/reference/objects.md#account). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Works while the account is suspended, so you can see why. While the account is pending, a live key works here only if it is the `sk_` key (a live `pk_` key gets `403 account_pending`, like everywhere else); test keys always work. With a **`pk_`** key (public, so only what a site needs): ```json { "data": { "id": "6f1c…", "type": "agent", "tier": "basic", "status": "active", "environment": "test", "domains": ["https://example.com"], "complianceProfile": { "brokerageDisplayName": "Example Realty LLC", "agentLicenseStates": ["PA", "NJ"], "participantBrokerageName": "Example Realty LLC" } }, "meta": { "requestId": "req_…", "environment": "test" } } ``` With an **`sk_`** key, the same plus: ```json { "accountTier": "basic", "suspendedAt": null, "closedAt": null, "verification": { "status": "unverified", "verifiedAt": null }, "brightIdentity": { "memberKey": null, "officeKey": null, "signingMainOfficeKey": null, "signingBrokerKey": null }, "createdAt": "2026-11-02T12:00:00.000Z", "keys": [ { "id": "key_…", "kind": "sk", "env": "test", "last4": "Ab3d", "sandboxTier": null, "possiblyExposed": false, "possiblyExposedAt": null, "revokedAt": null, "createdAt": "…" } ] } ``` `tier` is the tier this key gets: for a test key, the sandbox tier chosen when it was made; otherwise the account tier. `keys[].possiblyExposed` is set when a secret key was seen from a browser; rotate such keys. Keys are never shown, only their `last4`. _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._ ================================================================================ PAGE: GET /v1/compliance URL: https://docs.apidata.one/reference/endpoints/get-compliance/ ================================================================================ # GET /v1/compliance Every disclosure text, for footers and email templates. | 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 | works | ## Answers ### 200: The bundle The answer is `{ data, meta, warnings }`; `meta` holds `requestId` and `environment`. `data` is a [ComplianceBundle](https://docs.apidata.one/reference/objects.md#compliancebundle). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More [The block](https://docs.apidata.one/reference/compliance.md#the-block) with both `closed` and `comingSoon` present, plus `completeness` (the IDX non-participation notice), `emailSource` ("Property information provided by Bright MLS"), `withheld` (the notice for a withheld address) and `email`, the strings an email template needs in one object (`source`, `copyright`, `accuracy`, `personalUse`, `availability`, `lastUpdated`). The response has the same shape on live and on the sandbox. The bundle holds no listing content, so it is served during the 12-hour stop too. _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._ ================================================================================ PAGE: GET /v1/lookups/{name} URL: https://docs.apidata.one/reference/endpoints/get-lookup/ ================================================================================ # GET /v1/lookups/{name} One of the API's lists of values, with a label for each. | 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 | works | ## Path | Name | Type | Description | | --- | --- | --- | | `name` | `statuses`, `property-classes`, `structure-types`, `sorts` | **Required.** Which list. | ## Answers ### 200: The list The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data`: | Field | Type | Description | | --- | --- | --- | | `name` | string | | | `values` | list of object | | | `values[].value` | string | | | `values[].label` | string | | ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](https://docs.apidata.one/errors/client_token_account_mismatch.md), [`client_token_expired`](https://docs.apidata.one/errors/client_token_expired.md), [`client_token_invalid`](https://docs.apidata.one/errors/client_token_invalid.md), [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More The API's own lists of values, for building filters and labels. Not listing content, so served during the 12-hour stop. | `name` | Values | | ------------------- | ------------------------------------------------------------------------------------------ | | `statuses` | `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | | `property-classes` | `residential`, `residential_lease`, `land`, `farm`, `commercial_sale`, `commercial_lease`, `business_opportunity`, `manufactured_in_park`, `multi_family`, `other` | | `structure-types` | `detached`, `twin_semi_detached`, `row_townhouse_interior`, `row_townhouse_end`, `condo_apartment`, `multi_family`, `deeded_parking`, `manufactured`, `other` | | `sorts` | `price_asc`, `price_desc`, `newest`, `beds_desc`, `baths_desc`, `sqft_desc`, `close_date_desc`, `distance` | ```json { "data": { "name": "statuses", "values": [ { "value": "active", "label": "Active" }, { "value": "coming_soon", "label": "Coming Soon" } ] } } ``` An unknown name is `404 not_found`. _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._ ================================================================================ PAGE: GET /v1/status URL: https://docs.apidata.one/reference/endpoints/get-status/ ================================================================================ # GET /v1/status Whether the service runs and how fresh its data is. No key needed. | Access | | | --- | --- | | Keys | none | ## Answers ### 200: The status The answer is `{ data, meta }`; `meta` holds `requestId`. `data` is a [Status](https://docs.apidata.one/reference/objects.md#status). ### 500: The database could not be read: the same body, with service "database_unreachable" The answer is `{ data, meta }`; `meta` holds `requestId`. `data` is a [Status](https://docs.apidata.one/reference/objects.md#status). ## Errors | Status | Codes | | --- | --- | | 400 | [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Service health and data freshness, for anyone: no key is read. ```json { "data": { "service": "ok", "version": "0.9.0-m9", "freshness": { "live": { "stale": false, "stopActive": false, "dataLastUpdatedAt": "2026-11-03T12:05:40.000Z", "clocks": { "delta": { "startedAt": "2026-11-03T12:05:00.000Z", "completedAt": "2026-11-03T12:05:40.000Z", "ageSeconds": 95, "stale": false }, "keySweep": { "startedAt": "2026-11-03T08:00:00.000Z", "completedAt": "2026-11-03T08:41:12.000Z", "ageSeconds": 14795, "stale": false, "purgeHeld": false }, "rosterSweep": { "startedAt": "2026-11-03T06:20:00.000Z", "completedAt": "2026-11-03T06:31:03.000Z", "ageSeconds": 20795, "stale": false } }, "openHouses": { "stale": false, "clocks": { "delta": { "startedAt": "2026-11-03T12:02:00.000Z", "completedAt": "2026-11-03T12:02:05.000Z", "ageSeconds": 275, "stale": false }, "recount": { "startedAt": "2026-11-03T11:30:00.000Z", "completedAt": "2026-11-03T11:30:20.000Z", "ageSeconds": 2195, "stale": false } } } }, "test": { "stale": false, "stopActive": false, "exempt": true, "dataLastUpdatedAt": "2026-11-03T12:03:11.000Z" } } }, "meta": { "requestId": "req_…" } } ``` Live listing data is served only while each of three pulls started less than 12 hours ago: the last change check (`delta`), the last complete key sweep whose purges finished (`keySweep`), and the last complete roster sweep (`rosterSweep`). Each clock reports when that pull started and finished, its age in seconds, and whether it is stale. A clock that is missing or unreadable counts as stale, so before replication has run every clock reads `startedAt: null, stale: true`. - `stale` is true when any clock is stale; `stopActive` says whether the 12-hour stop is on (the same value today). - `dataLastUpdatedAt` is the completion time of the latest gap-free change check. It freezes at its last value once the key sweep is more than 12 hours old, even while change checks keep succeeding, and is never cleared. - `keySweep.purgeHeld` is true while a purge is held by the removal guardrails; a held purge doesn't advance the sweep clock, so the clock then ages from the last sweep whose purges finished. - Listing endpoints answer `500 data_stale` while the stop is on. Sandbox (`test`) keys are never stopped: the sandbox's listings are made up and don't come from a sync. - `test.dataLastUpdatedAt` is the sandbox's own clock: when its change job last finished. That job runs every 5 minutes, so the value is normally a few minutes old. It is `null` on a sandbox whose change job has never run. Sandbox responses carry this same value in `meta.dataLastUpdatedAt` and in the compliance block. - `openHouses` reports the open-house feed's two marks: `delta` (the last incremental pull or full pull) and `recount` (the last full, count-checked pull). While either is past 12 hours or missing, `openHouses.stale` is true: listing details are served with `openHouses: []` and the warning `open_houses_stale`, and the `openHouse` search filter answers `500 data_stale` with `details.feed: "openHouses"`. The marks never feed `stale` or `stopActive`. ### The `geography` block Beside `freshness`, the body carries `geography`: the counts of the last geography build, or `null` before the first one. Counts only, never a shape. ```json "geography": { "builtAt": "2026-11-05T14:00:00.000Z", "vintage": { "tiger_county": "2026", "cb_county": "2025", "nces_district": "SY2024-25", "gnis": "current" }, "places": { "total": 12900, "byKind": { "state": 7, "county": 304, "municipality": 3749, "cdp": 2450, "community": 480, "zcta": 4674, "postal_city": 2100, "subdivision": 60000, "school_district": 1286 } }, "crosswalk": { "rows": 8722, "resolved": 6300, "review": 27, "gaps": 180, "deferred": 2214 }, "memberships": { "computedAt": "2026-11-05T14:30:00.000Z", "listings": 1059157, "withMemberships": 1059157, "located": 1056086, "suppressed": 2544, "noCoordinates": 527, "pointOutsideRegion": 229 }, "derived": { "succeededAt": "2026-11-07T07:55:00.000Z", "listingsWithoutCityPlace": 0, "listingsWithoutSubdivisionPlace": 0, "changedKeys": 3 } } ``` - `vintage` names each boundary source's edition. - `crosswalk` summarises the owner's place index against the places: rows resolved to a place, rows resolved but listed for review, documented gaps, and neighborhood rows that wait for a later release. - `memberships` says how many listings carry place memberships, how many were placed by their coordinates, and how many hidden-address or no-coordinate listings were placed by their own fields only. `pointOutsideRegion` counts listings whose point lies in no county of the seven jurisdictions: they are placed by their own fields, never by that point. - `derived` is the daily run that gives newly seen cities and subdivisions their places: when it last succeeded, and the two counts it took as it ended, `listingsWithoutCityPlace` and `listingsWithoutSubdivisionPlace`: the listings the run left naming a city or subdivision with no place (placeholders don't count). 0 is expected. A listing that brings a new city or subdivision after a run waits for the next run, up to a day, and isn't counted in the meantime. `null` until the first run. _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._ ================================================================================ PAGE: POST /v1/sandbox/triggers URL: https://docs.apidata.one/reference/endpoints/create-sandbox-trigger/ ================================================================================ # POST /v1/sandbox/triggers Make a change happen in the sandbox now: a match, a favorite that changes, a removal. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | sandbox only | | Acts for | one consumer | | While the account is suspended | refused | | During a data stop | works | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Body | Field | Type | Description | | --- | --- | --- | | `event` | `saved_search.matches`, `favorite.listing_updated`, `listing.removed` | | | `savedSearchId` | string | (optional) With saved_search.matches: one of this consumer's saved searches. | | `listingKey` | string | (optional) With favorite.listing_updated: one of this consumer's favorites. With listing.removed: a listing a trigger of your account made. | | `kind` | `price`, `status`, `photos`, `open_house` | (optional) With favorite.listing_updated: which change to make. | ```json { "event": "saved_search.matches", "savedSearchId": "ss_Hq2Lw9Xc4Vb7Nm1Kp6Tz3R" } ``` ## Answers ### 202: Accepted: the change is made within seconds The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [SandboxTriggerAccepted](https://docs.apidata.one/reference/objects.md#sandboxtriggeraccepted). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`account_suspended`](https://docs.apidata.one/errors/account_suspended.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 404 | [`listing_not_found`](https://docs.apidata.one/errors/listing_not_found.md), [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 409 | [`sandbox_listing_protected`](https://docs.apidata.one/errors/sandbox_listing_protected.md), [`sandbox_trigger_not_possible`](https://docs.apidata.one/errors/sandbox_trigger_not_possible.md), [`saved_search_not_active`](https://docs.apidata.one/errors/saved_search_not_active.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More Send your `sk_test_` key and `X-Client-Id`, with one of three bodies: | `event` | Also send | What happens | | -------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `saved_search.matches` | `savedSearchId`: one of this consumer's saved searches | A new made-up listing appears that matches the search. | | `favorite.listing_updated` | `listingKey`: one of this consumer's favorites; `kind`: `price`, `status`, `photos` or `open_house` | That change is made to that listing. | | `listing.removed` | `listingKey`: a listing that a trigger of your account made | The listing is removed, as a listing that leaves the market on live is. | The answer is `202`: ```json { "data": { "id": "trg_…", "event": "saved_search.matches", "listingKey": "SBXT…", "change": { "kind": "new_listing", "status": "active" }, "notice": "instant", "status": "pending" } } ``` - `listingKey` is the listing that is made or changed. Listings made by a trigger have keys that start `SBXT`. - `notice` is `instant` when the notice follows within about 10 seconds, or `next_digest` when the saved search's `alertFrequency` is `daily` or `weekly`: then the listing is made now and the notice comes with the search's next digest. - A `status` change follows a fixed order: Active, Active Under Contract, Pending, Closed. Coming Soon goes to Active. _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._ ================================================================================ PAGE: GET /v1/sandbox/triggers/{id} URL: https://docs.apidata.one/reference/endpoints/get-sandbox-trigger/ ================================================================================ # GET /v1/sandbox/triggers/{id} How a sandbox trigger ended. | Access | | | --- | --- | | Keys | secret only | | Plan | every plan | | Environment | sandbox only | | Acts for | one consumer | | While the account is suspended | works | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `id` | string | **Required.** The trigger's ID, "trg_…", from the answer that accepted it. | ## Headers | Name | Description | | --- | --- | | `X-Client-Token` | With a publishable key: **required.** A token your server minted for the consumer with [`POST /v1/client-tokens`](https://docs.apidata.one/reference/endpoints/create-client-token.md). | | `X-Client-Id` | With a secret key: **required.** Your own opaque ID for the consumer. | ## Answers ### 200: The trigger The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data` is a [SandboxTrigger](https://docs.apidata.one/reference/objects.md#sandboxtrigger). ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](https://docs.apidata.one/errors/client_id_must_be_opaque.md), [`validation_failed`](https://docs.apidata.one/errors/validation_failed.md) | | 401 | [`invalid_api_key`](https://docs.apidata.one/errors/invalid_api_key.md), [`key_revoked`](https://docs.apidata.one/errors/key_revoked.md), [`missing_api_key`](https://docs.apidata.one/errors/missing_api_key.md) | | 403 | [`account_pending`](https://docs.apidata.one/errors/account_pending.md), [`origin_not_allowed`](https://docs.apidata.one/errors/origin_not_allowed.md), [`secret_key_in_browser`](https://docs.apidata.one/errors/secret_key_in_browser.md), [`secret_key_required`](https://docs.apidata.one/errors/secret_key_required.md) | | 404 | [`not_found`](https://docs.apidata.one/errors/not_found.md) | | 429 | [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md) | | 500 | [`internal_error`](https://docs.apidata.one/errors/internal_error.md), [`temporarily_unavailable`](https://docs.apidata.one/errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ## More With the same key and `X-Client-Id`, shows how a trigger ended: - `status`: `pending`, `done` or `failed`; - `noticeId`: the ID of the notice the change produced, once `done` (the same ID as in `GET /v1/events` and in the webhook delivery); `null` for `next_digest`; - `reason`: why a `failed` trigger could not be completed ([when a trigger fails](https://docs.apidata.one/reference/sandbox-triggers.md#when-a-trigger-fails)). _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._ ================================================================================ PAGE: Objects URL: https://docs.apidata.one/reference/objects/ ================================================================================ # Objects Every object the API sends or takes, field by field. An object holds exactly these fields: one that is not listed here is never sent. A field marked "not always present" is left out when it does not apply; a field that can be `null` says so in its type. ## Account Your account. A publishable key sees what a site needs; a secret key also sees the rest, its keys among them. | Field | Type | Description | | --- | --- | --- | | `id` | string | The account's ID. | | `type` | `agent`, `broker` | | | `tier` | `basic`, `premium` | The plan this key gets: for a test key, the one chosen when it was made. | | `status` | `pending`, `active`, `suspended`, `closed` | | | `environment` | `live`, `test` | | | `domains` | list of string | The website addresses a publishable key works from, each a scheme, host and port. | | `complianceProfile` | object | | | `complianceProfile.brokerageDisplayName` | string or null | Your brokerage, as shown in the disclosures. | | `complianceProfile.agentLicenseStates` | list of string | | | `complianceProfile.participantBrokerageName` | string or null | The brokerage that takes part in the IDX program. | | `accountTier` | `basic`, `premium` | (not always present) The account's own plan. | | `suspendedAt` | string or null | (not always present) | | `closedAt` | string or null | (not always present) | | `verification` | object | (not always present) | | `verification.status` | string | | | `verification.verifiedAt` | string or null | | | `brightIdentity` | object | (not always present) | | `brightIdentity.memberKey` | string or null | | | `brightIdentity.officeKey` | string or null | | | `brightIdentity.signingMainOfficeKey` | string or null | | | `brightIdentity.signingBrokerKey` | string or null | | | `createdAt` | string | (not always present) | | `keys` | list of object | (not always present) The account's keys. | | `keys[].id` | string | "key_…". | | `keys[].kind` | `pk`, `sk` | | | `keys[].env` | `live`, `test` | | | `keys[].last4` | string | The key's last four characters. A key itself is never shown. | | `keys[].sandboxTier` | `basic`, `premium` or null | | | `keys[].possiblyExposed` | boolean | True when the secret key was seen from a browser: replace it. | | `keys[].possiblyExposedAt` | string or null | | | `keys[].revokedAt` | string or null | | | `keys[].createdAt` | string | | ## Compliance The notices Bright requires beside listing content, filled in for your account. Show the texts as given; never copy them into a template. | Field | Type | Description | | --- | --- | --- | | `copyright` | string | Show on every page with a listing. | | `accuracy` | string | Show on every page with a listing. | | `idxSource` | string | Show on the home page or every search page. It names your brokerage. | | `personalUse` | string | Show on the home page or every search page. | | `availability` | string | Show on the home page or every search page. | | `lastUpdated` | string or null | The time of the last successful data update, in Eastern time, ready to show: "Data last updated: 11/10/2026 at 9:59 AM ET". Show on every page with a listing. Null when there is no such time to give (in the sandbox, until its first change has run): then show nothing in its place, never a time of your own. | | `dataLastUpdatedAt` | string or null | The same instant, in ISO 8601. | | `advertisingBrokerage` | object | | | `advertisingBrokerage.name` | string | Your brokerage, as licensed. Show it on every page with a listing. | | `advertisingBrokerage.licenseStates` | list of string | For an agent: the states of licensure, to show with the name. | | `closed` | object | (not always present) Present only when the answer holds a Closed listing: its label and the two statements to show with it. | | `closed.label` | string | | | `closed.notAppraisal` | string | | | `closed.provider` | string | | | `comingSoon` | object | (not always present) Present only when the answer holds a Coming Soon listing: its label. | | `comingSoon.label` | string | | | `renderingRules` | list of string | Where each text goes on a page, in words. | | `poweredBy` | string | Optional to show. | ## ComplianceBundle Every disclosure text, for site footers and email templates: the compliance block with both `closed` and `comingSoon`, and the texts an email needs. | Field | Type | Description | | --- | --- | --- | | `copyright` | string | Show on every page with a listing. | | `accuracy` | string | Show on every page with a listing. | | `idxSource` | string | Show on the home page or every search page. It names your brokerage. | | `personalUse` | string | Show on the home page or every search page. | | `availability` | string | Show on the home page or every search page. | | `lastUpdated` | string or null | The time of the last successful data update, in Eastern time, ready to show: "Data last updated: 11/10/2026 at 9:59 AM ET". Show on every page with a listing. Null when there is no such time to give (in the sandbox, until its first change has run): then show nothing in its place, never a time of your own. | | `dataLastUpdatedAt` | string or null | The same instant, in ISO 8601. | | `advertisingBrokerage` | object | | | `advertisingBrokerage.name` | string | Your brokerage, as licensed. Show it on every page with a listing. | | `advertisingBrokerage.licenseStates` | list of string | For an agent: the states of licensure, to show with the name. | | `closed` | object | Present only when the answer holds a Closed listing: its label and the two statements to show with it. | | `closed.label` | string | | | `closed.notAppraisal` | string | | | `closed.provider` | string | | | `comingSoon` | object | Present only when the answer holds a Coming Soon listing: its label. | | `comingSoon.label` | string | | | `renderingRules` | list of string | Where each text goes on a page, in words. | | `poweredBy` | string | Optional to show. | | `completeness` | string | The notice for a site that claims to show every listing. | | `emailSource` | string | "Property information provided by Bright MLS". | | `withheld` | string | The notice shown in place of a withheld address. | | `email` | object | The texts an email with listing content must carry. | | `email.source` | string | | | `email.copyright` | string | | | `email.accuracy` | string | | | `email.personalUse` | string | | | `email.availability` | string | | | `email.lastUpdated` | string or null | | ## CursorPage | Field | Type | Description | | --- | --- | --- | | `limit` | integer | | | `nextCursor` | string or null | Send it as `cursor` for the next page. Null on the last page. | ## DistrictRef | Field | Type | Description | | --- | --- | --- | | `placeId` | string | The district as a place: search it with location.placeIds. | | `displayName` | string | | | `districtType` | string or null | unified, elementary or secondary. | | `grades` | string or null | The lowest and highest grade served, such as "KG-12". | ## DrawnShape A GeoJSON Polygon with exactly one ring: closed, 3 to 200 corners, not crossing itself, at most 5,000 km². Positions are [longitude, latitude]. | Field | Type | Description | | --- | --- | --- | | `type` | `Polygon` | | | `coordinates` | list of list of list of number | | ## Error | Field | Type | Description | | --- | --- | --- | | `error` | object | | | `error.code` | string | What went wrong. Decide by this, never by the message. | | `error.message` | string | What is wrong, in a sentence. | | `error.fix` | string | (not always present) Exactly what to do about it. | | `error.docs` | string | The address of this code's page in the docs. | | `error.requestId` | string | The ID of this request. Send it when you ask about an answer. | | `error.fields` | list of [FieldProblem](#fieldproblem) | (not always present) For validation_failed: every input that was wrong, at once. | ## Favorite One listing a consumer saved. It holds the listing's key and nothing else of it. | Field | Type | Description | | --- | --- | --- | | `id` | string | The favorite's ID, "fav_…". | | `listingKey` | string | The listing that was saved. | | `createdAt` | string | | ## FieldProblem | Field | Type | Description | | --- | --- | --- | | `path` | string | Which input, such as `price.min`, `body.listingKey` or `header.Idempotency-Key`. | | `problem` | string | | | `expected` | string | (not always present) | ## ListingDetail A listing in full, as its detail route returns it. | Field | Type | Description | | --- | --- | --- | | `listingKey` | string | The listing's lasting key. Use it in your page addresses and to fetch the listing. Treat it as text. | | `mlsNumber` | string or null | The MLS number shown to the public. It can change; the key does not. | | `status` | `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | | | `statusLabel` | string | The status in words, such as "Active Under Contract". | | `propertyClass` | `residential`, `residential_lease`, `land`, `farm`, `commercial_sale`, `commercial_lease`, `business_opportunity`, `manufactured_in_park`, `multi_family`, `other` | | | `structureType` | `detached`, `twin_semi_detached`, `row_townhouse_interior`, `row_townhouse_end`, `condo_apartment`, `multi_family`, `deeded_parking`, `manufactured`, `other` | | | `price` | object | | | `price.list` | number or null | The list price in US dollars. Null when the listing has none, or when its prices may not be shown. | | `price.close` | number or null | The sale price. Only for a Closed listing; null otherwise. | | `address` | object or null | | | `address.line1` | string or null | The street address, as Bright sends it. | | `address.unit` | string or null | | | `address.city` | string or null | The postal city, in title case. | | `address.state` | string or null | The two-letter state code. | | `address.postalCode` | string or null | | | `address.county` | string or null | The county, in title case. | | `addressDisplay` | `full`, `withheld` | "withheld": the seller asked that the address be hidden. The address and the location are then null. | | `addressNotice` | string | (not always present) Only when the address is withheld: the text to show in its place ("Contact Listing Agent for Additional Information"). | | `location` | object or null | The point for a map. Null when the address is withheld, when the listing has no coordinates, and when its point lies outside the seven jurisdictions. | | `location.lat` | number | | | `location.lng` | number | | | `beds` | integer or null | | | `baths` | object | | | `baths.total` | number or null | Full baths plus half a bath for each half bath. | | `baths.full` | integer or null | | | `baths.half` | integer or null | | | `livingAreaSqft` | integer or null | | | `lotSizeAcres` | number or null | | | `lotSizeSqft` | number or null | | | `yearBuilt` | integer or null | | | `daysOnMarket` | integer or null | Null for a Coming Soon listing, and when the listing does not allow it to be shown. Never compute it yourself. | | `expectedOnMarketDate` | string or null | For a Coming Soon listing: the day it is expected on the market. | | `closeDate` | string or null | The day of the sale. Only for a Closed listing; null otherwise. | | `photos` | object | | | `photos.count` | integer | How many photos the gallery has. | | `photos.primary` | [PhotoUrls](#photourls) or null | The first photo, or null when there is none. | | `photos.items` | list of object | Every photo of the gallery, in display order. | | `photos.items[].mediaKey` | string | | | `photos.items[].order` | integer | | | `photos.items[].caption` | string or null | | | `photos.items[].urls` | [PhotoUrls](#photourls) | | | `attribution` | object | Who must be credited for the listing. | | `attribution.listOfficeName` | string or null | The listing office. Show it on every card and thumbnail, and near the top of the detail page. | | `attribution.listOfficePhone` | string or null | | | `attribution.listOfficeEmail` | string or null | | | `attribution.listAgentName` | string or null | | | `attribution.listAgentPhone` | string or null | | | `attribution.listAgentEmail` | string or null | | | `attribution.coListOfficeName` | string or null | | | `attribution.coListAgentName` | string or null | | | `attribution.buyerOfficeName` | string or null | The selling office. Only for a Closed listing; null otherwise. | | `attribution.buyerAgentName` | string or null | The selling agent. Only for a Closed listing; null otherwise. | | `permissions` | object | What the listing's seller allows beside the listing. | | `permissions.avmDisplay` | boolean or null | False: show no estimated value for this listing, from any source. | | `permissions.consumerComments` | boolean or null | False: show no visitor comments or reviews on this listing. | | `slug` | string | Words for a page address, ending in the listing key: the street, city, state and ZIP code, or the city and state alone when the address is withheld. | | `isFavorite` | boolean | (not always present) Only when the request acts for one consumer (a client token, or X-Client-Id): whether the listing is among that consumer's favorites. | | `updatedAt` | string or null | When the listing last changed at Bright. | | `remarks` | string or null | The public remarks. | | `directions` | string or null | Only when the address is shown; null otherwise. | | `taxId` | string or null | Only when the address is shown; null otherwise. | | `virtualTourUrl` | string or null | The listing's tour link. Null for a Coming Soon listing, and for a Closed one whose seller hides its media. | | `media` | object | | | `media.links` | list of [MediaLink](#medialink) | The virtual tours and videos, in display order. Empty for a Coming Soon listing and under the off-market hide. | | `features` | object | The listing's other facts, by Bright's own field names in lowerCamelCase with the YN suffix kept (basementYN, heating, taxAnnualAmount): booleans, numbers, strings and lists of display strings. A fact the listing does not have is left out. | | `rooms` | list of [Room](#room) or null | The rooms, in display order, for a listing on the market. Null when the listing is off the market, and (with the warning rooms_stale) when the room list could not be refreshed in 12 hours. | | `openHouses` | list of [OpenHouse](#openhouse) | Public open houses that have not ended. Empty for a Coming Soon listing and for a withheld address. | | `places` | list of [PlaceRef](#placeref) | The places the listing belongs to. School districts on Premium only. | | `schools` | [ListingSchools](#listingschools) | (not always present) | | `priceHistory` | list of object | (not always present) Dated price events, oldest first. Left out for a Coming Soon listing and when the listing hides its price history. | | `priceHistory[].date` | string | A calendar date in Eastern time, YYYY-MM-DD. | | `priceHistory[].price` | number | | | `priceHistory[].kind` | `list`, `close` | | | `listingIdHistory` | list of object | The MLS numbers the listing has carried. | | `listingIdHistory[].mlsNumber` | string | | | `listingIdHistory[].firstSeenAt` | string | | | `listingIdHistory[].lastSeenAt` | string | | ## ListingSchools | Field | Type | Description | | --- | --- | --- | | `district` | [DistrictRef](#districtref) or null | The school district the listing lies in; the first of `districts`. Null when it lies in none. | | `districts` | list of [DistrictRef](#districtref) | Every district the listing lies in: a unified one, then an elementary one, then a secondary one. | | `assigned` | list of object | The schools the listing's agent entered, at most one a level. Empty when none was entered. | | `assigned[].level` | `elementary`, `middle_or_junior`, `high` | | | `assigned[].name` | string | | | `assigned[].source` | `listing` | Always "listing": the names are what the listing's agent entered, not a school authority's. | | `asOf` | string or null | The listing's updatedAt. | | `notice` | string | "School assignments are subject to change; verify with the school district." Show it with the schools. | ## ListingSchoolsAnswer | Field | Type | Description | | --- | --- | --- | | `listingKey` | string | | | `district` | [DistrictRef](#districtref) or null | The school district the listing lies in; the first of `districts`. Null when it lies in none. | | `districts` | list of [DistrictRef](#districtref) | Every district the listing lies in: a unified one, then an elementary one, then a secondary one. | | `assigned` | list of object | The schools the listing's agent entered, at most one a level. Empty when none was entered. | | `assigned[].level` | `elementary`, `middle_or_junior`, `high` | | | `assigned[].name` | string | | | `assigned[].source` | `listing` | Always "listing": the names are what the listing's agent entered, not a school authority's. | | `asOf` | string or null | The listing's updatedAt. | | `notice` | string | "School assignments are subject to change; verify with the school district." Show it with the schools. | ## ListingSummary A listing as a search returns it. | Field | Type | Description | | --- | --- | --- | | `listingKey` | string | The listing's lasting key. Use it in your page addresses and to fetch the listing. Treat it as text. | | `mlsNumber` | string or null | The MLS number shown to the public. It can change; the key does not. | | `status` | `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | | | `statusLabel` | string | The status in words, such as "Active Under Contract". | | `propertyClass` | `residential`, `residential_lease`, `land`, `farm`, `commercial_sale`, `commercial_lease`, `business_opportunity`, `manufactured_in_park`, `multi_family`, `other` | | | `structureType` | `detached`, `twin_semi_detached`, `row_townhouse_interior`, `row_townhouse_end`, `condo_apartment`, `multi_family`, `deeded_parking`, `manufactured`, `other` | | | `price` | object | | | `price.list` | number or null | The list price in US dollars. Null when the listing has none, or when its prices may not be shown. | | `price.close` | number or null | The sale price. Only for a Closed listing; null otherwise. | | `address` | object or null | | | `address.line1` | string or null | The street address, as Bright sends it. | | `address.unit` | string or null | | | `address.city` | string or null | The postal city, in title case. | | `address.state` | string or null | The two-letter state code. | | `address.postalCode` | string or null | | | `address.county` | string or null | The county, in title case. | | `addressDisplay` | `full`, `withheld` | "withheld": the seller asked that the address be hidden. The address and the location are then null. | | `addressNotice` | string | (not always present) Only when the address is withheld: the text to show in its place ("Contact Listing Agent for Additional Information"). | | `location` | object or null | The point for a map. Null when the address is withheld, when the listing has no coordinates, and when its point lies outside the seven jurisdictions. | | `location.lat` | number | | | `location.lng` | number | | | `beds` | integer or null | | | `baths` | object | | | `baths.total` | number or null | Full baths plus half a bath for each half bath. | | `baths.full` | integer or null | | | `baths.half` | integer or null | | | `livingAreaSqft` | integer or null | | | `lotSizeAcres` | number or null | | | `lotSizeSqft` | number or null | | | `yearBuilt` | integer or null | | | `daysOnMarket` | integer or null | Null for a Coming Soon listing, and when the listing does not allow it to be shown. Never compute it yourself. | | `expectedOnMarketDate` | string or null | For a Coming Soon listing: the day it is expected on the market. | | `closeDate` | string or null | The day of the sale. Only for a Closed listing; null otherwise. | | `photos` | object | | | `photos.count` | integer | How many photos the gallery has. | | `photos.primary` | [PhotoUrls](#photourls) or null | The first photo, or null when there is none. | | `attribution` | object | Who must be credited for the listing. | | `attribution.listOfficeName` | string or null | The listing office. Show it on every card and thumbnail, and near the top of the detail page. | | `attribution.listOfficePhone` | string or null | | | `attribution.listOfficeEmail` | string or null | | | `attribution.listAgentName` | string or null | | | `attribution.listAgentPhone` | string or null | | | `attribution.listAgentEmail` | string or null | | | `attribution.coListOfficeName` | string or null | | | `attribution.coListAgentName` | string or null | | | `attribution.buyerOfficeName` | string or null | The selling office. Only for a Closed listing; null otherwise. | | `attribution.buyerAgentName` | string or null | The selling agent. Only for a Closed listing; null otherwise. | | `permissions` | object | What the listing's seller allows beside the listing. | | `permissions.avmDisplay` | boolean or null | False: show no estimated value for this listing, from any source. | | `permissions.consumerComments` | boolean or null | False: show no visitor comments or reviews on this listing. | | `slug` | string | Words for a page address, ending in the listing key: the street, city, state and ZIP code, or the city and state alone when the address is withheld. | | `isFavorite` | boolean | (not always present) Only when the request acts for one consumer (a client token, or X-Client-Id): whether the listing is among that consumer's favorites. | | `updatedAt` | string or null | When the listing last changed at Bright. | ## MapAnswer Pins, or clusters above 500. Only listings with a shown address and a point inside the region. | Field | Type | Description | | --- | --- | --- | | `total` | integer | How many located listings match. | | `pins` | list of object | One for each listing, when 500 or fewer match. Empty otherwise. | | `pins[].listingKey` | string | | | `pins[].lat` | number | | | `pins[].lng` | number | | | `pins[].price` | number or null | The list price. Null when it may not be shown. | | `pins[].status` | `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | | | `clusters` | list of object | Groups on a grid, when more than 500 match. Empty otherwise. | | `clusters[].lat` | number | | | `clusters[].lng` | number | | | `clusters[].count` | integer | How many listings the cluster stands for. | | `clusters[].bbox` | list of number | The box that holds them: [minLng, minLat, maxLng, maxLat]. Zoom to it. | | `gridCellDegrees` | number | (not always present) With clusters: the size of a grid cell, in degrees. | ## MediaLink A virtual tour or a video, as a link. Never part of the photo gallery or its count. | Field | Type | Description | | --- | --- | --- | | `mediaKey` | string | | | `kind` | `tour`, `video`, `other` | | | `url` | string | Bright's address for it, unaltered except for https:// added where it had no scheme. | | `order` | integer | | | `caption` | string or null | | ## Notice Something your site should act on. IDs and the kind of change, never listing content. The same JSON a webhook carries. | Field | Type | Description | | --- | --- | --- | | `id` | string | "evt_…". The same notice always has the same ID: de-duplicate by it. | | `type` | `saved_search.matches`, `favorite.listing_updated`, `favorite.listing_removed`, `listing.removed`, `account.suspended`, `account.reinstated`, `data.stale` | | | `createdAt` | string | | | `accountId` | string | Your account. | | `clientId` | string | (not always present) The consumer it concerns. Only on the three consumer types. | | `savedSearchId` | string | (not always present) The saved search. Only on saved_search.matches. | | `listingKeys` | list of string | The listings concerned, at most 500. Empty on the account and data types. | | `changes` | list of any | What happened. Always an array. | ## OpenHouse | Field | Type | Description | | --- | --- | --- | | `id` | string | | | `date` | string | The day, YYYY-MM-DD. | | `startTime` | string or null | | | `endTime` | string or null | | | `method` | `in_person`, `virtual`, `in_person_and_virtual` | | | `virtualUrl` | string or null | The link of an open house held by video. Always https. | | `remarks` | string or null | | ## PhotoUrls One photo in Bright's five sizes, each an https address on Bright's own media host (on the sandbox, the sandbox's). Show them whole, with CSS object-fit: contain; never crop, overlay or alter one. A size that is not available is null. | Field | Type | Description | | --- | --- | --- | | `thumb` | string or null | | | `medium` | string or null | | | `full` | string or null | | | `hires` | string or null | | | `hd` | string or null | | ## Place A named area listings belong to: its names, its center and its box. Never a boundary shape. | Field | Type | Description | | --- | --- | --- | | `placeId` | string | The place's ID, "pl_…". The same in the sandbox and on live. | | `kind` | `state`, `county`, `city`, `municipality`, `cdp`, `community`, `zcta`, `postal_city`, `subdivision`, `school_district` | What kind of area it is. A county that is its own city reads "city". | | `name` | string | The bare name, such as "Lower Merion". | | `displayName` | string | The name to show: it tells look-alikes apart ("Lower Merion Township, Montgomery County, PA"). | | `state` | string or null | The two-letter state code. | | `slug` | string or null | Words for a page address, such as "pa/montgomery-county/lower-merion-township". | | `typeLabel` | string or null | What the place calls itself: township, borough, city. | | `cityCounty` | boolean | True for a city that is its own county. | | `center` | object or null | | | `center.lat` | number | | | `center.lng` | number | | | `bbox` | list of number or null | The box that holds it: [minLng, minLat, maxLng, maxLat]. Fit your map to it. | | `radiusMeters` | integer or null | For a community, which is a point: the radius it is searched within. Null for every other kind. | | `approximate` | boolean | True for an outline put together from other shapes, such as a postal city's. | | `ncesId` | string or null | (not always present) Only on a school district: its NCES ID. | | `districtType` | string or null | (not always present) Only on a school district: unified, elementary or secondary. | | `grades` | string or null | (not always present) Only on a school district: the lowest and highest grade served, such as "KG-12". | | `notice` | string | (not always present) Only on a school district: "School assignments are subject to change; verify with the school district." | | `source` | string | Where the place comes from, as a code. Today one of: census_tiger, nces_edge, usgs_gnis, bright_derived, bright_lookup, bright_listing. | | `license` | string | | | `attribution` | string or null | A credit line, where the source requires one. | | `vintage` | string or null | The source's edition: a year, a school year, or "current". | | `asOf` | string or null | For a school district: the first day of the school year its boundary is from. | | `parents` | list of object | The places this one lies in. A place can lie in more than one. | | `parents[].placeId` | string | | | `parents[].kind` | `state`, `county`, `city`, `municipality`, `cdp`, `community`, `zcta`, `postal_city`, `subdivision`, `school_district` | | | `parents[].displayName` | string | | | `parents[].overlapFraction` | number | The share of this place that lies in the parent, from 0 to 1. | | `parents[].primary` | boolean | True for the parent used in the display name. | ## PlaceContaining | Field | Type | Description | | --- | --- | --- | | `placeId` | string | The place's ID, "pl_…". The same in the sandbox and on live. | | `kind` | `state`, `county`, `city`, `municipality`, `cdp`, `community`, `zcta`, `postal_city`, `subdivision`, `school_district` | What kind of area it is. A county that is its own city reads "city". | | `name` | string | The bare name, such as "Lower Merion". | | `displayName` | string | The name to show: it tells look-alikes apart ("Lower Merion Township, Montgomery County, PA"). | | `state` | string or null | The two-letter state code. | | `slug` | string or null | Words for a page address, such as "pa/montgomery-county/lower-merion-township". | | `typeLabel` | string or null | What the place calls itself: township, borough, city. | | `cityCounty` | boolean | True for a city that is its own county. | | `center` | object or null | | | `center.lat` | number | | | `center.lng` | number | | | `bbox` | list of number or null | The box that holds it: [minLng, minLat, maxLng, maxLat]. Fit your map to it. | | `radiusMeters` | integer or null | For a community, which is a point: the radius it is searched within. Null for every other kind. | | `approximate` | boolean | True for an outline put together from other shapes, such as a postal city's. | | `ncesId` | string or null | (not always present) Only on a school district: its NCES ID. | | `districtType` | string or null | (not always present) Only on a school district: unified, elementary or secondary. | | `grades` | string or null | (not always present) Only on a school district: the lowest and highest grade served, such as "KG-12". | | `notice` | string | (not always present) Only on a school district: "School assignments are subject to change; verify with the school district." | | `source` | string | Where the place comes from, as a code. Today one of: census_tiger, nces_edge, usgs_gnis, bright_derived, bright_lookup, bright_listing. | | `license` | string | | | `attribution` | string or null | A credit line, where the source requires one. | | `vintage` | string or null | The source's edition: a year, a school year, or "current". | | `asOf` | string or null | For a school district: the first day of the school year its boundary is from. | | `parents` | list of object | The places this one lies in. A place can lie in more than one. | | `parents[].placeId` | string | | | `parents[].kind` | `state`, `county`, `city`, `municipality`, `cdp`, `community`, `zcta`, `postal_city`, `subdivision`, `school_district` | | | `parents[].displayName` | string | | | `parents[].overlapFraction` | number | The share of this place that lies in the parent, from 0 to 1. | | `parents[].primary` | boolean | True for the parent used in the display name. | | `via` | `geometry`, `radius`, `postal_city` | Why the place holds the point: its outline covers it, a community's radius reaches it, or it is the postal city of the ZIP area that covers it. | ## PlaceRef A place the listing belongs to: its ID and name, never a shape. | Field | Type | Description | | --- | --- | --- | | `placeId` | string | | | `kind` | string | | | `displayName` | string | | ## Room | Field | Type | Description | | --- | --- | --- | | `type` | string or null | | | `level` | string or null | | | `length` | number or null | | | `width` | number or null | | | `area` | number or null | | | `dimensions` | string or null | | | `features` | list of string or null | | | `description` | string or null | | | `order` | integer | | ## SandboxTrigger A change the sandbox was asked to make on demand, and how it ended. | Field | Type | Description | | --- | --- | --- | | `id` | string | "trg_…". | | `event` | `saved_search.matches`, `favorite.listing_updated`, `listing.removed` | | | `listingKey` | string | The listing that is made, changed or removed. One a trigger makes starts with "SBXT". | | `change` | object | What is done: { kind: "new_listing", status }, { kind: "price" \| "photos" \| "open_house" }, { kind: "status", from, to } or { kind: "removed" }. | | `change.kind` | string | | | `notice` | `instant`, `next_digest` | instant: the notice follows within about 10 seconds. next_digest: it comes with the saved search's next daily or weekly digest. | | `status` | `pending`, `done`, `failed` | | | `noticeId` | string or null | Once done: the ID of the notice the change produced. Null for next_digest, and until then. | | `reason` | string or null | Why a failed trigger could not be completed. Null otherwise. | | `createdAt` | string | When the trigger was accepted. | | `completedAt` | string or null | When it was done, or failed. Null while it is pending. | ## SandboxTriggerAccepted A change the sandbox was asked to make on demand, as it was accepted. | Field | Type | Description | | --- | --- | --- | | `id` | string | "trg_…". | | `event` | `saved_search.matches`, `favorite.listing_updated`, `listing.removed` | | | `listingKey` | string | The listing that is made, changed or removed. One a trigger makes starts with "SBXT". | | `change` | object | What is done: { kind: "new_listing", status }, { kind: "price" \| "photos" \| "open_house" }, { kind: "status", from, to } or { kind: "removed" }. | | `change.kind` | string | | | `notice` | `instant`, `next_digest` | instant: the notice follows within about 10 seconds. next_digest: it comes with the saved search's next daily or weekly digest. | | `status` | `pending`, `done`, `failed` | | ## SavedSearch A consumer's search, kept so that your site can tell them of new matches. | Field | Type | Description | | --- | --- | --- | | `id` | string | "ss_…". | | `name` | string or null | | | `criteria` | [SearchFilters](#searchfilters) | | | `alertFrequency` | `instant`, `daily`, `weekly`, `off` | When matches are gathered into a notice: after each data update, daily at 7:00 am Eastern, Mondays at 7:00 am Eastern, or never. | | `status` | `active`, `paused_tier`, `paused_suspended`, `paused_invalid` | Worked out on every read. A paused search makes no notices: its criteria need Premium on a Basic account, the account is suspended, or its criteria are no longer accepted. | | `createdAt` | string | | | `updatedAt` | string | | ## SavedShape A shape a consumer drew and kept, usable as a search's location.shapeId. | Field | Type | Description | | --- | --- | --- | | `id` | string | "shp_…". | | `name` | string or null | | | `geometry` | [DrawnShape](#drawnshape) | | | `vertices` | integer | The ring's corners; its closing repeat is not one. | | `areaSqKm` | number | The area on the Earth's surface, in square kilometres. | | `createdAt` | string | | ## SearchFilters The filters of a search. Every one is optional, and they combine with AND. A key that is not listed is refused, never ignored. | Field | Type | Description | | --- | --- | --- | | `status` | list of `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | (not always present) Left out: active. | | `propertyClass` | list of `residential`, `residential_lease`, `land`, `farm`, `commercial_sale`, `commercial_lease`, `business_opportunity`, `manufactured_in_park`, `multi_family`, `other` | (not always present) Property classes: the values of GET /v1/lookups/property-classes. | | `structureType` | list of `detached`, `twin_semi_detached`, `row_townhouse_interior`, `row_townhouse_end`, `condo_apartment`, `multi_family`, `deeded_parking`, `manufactured`, `other` | (not always present) Structure types: the values of GET /v1/lookups/structure-types. | | `price` | object | (not always present) The list price in US dollars. | | `price.min` | number | (not always present) | | `price.max` | number | (not always present) | | `beds` | object | (not always present) Bedrooms. | | `beds.min` | integer | (not always present) | | `beds.max` | integer | (not always present) | | `baths` | object | (not always present) Baths, a half bath counting half. | | `baths.min` | number | (not always present) | | `baths.max` | number | (not always present) | | `livingAreaSqft` | object | (not always present) Living area in square feet. | | `livingAreaSqft.min` | number | (not always present) | | `livingAreaSqft.max` | number | (not always present) | | `lotSizeAcres` | object | (not always present) Lot size in acres. | | `lotSizeAcres.min` | number | (not always present) | | `lotSizeAcres.max` | number | (not always present) | | `yearBuilt` | object | (not always present) The year built. | | `yearBuilt.min` | integer | (not always present) | | `yearBuilt.max` | integer | (not always present) | | `closeDate` | object | (not always present) The day of the sale. Only a Closed listing has one, so this finds Closed listings only. Closed listings are kept for three years: an earlier `from` is moved to that, with the warning close_date_clamped. | | `closeDate.from` | string | (not always present) | | `closeDate.to` | string | (not always present) | | `keywords` | string | (not always present) Words searched in the public remarks and these feature lists: interior, exterior, appliances, lot, pool, parking, waterfront, view, architectural style, patio and porch, windows, doors. | | `location` | object | (not always present) Where. The kinds combine with AND. | | `location.placeIds` | list of string | (not always present) Place IDs: any kind on every plan, except school districts, which are Premium. Listings in any of them match. A community is a point with a radius of a mile, which radius.meters alone may change. An unknown or retired place is 404 not_found. | | `location.postalCodes` | list of string | (not always present) Five-digit ZIP codes, matched on the listing's own postal code. | | `location.cities` | list of object | (not always present) Postal cities, matched on the listing's own city and state. | | `location.cities[].name` | string | | | `location.cities[].state` | string | The two-letter state code. | | `location.subdivisions` | list of object | (not always present) Subdivisions, matched on the listing's own subdivision name and state. | | `location.subdivisions[].name` | string | | | `location.subdivisions[].state` | string | The two-letter state code. | | `location.bbox` | list of number | (not always present) A box: [minLng, minLat, maxLng, maxLat]. Finds only listings with a shown address. | | `location.radius` | object | (not always present) A circle. Finds only listings with a shown address. sort=distance needs its center. | | `location.radius.center` | list of number | (not always present) [longitude, latitude]. | | `location.radius.meters` | number | With a center: the radius in metres. Alone, with one community among placeIds: that community's radius, from 400 to 8000. | | `location.shapeId` | string | (not always present) Premium. A saved shape's ID, "shp_…", of the same consumer. | | `listAgentMlsId` | string | (not always present) The listing or co-listing agent's MLS ID. | | `listOfficeMlsId` | string | (not always present) The listing or co-listing office's MLS ID. | | `openHouse` | object | (not always present) Listings with a public open house in this range of days. While the open-house feed is more than 12 hours old: 500 data_stale, with details.feed "openHouses". | | `openHouse.from` | string | (not always present) | | `openHouse.to` | string | (not always present) | | `modifiedSince` | string | (not always present) An instant in ISO 8601: listings changed at or after it. | | `hasBasement` | boolean | (not always present) true to require it. | | `hasFireplace` | boolean | (not always present) true to require it. | | `hasPool` | boolean | (not always present) true to require it. | | `seniorCommunity` | boolean | (not always present) true to require it. | | `petsAllowed` | boolean | (not always present) true to require it. | | `newConstruction` | boolean | (not always present) true to require it. | | `waterfront` | boolean | (not always present) true to require it. | | `garage` | boolean | (not always present) true to require it. | ## SearchPage | Field | Type | Description | | --- | --- | --- | | `limit` | integer | How many listings a page holds. | | `nextCursor` | string or null | Send it as `cursor` for the next page. Null on the last page. | | `total` | integer | How many listings match, exact up to 10,000. | | `totalIsCapped` | boolean | True when the count stopped at 10,000. | ## SearchRequest A search: filters, a sort and paging. Every key is optional. A key that is not listed is refused, never ignored. The map routes ignore sort, limit and cursor. | Field | Type | Description | | --- | --- | --- | | `status` | list of `active`, `active_under_contract`, `coming_soon`, `pending`, `closed` | (not always present) Left out: active. | | `propertyClass` | list of `residential`, `residential_lease`, `land`, `farm`, `commercial_sale`, `commercial_lease`, `business_opportunity`, `manufactured_in_park`, `multi_family`, `other` | (not always present) Property classes: the values of GET /v1/lookups/property-classes. | | `structureType` | list of `detached`, `twin_semi_detached`, `row_townhouse_interior`, `row_townhouse_end`, `condo_apartment`, `multi_family`, `deeded_parking`, `manufactured`, `other` | (not always present) Structure types: the values of GET /v1/lookups/structure-types. | | `price` | object | (not always present) The list price in US dollars. | | `price.min` | number | (not always present) | | `price.max` | number | (not always present) | | `beds` | object | (not always present) Bedrooms. | | `beds.min` | integer | (not always present) | | `beds.max` | integer | (not always present) | | `baths` | object | (not always present) Baths, a half bath counting half. | | `baths.min` | number | (not always present) | | `baths.max` | number | (not always present) | | `livingAreaSqft` | object | (not always present) Living area in square feet. | | `livingAreaSqft.min` | number | (not always present) | | `livingAreaSqft.max` | number | (not always present) | | `lotSizeAcres` | object | (not always present) Lot size in acres. | | `lotSizeAcres.min` | number | (not always present) | | `lotSizeAcres.max` | number | (not always present) | | `yearBuilt` | object | (not always present) The year built. | | `yearBuilt.min` | integer | (not always present) | | `yearBuilt.max` | integer | (not always present) | | `closeDate` | object | (not always present) The day of the sale. Only a Closed listing has one, so this finds Closed listings only. Closed listings are kept for three years: an earlier `from` is moved to that, with the warning close_date_clamped. | | `closeDate.from` | string | (not always present) | | `closeDate.to` | string | (not always present) | | `keywords` | string | (not always present) Words searched in the public remarks and these feature lists: interior, exterior, appliances, lot, pool, parking, waterfront, view, architectural style, patio and porch, windows, doors. | | `location` | object | (not always present) Where. The kinds combine with AND. | | `location.placeIds` | list of string | (not always present) Place IDs: any kind on every plan, except school districts, which are Premium. Listings in any of them match. A community is a point with a radius of a mile, which radius.meters alone may change. An unknown or retired place is 404 not_found. | | `location.postalCodes` | list of string | (not always present) Five-digit ZIP codes, matched on the listing's own postal code. | | `location.cities` | list of object | (not always present) Postal cities, matched on the listing's own city and state. | | `location.cities[].name` | string | | | `location.cities[].state` | string | The two-letter state code. | | `location.subdivisions` | list of object | (not always present) Subdivisions, matched on the listing's own subdivision name and state. | | `location.subdivisions[].name` | string | | | `location.subdivisions[].state` | string | The two-letter state code. | | `location.bbox` | list of number | (not always present) A box: [minLng, minLat, maxLng, maxLat]. Finds only listings with a shown address. | | `location.radius` | object | (not always present) A circle. Finds only listings with a shown address. sort=distance needs its center. | | `location.radius.center` | list of number | (not always present) [longitude, latitude]. | | `location.radius.meters` | number | With a center: the radius in metres. Alone, with one community among placeIds: that community's radius, from 400 to 8000. | | `location.shapeId` | string | (not always present) Premium. A saved shape's ID, "shp_…", of the same consumer. | | `location.shape` | [DrawnShape](#drawnshape) | (not always present) | | `listAgentMlsId` | string | (not always present) The listing or co-listing agent's MLS ID. | | `listOfficeMlsId` | string | (not always present) The listing or co-listing office's MLS ID. | | `openHouse` | object | (not always present) Listings with a public open house in this range of days. While the open-house feed is more than 12 hours old: 500 data_stale, with details.feed "openHouses". | | `openHouse.from` | string | (not always present) | | `openHouse.to` | string | (not always present) | | `modifiedSince` | string | (not always present) An instant in ISO 8601: listings changed at or after it. | | `hasBasement` | boolean | (not always present) true to require it. | | `hasFireplace` | boolean | (not always present) true to require it. | | `hasPool` | boolean | (not always present) true to require it. | | `seniorCommunity` | boolean | (not always present) true to require it. | | `petsAllowed` | boolean | (not always present) true to require it. | | `newConstruction` | boolean | (not always present) true to require it. | | `waterfront` | boolean | (not always present) true to require it. | | `garage` | boolean | (not always present) true to require it. | | `sort` | `price_asc`, `price_desc`, `newest`, `beds_desc`, `baths_desc`, `sqft_desc`, `close_date_desc`, `distance` | (not always present) Left out: price_asc. distance needs location.radius with a center. | | `limit` | integer | (not always present) Listings a page. Left out: 24. | | `cursor` | string | (not always present) The previous page's nextCursor, exactly as it came, with the same filters and sort. | ## Status Whether the service runs, and how fresh its data is. | Field | Type | Description | | --- | --- | --- | | `service` | `ok`, `database_unreachable` | | | `version` | string | The version of the API that is running. | | `freshness` | object | | | `freshness.live` | object | | | `freshness.live.stale` | boolean | True when any of the three clocks is stale. | | `freshness.live.stopActive` | boolean | True while live listing routes answer 500 data_stale. | | `freshness.live.dataLastUpdatedAt` | string or null | When live data was last updated. | | `freshness.live.clocks` | object | | | `freshness.live.openHouses` | object | (not always present) | | `freshness.test` | object | | | `freshness.test.stale` | boolean | | | `freshness.test.stopActive` | boolean | | | `freshness.test.exempt` | boolean | Always true: the sandbox is never stopped. | | `freshness.test.dataLastUpdatedAt` | string or null | The sandbox's own clock: when its change job last finished. | | `geography` | object or null | The counts of the last geography build, or null before the first. Counts only, never a shape. | ## Warning The request was answered, but not exactly as asked. A warning never changes results silently. | Field | Type | Description | | --- | --- | --- | | `code` | string | What was not answered exactly as asked: close_date_clamped, filter_not_applicable, rooms_stale or open_houses_stale. | | `message` | string | | | `fix` | string | (not always present) | | `details` | any | (not always present) More about this warning, by its code. | ## WebhookDelivery One notice sent, or to be sent, to one endpoint, and what became of it. | Field | Type | Description | | --- | --- | --- | | `id` | string | "dlv_…": also sent as the ApiData-Delivery-Id header. | | `eventId` | string or null | The notice's ID. Null for a ping. | | `type` | string | The notice's type, or "ping". | | `status` | `pending`, `succeeded`, `failed` | | | `attempts` | integer | Attempts made so far. | | `lastAttemptAt` | string or null | | | `nextAttemptAt` | string or null | Null once the delivery has succeeded or failed. | | `lastResult` | `http_status`, `timeout`, `refused_destination`, `tls_failed`, `connection_failed`, `redirect_not_followed` or null | What the last attempt came to. Null before the first. | | `lastStatusCode` | integer or null | Your server's status code, with http_status and redirect_not_followed. | ## WebhookEndpoint An address on your server that receives your account's notices as signed POST requests. Its secret is not part of it. | Field | Type | Description | | --- | --- | --- | | `id` | string | "wh_…". | | `url` | string | The https:// address notices are sent to. It can not be changed. | | `eventTypes` | list of `saved_search.matches`, `favorite.listing_updated`, `favorite.listing_removed`, `listing.removed`, `account.suspended`, `account.reinstated`, `data.stale` | The notice types the endpoint receives. | | `description` | string or null | | | `enabled` | boolean | false pauses the endpoint: nothing is sent to it, and what it misses is not sent later. | | `createdAt` | string | | _This page is made from the API's own declarations by `npm run openapi`. To change it, change the declaration or its explanation, never this file._ ================================================================================ PAGE: Compliance URL: https://docs.apidata.one/reference/compliance/ ================================================================================ # Compliance Every response with listing content carries a `compliance` block beside `data`: the disclosures Bright requires, filled for your account, with the time of the last data update. Render it as given. `GET /v1/compliance` serves the whole bundle for site footers and email templates. ## The block ```json "compliance": { "copyright": "© 2026 Bright MLS. All Rights Reserved.", "accuracy": "Information Deemed Reliable But Not Guaranteed", "idxSource": "The data relating to real estate for sale on this website appears in part through the BRIGHT Internet Data Exchange program, a voluntary cooperative exchange of property listing data between licensed real estate brokerage firms in which Example Realty participates, and is provided by BRIGHT through a licensing agreement.", "personalUse": "The information provided by this website is for the personal, non-commercial use of consumers and may not be used for any purpose other than to identify prospective properties consumers may be interested in purchasing.", "availability": "Some properties which appear for sale on this website may no longer be available because they are under contract, have Closed or are no longer being offered for sale.", "lastUpdated": "Data last updated: 11/10/2026 at 9:59 AM ET", "dataLastUpdatedAt": "2026-11-10T14:59:00.000Z", "advertisingBrokerage": { "name": "Example Realty", "licenseStates": ["PA", "NJ"] }, "closed": { "label": "Closed", "notAppraisal": "This home sale information is not to be construed as an appraisal and may not be used as such for any purpose.", "provider": "BRIGHT MLS is the provider of this home sale information and has compiled content from various sources. Some properties represented may not have actually sold due to reporting errors." }, "comingSoon": { "label": "Coming Soon" }, "renderingRules": [ "Show the listing office name and phone in the top 25% of the listing detail page, same font size as other details.", "Display photos with CSS object-fit: contain. Never crop.", "Show 'copyright', 'accuracy' and 'lastUpdated' on every page that shows listings.", "Show 'idxSource', 'personalUse' and 'availability' on the home page or every search page." ], "poweredBy": "Powered by apidata.one" } ``` - `closed` appears only when the response holds a Closed listing, `comingSoon` only with a Coming Soon one. Show their labels on those listings. - `lastUpdated` is the last successful data update in Eastern time, never the time of your request; `dataLastUpdatedAt` is the same instant in ISO-8601. On the sandbox both come from the sandbox's own clock: when its change job last finished (it runs every 5 minutes). - The copyright year follows the API's clock. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`GET /v1/compliance`](https://docs.apidata.one/reference/endpoints/get-compliance.md) ================================================================================ PAGE: Favorites URL: https://docs.apidata.one/reference/favorites/ ================================================================================ # Favorites A consumer's saved listings. Consumer identity comes only from the auth context: a client token with a `pk_` key, or `X-Client-Id` with an `sk_` key. A `clientId` in the URL or body is never used; a `pk_` request without a token is `401 client_token_required`. A favorite stores the `listingKey` only (1–64 characters of `A-Z a-z 0-9 _ -`). The listing must exist (`404 listing_not_found`), and listing responses carry `isFavorite` for the consumer. ## Notices Two [notices](https://docs.apidata.one/concepts/webhooks.md) concern favorites, each for one consumer (`clientId`): - `favorite.listing_updated`: a sync cycle changed one or more of the consumer's favorites. `changes` names each listing with its `kinds`: `price`, `status`, `photos`, `open_house`. - `favorite.listing_removed`: favorites of the consumer were removed from the data. The favorites themselves are gone, and so must be any copy of the listing you stored. They carry keys and kinds only. Fetch the listing before you tell the consumer anything ([alert emails](https://docs.apidata.one/guides/alert-emails.md)). No change notice is made while the account is suspended. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`GET /v1/favorites`](https://docs.apidata.one/reference/endpoints/list-favorites.md) - [`POST /v1/favorites`](https://docs.apidata.one/reference/endpoints/create-favorite.md) - [`GET /v1/favorites/{id}`](https://docs.apidata.one/reference/endpoints/get-favorite.md) - [`DELETE /v1/favorites/{id}`](https://docs.apidata.one/reference/endpoints/delete-favorite.md) ================================================================================ PAGE: Listings URL: https://docs.apidata.one/reference/listings/ ================================================================================ # Listings Search, map, detail, similar listings and a listing's schools. Every route here serves live listing content, so it answers `500 data_stale` while the 12-hour stop is on (see [`GET /v1/status`](https://docs.apidata.one/reference/endpoints/get-status.md)), it carries the [compliance block](https://docs.apidata.one/reference/compliance.md) and it never returns a field its object does not list ([objects](https://docs.apidata.one/reference/objects.md)). Keys: `pk_` (from a listed domain, or with a client token) or `sk_`. A client context (`pk_` + client token, or `sk_` + `X-Client-Id`) adds `isFavorite` to every listing. ## The listing object A search returns each listing as below ([ListingSummary](https://docs.apidata.one/reference/objects.md#listingsummary), field by field); the detail adds to it ([ListingDetail](https://docs.apidata.one/reference/objects.md#listingdetail)). ```json { "listingKey": "805454359664", "mlsNumber": "PAMC2141234", "status": "active", "statusLabel": "Active", "propertyClass": "residential", "structureType": "detached", "price": { "list": 400000, "close": null }, "address": { "line1": "101 MAIN ST", "unit": null, "city": "Ardmore", "state": "PA", "postalCode": "19003", "county": "Montgomery" }, "addressDisplay": "full", "location": { "lat": 40.01, "lng": -75.3 }, "beds": 3, "baths": { "total": 2.5, "full": 2, "half": 1 }, "livingAreaSqft": 1800, "lotSizeAcres": 0.25, "lotSizeSqft": null, "yearBuilt": 1950, "daysOnMarket": 12, "expectedOnMarketDate": null, "closeDate": null, "photos": { "count": 24, "primary": { "thumb": "https://…", "medium": "https://…", "full": "https://…", "hires": "https://…", "hd": "https://…" } }, "attribution": { "listOfficeName": "…", "listOfficePhone": "…", "listOfficeEmail": null, "listAgentName": "…", "listAgentPhone": "…", "listAgentEmail": null, "coListOfficeName": null, "coListAgentName": null, "buyerOfficeName": null, "buyerAgentName": null }, "permissions": { "avmDisplay": true, "consumerComments": false }, "slug": "101-main-st-ardmore-pa-19003-805454359664", "isFavorite": false, "updatedAt": "2026-11-01T12:00:00.000Z" } ``` - **Withheld address** (the seller asked for it): `address: null`, `addressDisplay: "withheld"`, `addressNotice` ("Contact Listing Agent for Additional Information"), `location: null`, and a slug from city, state and `listingKey` only. See [hidden addresses](https://docs.apidata.one/concepts/hidden-addresses.md). - **A point outside the seven jurisdictions** (a Bright coordinate error): `location: null`, the address as usual. - **Closed**: `price.close`, `closeDate`, and `attribution.buyerOfficeName` and `buyerAgentName` filled. Only a Closed listing has a sale: for every other status all four are null and `priceHistory` has no `close` entry, even for a listing that was closed before and is back on the market. `sort=close_date_desc` puts listings with no close date last. - **Coming Soon**: `daysOnMarket: null`, `expectedOnMarketDate` set, no `priceHistory`, no open houses, no virtual tour. - Photo URLs are Bright's own, https, in Bright's five sizes, never cropped or resized; show them with `object-fit: contain`. A gallery never holds a URL from another host. `photos` is the gallery only: a listing's virtual tours and videos are links on the detail (`media.links`), never in the gallery or its count. - **Off-market photo hide**: when the seller of a Closed listing hides its media off-market, only the photo the agent chose is served, with no tours, videos or `virtualTourUrl`, in every shape. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`GET /v1/listings`](https://docs.apidata.one/reference/endpoints/search-listings.md) - [`POST /v1/listings/search`](https://docs.apidata.one/reference/endpoints/search-listings-body.md) - [`GET /v1/listings/{listingKey}`](https://docs.apidata.one/reference/endpoints/get-listing.md) - [`GET /v1/listings/keys`](https://docs.apidata.one/reference/endpoints/list-listing-keys.md) - [`GET /v1/listings/{listingKey}/similar`](https://docs.apidata.one/reference/endpoints/get-similar-listings.md) - [`GET /v1/listings/{listingKey}/schools`](https://docs.apidata.one/reference/endpoints/get-listing-schools.md) - [`GET /v1/listings/map`](https://docs.apidata.one/reference/endpoints/map-listings.md) - [`POST /v1/listings/map`](https://docs.apidata.one/reference/endpoints/map-listings-body.md) ================================================================================ PAGE: Sandbox triggers URL: https://docs.apidata.one/reference/sandbox-triggers/ ================================================================================ # Sandbox triggers Make something happen in the sandbox on demand, so you can test your alert handling without waiting. Sandbox only: these routes exist for `sk_test_` keys. A live key gets `404 not_found`. A trigger never writes a notice itself. It makes a real change to a sandbox listing through the same pipeline as any other change, and the notice, the webhook delivery and the [events list](https://docs.apidata.one/reference/endpoints/list-events.md) follow as they would on live. ## When a trigger fails A trigger is checked when you send it, and the change is made a moment later. Something can change in between, and where a matching listing can sit is only known when it is placed. So a trigger that was accepted with `202` can still end as `failed`, with a `reason`. **Failures that count against the limit.** These six are about your request or your data. The trigger counts as one of the key's 10 an hour, like one that was done: | `reason` | What it means | | ------------------------- | ----------------------------------------------------------------------------------------------------------- | | `criteria_unsatisfiable` | No made-up listing could be placed to match the search, for example a location outside the sandbox's region. | | `saved_search_gone` | The saved search was deleted before the change was made. | | `saved_search_not_active` | The saved search was paused before the change was made. | | `account_gone` | The account no longer exists. | | `listing_gone` | The listing was removed before the change was made. | | `change_not_possible` | The listing changed meanwhile, and that change can no longer be made to it. | **Failures that don't count.** Any other `reason`, such as `worker_error` or `no_notice`, means the fault is ours. The trigger is given back: it doesn't count against the limit, and you can send it again. ## What is refused A refused request changes nothing and doesn't count against the limit: | Answer | When | | -------------------------------------- | ---------------------------------------------------------------------------------------- | | `404 not_found` | The saved search or favorite belongs to another consumer or account. | | `409 sandbox_listing_protected` | A named edge case (keys starting `SBX9`), or removing a listing your triggers didn't make. | | `409 saved_search_not_active` | The saved search is paused; `status` says how. | | `409 sandbox_trigger_not_possible` | `reason` is `alerts_off`, `criteria_unsatisfiable` (with `field`) or `change_not_possible`. | | `429 rate_limited`, with `Retry-After` | More than 10 triggers for one key within an hour. Triggers that were done count, and so do the failures listed above. | ## Good to know - **The sandbox is shared.** A trigger's change is real for everyone using the sandbox, so another developer's saved search may match your listing too, and yours may match theirs. - **Clean-up.** Listings a trigger made are removed after 24 hours. - **The sandbox also changes by itself.** Every 5 minutes a few listings get a new price, status, photo or open house, new listings arrive, and once an hour some are removed. You can test against that without sending any trigger. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`POST /v1/sandbox/triggers`](https://docs.apidata.one/reference/endpoints/create-sandbox-trigger.md) - [`GET /v1/sandbox/triggers/{id}`](https://docs.apidata.one/reference/endpoints/get-sandbox-trigger.md) ================================================================================ PAGE: Saved searches URL: https://docs.apidata.one/reference/saved-searches/ ================================================================================ # Saved searches A consumer's own searches, kept so your site can tell them when a listing newly matches. A saved search is a set of filters, an optional name and an alert frequency. **Every tier** has them. Consumer identity comes only from the auth context, as for [favorites](https://docs.apidata.one/reference/favorites.md): a client token with a `pk_` key, or `X-Client-Id` with an `sk_` key. A `pk_` request without a token is `401 client_token_required`; an `sk_` request without `X-Client-Id` is `400 validation_failed`. A saved search belongs to one consumer: an ID from another consumer or another account is `404 not_found`, never `403`. A consumer may keep up to 100. The API never emails your visitors. When a saved search matches, the API records a thin [notice](https://docs.apidata.one/concepts/webhooks.md) (`saved_search.matches`, with listing keys and reasons only), which reaches you by webhook or through [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md), and your site decides what to send ([alert emails](https://docs.apidata.one/guides/alert-emails.md)). ## The object ```json { "id": "ss_…", "name": "Ardmore under 500k", "criteria": { "price": { "max": 500000 }, "location": { "placeIds": ["pl_…"] } }, "alertFrequency": "daily", "status": "active", "createdAt": "2026-11-13T15:00:00.000Z", "updatedAt": "2026-11-13T15:00:00.000Z" } ``` ### criteria The body of [`POST /v1/listings/search`](https://docs.apidata.one/reference/endpoints/search-listings-body.md), with **filters only** ([SearchFilters](https://docs.apidata.one/reference/objects.md#searchfilters)). It is checked by the same code as a search, for the same tier: - `cursor`, `limit` and `sort` are not filters: `400 validation_failed`, naming each. - A drawn shape (`location.shape`) can't be kept in a saved search: `400 validation_failed`. Save the shape first with [`POST /v1/saved-shapes`](https://docs.apidata.one/reference/endpoints/create-saved-shape.md), then name it with `location.shapeId`. - `location.shapeId` must be the same consumer's saved shape, otherwise `404 not_found`. - A place ID that doesn't exist (or was retired) is `404 not_found`. - **Premium criteria:** `location.shapeId`, and a school district among `location.placeIds`, need a Premium account. On Basic they are `403 tier_insufficient`. A Premium location kind is refused before anything else about the request is looked at, as in search. Every other problem with the request comes back in one `400 validation_failed`, with each field named under `body.` (for example `body.criteria.price.max`). ### alertFrequency Always required when you create a saved search. It is never guessed from the name. | Value | When the consumer's matches are gathered into a notice | | --------- | ------------------------------------------------------------------ | | `instant` | After each sync cycle, usually within minutes of the change | | `daily` | Once a day at 7:00 am Eastern, covering the day before | | `weekly` | Mondays at 7:00 am Eastern, covering the week before | | `off` | Never. The search is only kept | A listing alerts when it is new, when its price or status changes, or when it comes back on the market, and it matches the search at the moment the notice is made. **Listings that already match when a search is created never alert.** The same holds when you change its `criteria`, and when you turn alerts back on from `off`. ### status Worked out again on every read. Show it to the consumer. | Value | Meaning | | ------------------ | ------------------------------------------------------------------------ | | `active` | The search is evaluated at its frequency | | `paused_tier` | Its criteria need Premium and the account is on Basic | | `paused_suspended` | The account is suspended | | `paused_invalid` | Its criteria are no longer accepted, for example a place that was retired | A paused search produces no notices. When it becomes active again it does **not** catch up: changes that happened while it was paused never alert. Nothing is deleted or widened by a pause. A `paused_invalid` search is fixed by sending new `criteria`. ## Saved shapes in use A saved shape that a saved search names can't be deleted: `DELETE /v1/saved-shapes/{id}` answers [`409 shape_in_use`](https://docs.apidata.one/errors/shape_in_use.md) with the IDs of the searches that use it. Edit or delete those first. ## Deleting a consumer, and downgrades `DELETE /v1/clients/{clientId}` removes the consumer's saved searches, their notices and their saved shapes with everything else of theirs. After a downgrade to Basic nothing is deleted: searches with Premium criteria read `paused_tier` from the next request, and they are active again as soon as the account is Premium. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`POST /v1/saved-searches`](https://docs.apidata.one/reference/endpoints/create-saved-search.md) - [`GET /v1/saved-searches`](https://docs.apidata.one/reference/endpoints/list-saved-searches.md) - [`GET /v1/saved-searches/{id}`](https://docs.apidata.one/reference/endpoints/get-saved-search.md) - [`PATCH /v1/saved-searches/{id}`](https://docs.apidata.one/reference/endpoints/update-saved-search.md) - [`DELETE /v1/saved-searches/{id}`](https://docs.apidata.one/reference/endpoints/delete-saved-search.md) ================================================================================ PAGE: Saved shapes URL: https://docs.apidata.one/reference/saved-shapes/ ================================================================================ # Saved shapes A consumer's own shapes, kept so a search or a map can use one by its ID (`location.shapeId`). **Premium only**: a key on a Basic account gets `403 tier_insufficient` with `capability: "shapes"` on every route here. Consumer identity comes only from the auth context, as for [favorites](https://docs.apidata.one/reference/favorites.md): a client token with a `pk_` key, or `X-Client-Id` with an `sk_` key. A `pk_` request without a token is `401 client_token_required`; an `sk_` request without `X-Client-Id` is `400 validation_failed`. A shape belongs to one consumer: an ID from another consumer or another account is `404 not_found`, never `403`. A shape is a GeoJSON `Polygon` with one ring, checked exactly as a [drawn shape](https://docs.apidata.one/concepts/shapes.md) is: closed, 3 to 200 corners, not crossing itself, at most 5,000 km². A consumer may keep up to 100 shapes. A saved shape can't be edited: delete it and save a new one (there is no `PATCH`). ## Searching with a saved shape `location.shapeId` in a search or a map, in either form: ``` GET /v1/listings?location.shapeId=shp_… POST /v1/listings/search { "location": { "shapeId": "shp_…" } } GET /v1/listings/map?location.shapeId=shp_… ``` It needs the same consumer context as the routes above, and finds the shape in that consumer's own shapes only: not found is `404 not_found`, and nothing is searched. One shape per request: `shapeId` together with a drawn `shape` is `400 validation_failed`. ## Deleting a consumer, and downgrades `DELETE /v1/clients/{clientId}` removes the consumer's saved shapes with everything else of theirs, whatever the account's tier. After a downgrade to Basic nothing is deleted: the shapes stay stored and unreachable (`403` here and on `location.shapeId`) until the account is Premium again, and then they are all back. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`POST /v1/saved-shapes`](https://docs.apidata.one/reference/endpoints/create-saved-shape.md) - [`GET /v1/saved-shapes`](https://docs.apidata.one/reference/endpoints/list-saved-shapes.md) - [`GET /v1/saved-shapes/{id}`](https://docs.apidata.one/reference/endpoints/get-saved-shape.md) - [`DELETE /v1/saved-shapes/{id}`](https://docs.apidata.one/reference/endpoints/delete-saved-shape.md) ================================================================================ PAGE: Webhook endpoints URL: https://docs.apidata.one/reference/webhook-endpoints/ ================================================================================ # Webhook endpoints An endpoint is an `https://` URL on your server that receives your account's [notices](https://docs.apidata.one/concepts/webhooks.md) as signed `POST` requests. **Every tier** has them. An account may have up to 10. Key: `sk_` only, from your server. A `pk_` key is `403 secret_key_required`. An endpoint belongs to the account, not to a consumer: `X-Client-Id` is not read on these routes. An ID from another account is `404 not_found`, never `403`. ## The object ```json { "id": "wh_…", "url": "https://example.com/webhooks/apidata", "eventTypes": ["saved_search.matches", "listing.removed"], "description": "Production site", "enabled": true, "createdAt": "2026-11-13T15:00:00.000Z" } ``` - `eventTypes`: the [notice types](https://docs.apidata.one/concepts/webhooks.md#the-seven-types) this endpoint receives. Always listed in the same order. - `enabled`: `false` pauses the endpoint. Nothing is sent to it, a delivery that was waiting for a retry ends as `failed`, and one that was never tried is dropped. Notices recorded while it is disabled are not sent to it later; they are in [the events list](https://docs.apidata.one/reference/endpoints/list-events.md). - The **secret** that signs requests to the endpoint is not part of the object. It is shown once, in the answer to the request that created the endpoint. ## Endpoints Each has its own page, with its parameters, its answers field by field and its errors: - [`POST /v1/webhook-endpoints`](https://docs.apidata.one/reference/endpoints/create-webhook-endpoint.md) - [`GET /v1/webhook-endpoints`](https://docs.apidata.one/reference/endpoints/list-webhook-endpoints.md) - [`GET /v1/webhook-endpoints/{id}`](https://docs.apidata.one/reference/endpoints/get-webhook-endpoint.md) - [`PATCH /v1/webhook-endpoints/{id}`](https://docs.apidata.one/reference/endpoints/update-webhook-endpoint.md) - [`DELETE /v1/webhook-endpoints/{id}`](https://docs.apidata.one/reference/endpoints/delete-webhook-endpoint.md) - [`POST /v1/webhook-endpoints/{id}/test`](https://docs.apidata.one/reference/endpoints/test-webhook-endpoint.md) - [`GET /v1/webhook-endpoints/{id}/deliveries`](https://docs.apidata.one/reference/endpoints/list-webhook-deliveries.md) ================================================================================ PAGE: account_pending (403) URL: https://docs.apidata.one/errors/account_pending/ ================================================================================ # account_pending (403) The live account has asked to go live and is awaiting approval, so its live keys are not active yet. One call still answers: `GET /v1/account` with the live `sk_` key, so your server can see the account's status and why the key isn't working. A live `pk_` key gets this error everywhere, because a public key reveals nothing about who is asking. **Fix:** build against the sandbox with the account's `test` keys until live access is approved. The account's Owners are emailed when it is, and the portal's Go live page shows where the request stands ([going live](https://docs.apidata.one/guides/going-live.md)). Payment alone never activates live access. ================================================================================ PAGE: account_suspended (403) URL: https://docs.apidata.one/errors/account_suspended/ ================================================================================ # account_suspended (403) The account is suspended, so data writes and listing data are refused. `GET /v1/account`, reading and deleting consumer data, deleting a consumer, and minting client tokens still work, so your consumers can still read and delete what they saved, and you can export or delete. Alerts stop as well: no webhook is sent, [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md) answers this error, saved searches read `paused_suspended`, and creating, editing or testing a webhook endpoint is refused (listing, reading and deleting endpoints still work). Changes that happen during the suspension never alert later. **Fix:** the portal says why, and the account's Owners were emailed. A payment that failed, or a subscription that ended, is put right on the account's Billing page; for anything else, write to support@apidata.one ([going live](https://docs.apidata.one/guides/going-live.md#while-an-account-is-suspended)). Meanwhile show a "temporarily unavailable" message on your site; never serve saved copies of listings. **After reinstatement,** notices more than 24 hours old are dropped, removals included. Re-check every listing page or copy you stored ([why and how](https://docs.apidata.one/concepts/webhooks.md#suspension-and-reinstatement)). ================================================================================ PAGE: client_id_must_be_opaque (400) URL: https://docs.apidata.one/errors/client_id_must_be_opaque/ ================================================================================ # client_id_must_be_opaque (400) The client ID looks like an email address (it contains `@`) or a phone number (it is 10 to 15 digits once dashes and underscores are removed), has characters outside `A-Z a-z 0-9 _ -`, or is longer than 64 characters. A UUID is fine. A missing `clientId` is `validation_failed` instead. **Fix:** choose an opaque ID for the consumer on your side (for example `u_8f2k`) and map it to the person in your own database. The API must never learn who the consumer is. ================================================================================ PAGE: client_token_account_mismatch (401) URL: https://docs.apidata.one/errors/client_token_account_mismatch/ ================================================================================ # client_token_account_mismatch (401) The token was minted by a different account than the `pk_` key presenting it. **Fix:** mint the token with the `sk_` key of the same account as the `pk_` key. ================================================================================ PAGE: client_token_expired (401) URL: https://docs.apidata.one/errors/client_token_expired/ ================================================================================ # client_token_expired (401) The client token is past its `exp`. Tokens live 15 minutes by default and at most 60. **Fix:** have the browser ask your server for a fresh token and retry. ================================================================================ PAGE: client_token_invalid (401) URL: https://docs.apidata.one/errors/client_token_invalid/ ================================================================================ # client_token_invalid (401) The client token could not be verified: bad signature, malformed, unknown signing key, missing claims, or minted for the other environment. **Fix:** mint a new token with `POST /v1/client-tokens` using the `sk_` key of the same account and environment as the `pk_` key the browser uses. ================================================================================ PAGE: client_token_required (401) URL: https://docs.apidata.one/errors/client_token_required/ ================================================================================ # client_token_required (401) A `pk_` key called an endpoint that acts for one consumer (favorites, and later saved searches and shapes) without a client token. A `clientId` in the URL or body is never used for this. **Fix:** mint a token on your server with `POST /v1/client-tokens` (sk_ key) and send it as the `X-Client-Token` header with your `pk_` key. ================================================================================ PAGE: data_stale (500) URL: https://docs.apidata.one/errors/data_stale/ ================================================================================ # data_stale (500) Live listing data is more than 12 hours old, so the API is not serving it. One of the three freshness clocks (`GET /v1/status`) is past 12 hours or missing: the change check, the key sweep or the roster sweep. The response carries `Retry-After` (seconds) and `dataLastUpdatedAt`, the time of the last good change check (or `null` if there has never been one). Only live keys get this answer; sandbox (`test`) keys keep working, because the sandbox's listings are made up and don't come from a sync. It covers every route under `/v1/listings` and `GET /v1/autocomplete` when the request asks for addresses or MLS numbers (or leaves `types` out); `types=places`, `types=postalCodes`, `/v1/places/…`, `/v1/compliance`, `/v1/lookups/…` and the account routes keep working. A listing route is checked inside its own request, never from a cache. A second form concerns open houses only: while the open-house feed's marks are more than 12 hours old, the `openHouse` search filter answers `500 data_stale` with `details.feed: "openHouses"`, and listing details are served with `openHouses: []` plus the warning `open_houses_stale`. Other listing content is unaffected. Your account also gets a [`data.stale` notice](https://docs.apidata.one/concepts/webhooks.md#the-seven-types) when this starts (`changes: ["started"]`) and another when it ends (`["ended"]`), by webhook and in `GET /v1/events`. While it lasts, saved-search and favorite change notices wait; they are worked out when the data is fresh again. **Fix:** retry after `Retry-After` and show a "temporarily unavailable" message meanwhile. Never show saved copies of listings: data that is this old may include listings that have left the market. Serving resumes by itself on the first cycle that brings every clock back under 12 hours. The status is `500`, not `503`: tell this answer from `internal_error` by `error.code`. Most HTTP client libraries retry a `503` by themselves but not a `500`, so write the retry yourself. The API never answers `502`, `503` or `504`; an HTML page with one of those comes from the hosting platform, not from the API (see [responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ================================================================================ PAGE: idempotency_conflict (409) URL: https://docs.apidata.one/errors/idempotency_conflict/ ================================================================================ # idempotency_conflict (409) The `Idempotency-Key` can't be used for this request: - it was already used for a **different request** (another body, another route), or by another consumer of the account; or - a request with the same key is **still running**. This one carries `Retry-After: 1`: retry after it and you get the first request's stored answer. Nothing was saved by the refused request. See [idempotency](https://docs.apidata.one/concepts/idempotency.md). **Fix:** use a new random key (a UUID) for each action, and repeat a key only to retry that same request unchanged. ================================================================================ PAGE: internal_error (500) URL: https://docs.apidata.one/errors/internal_error/ ================================================================================ # internal_error (500) Something went wrong on our side. The response always carries a `requestId`. **Fix:** retry in a moment. If it keeps happening, report the `requestId`. ================================================================================ PAGE: invalid_api_key (401) URL: https://docs.apidata.one/errors/invalid_api_key/ ================================================================================ # invalid_api_key (401) The key is not in a valid format, or no account has it. A key only exists in its own environment: a `_test_` key is looked up in the sandbox and a `_live_` key in the live database, so a key sent to the wrong environment is simply unknown. **Fix:** check for typos and use a key from the right environment. Your keys are listed on the account's keys pages in the [portal](https://app.apidata.one), by their last four characters; make a new one there if you no longer have it. ================================================================================ PAGE: key_revoked (401) URL: https://docs.apidata.one/errors/key_revoked/ ================================================================================ # key_revoked (401) This key has been revoked, or its account was closed (which revokes every key at once). **Fix:** use a current key for the account, or make a new one on the account's keys page in the [portal](https://app.apidata.one). A revoked key never works again. ================================================================================ PAGE: limit_reached (409) URL: https://docs.apidata.one/errors/limit_reached/ ================================================================================ # limit_reached (409) The most records of this kind are already held: 100 saved shapes or 100 saved searches for one consumer, or 10 webhook endpoints for the account. `limit` carries the number. Nothing was saved. **Fix:** delete one (`DELETE /v1/saved-shapes/{id}`, `DELETE /v1/saved-searches/{id}` or `DELETE /v1/webhook-endpoints/{id}`), then save again. ================================================================================ PAGE: listing_not_found (404) URL: https://docs.apidata.one/errors/listing_not_found/ ================================================================================ # listing_not_found (404) No listing with that key (or MLS number) is being served. The listing may have sold, been withdrawn or been removed from the MLS, in which case it has been purged and no copy is kept; or the key may be malformed, from the other environment (sandbox keys don't exist on live, nor the reverse), or the listing may be kept from display because its attribution is missing. The same answer comes from `POST /v1/favorites` when the `listingKey` isn't a served listing. **The API does not say which of these it is.** It keeps nothing of a listing it no longer serves, so a key that was removed and a key that never existed get the same `404`. **On your own site,** answer `410 Gone` only for a key you know was removed: you received its `listing.removed` notice, or you served it before and it is missing from the [key list](https://docs.apidata.one/reference/endpoints/list-listing-keys.md). For any other key answer `404` ([what to answer for a listing that is gone](https://docs.apidata.one/guides/seo.md#what-to-answer-for-a-listing-that-is-gone)). **Fix:** search again for a current listing. To look a listing up by MLS number, send `?mlsNumber=true` with `GET /v1/listings/{number}`. ================================================================================ PAGE: missing_api_key (401) URL: https://docs.apidata.one/errors/missing_api_key/ ================================================================================ # missing_api_key (401) No API key was sent. **Fix:** send `Authorization: Bearer <key>`. Use a `pk_` key in the browser and an `sk_` key on your server. You make keys in the [portal](https://app.apidata.one): signing up gives you a test pair at once ([quickstart](https://docs.apidata.one/quickstart.md)). ================================================================================ PAGE: not_found (404) URL: https://docs.apidata.one/errors/not_found/ ================================================================================ # not_found (404) No such route or method, or the object (a favorite, a saved shape, a saved search, a webhook endpoint) does not exist for this account and consumer. Objects outside your scope are reported as not found, never as forbidden, so IDs reveal nothing. **Fix:** check the path and method against the reference, and list the collection to find valid IDs. ================================================================================ PAGE: origin_not_allowed (403) URL: https://docs.apidata.one/errors/origin_not_allowed/ ================================================================================ # origin_not_allowed (403) A `pk_` key was used from a browser origin that is not on the account's authorized domains. The match is exact: scheme, host and port. **Fix:** add the exact origin (for example `https://www.example.com`) to the account. For test keys, do it on the account's Test keys page in the [portal](https://app.apidata.one). A live account's addresses are the ones its request to go live named: to add or change one, write to support@apidata.one. `pk_test_` keys also work from `localhost` on any port while developing. ================================================================================ PAGE: pagination_limit_reached (400) URL: https://docs.apidata.one/errors/pagination_limit_reached/ ================================================================================ # pagination_limit_reached (400) A search can page through at most 10,000 results. The cursor sent would start past that point. `meta.page.total` reports the count up to the cap and `totalIsCapped: true` when the search has more. **Fix:** narrow the filters (a smaller area, a price range, a status, a property class) so the results fit under the cap, or sort differently so what you need comes first. ================================================================================ PAGE: quota_exceeded (429) URL: https://docs.apidata.one/errors/quota_exceeded/ ================================================================================ # quota_exceeded (429) The key has been served its place outlines for today: 5,000 per key and UTC day. `Retry-After` and `Outline-Quota-Reset` give the seconds until 00:00 UTC, when the count starts again; `Outline-Quota-Limit` and `Outline-Quota-Remaining` are on every outline answer. Only outlines that were actually served count. Other routes are not affected. This is the daily quota. The short-term limit on outlines (60 in any 60 seconds) answers [`rate_limited`](https://docs.apidata.one/errors/rate_limited.md). See [rate limits](https://docs.apidata.one/concepts/rate-limits.md). **Fix:** wait for the reset, and ask for an outline only when a place is first shown, not again as the map moves. ================================================================================ PAGE: rate_limited (429) URL: https://docs.apidata.one/errors/rate_limited/ ================================================================================ # rate_limited (429) Too many requests in a short time. See [rate limits](https://docs.apidata.one/concepts/rate-limits.md) for the buckets: a secret key has its own (50 a second, bursts of 100); a publishable key has its own (20 a second, bursts of 50) and shares the address's bucket (20 a second, bursts of 50) with every other publishable key and every unauthenticated request from that address. Place outlines have a limit of their own as well: a key is served at most 60 in any 60 seconds. (Their daily quota answers [`quota_exceeded`](https://docs.apidata.one/errors/quota_exceeded.md).) So does the key list: `GET /v1/listings/keys` answers a key one request every 2 seconds, with bursts of 5. So do webhook endpoints: an account may make 10 registrations and tests (`POST /v1/webhook-endpoints` and `POST …/{id}/test`) in any 10 minutes, and have two registrations waiting on their ping at once. A registration refused for its body or its URL doesn't count. The response carries `Retry-After` (seconds) and, like every response, `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` for the bucket that refused. The address bucket is charged before the key is looked up, so a flood of bad keys from one address gets `429` rather than `401` once the bucket is empty. In a browser the 429 is readable by your script: it carries CORS headers (your listed origin's for your key's own bucket, `*` for the address's) and exposes `Retry-After`. **Fix:** wait `Retry-After` seconds and retry; spread bursts out; call from your server with the `sk_` key where you can, and cache what doesn't change between requests. ================================================================================ PAGE: sandbox_listing_protected (409) URL: https://docs.apidata.one/errors/sandbox_listing_protected/ ================================================================================ # sandbox_listing_protected (409) A sandbox trigger named a listing it may not change. `reason` says which kind: - `named_edge_case`: one of the sandbox's named edge cases (their keys start `SBX9`). They never change, so every developer sees the same thing in them. - `not_your_trigger_listing`: `listing.removed` was asked for a listing that a trigger of your account did not make. Only those can be removed. Nothing was changed, and the request does not count against the trigger limit. **Fix:** for `favorite.listing_updated`, favorite any other sandbox listing. For `listing.removed`, first make a listing with a `saved_search.matches` trigger and remove that one. See [sandbox triggers](https://docs.apidata.one/reference/sandbox-triggers.md). ================================================================================ PAGE: sandbox_trigger_not_possible (409) URL: https://docs.apidata.one/errors/sandbox_trigger_not_possible/ ================================================================================ # sandbox_trigger_not_possible (409) A sandbox trigger asked for a change that cannot be made. `reason` says why: - `alerts_off`: the saved search's `alertFrequency` is `off`, so it never alerts. - `criteria_unsatisfiable`: no made-up listing can meet the search's criteria; `field` names the filter that cannot be met (for example a `modifiedSince` in the future). - `change_not_possible`: the change does not apply to that listing, for example an open house on a Closed listing, or a price change on a listing that shows no price. Nothing was changed, and the request does not count against the trigger limit. **Fix:** set the search's `alertFrequency` to `instant`, `daily` or `weekly`; loosen the filter named in `field`; or pick another `kind` or another listing. See [sandbox triggers](https://docs.apidata.one/reference/sandbox-triggers.md). ================================================================================ PAGE: saved_search_not_active (409) URL: https://docs.apidata.one/errors/saved_search_not_active/ ================================================================================ # saved_search_not_active (409) A sandbox trigger asked for a match on a saved search that is paused, so no alert could follow. `status` carries the search's status: `paused_tier`, `paused_suspended` or `paused_invalid`. Nothing was changed, and the request does not count against the trigger limit. **Fix:** make the search active again (`GET /v1/saved-searches/{id}` shows its status and the [saved searches reference](https://docs.apidata.one/reference/saved-searches.md) says what each one means), then send the trigger again. ================================================================================ PAGE: secret_key_in_browser (403) URL: https://docs.apidata.one/errors/secret_key_in_browser/ ================================================================================ # secret_key_in_browser (403) An `sk_` key was sent from a browser: the request carried an `Origin` header, or any `Sec-Fetch-Site` header, which every browser adds to every request it makes (same-origin fetches, workers, frames and extensions included). The key is now flagged `possiblyExposed` in `GET /v1/account`, and the portal's keys page shows the warning. The account's Owners get one email about it, for a test key as for a live one. The key itself keeps working, so that your server is not cut off: only requests that look like a browser's are refused. **Fix:** call the API from your server with the `sk_` key, or use the `pk_` key plus a client token in the browser. If this call really comes from your server, stop forwarding the browser's `Origin` and `Sec-Fetch-*` headers to the API (a proxy that copies the browser's headers looks like the browser). Then replace the flagged key: make a new one in the portal, put it on your server, and revoke this one. This check runs right after the key is found, before anything else about the request is looked at, so a missing header or a malformed body never hides it. ================================================================================ PAGE: secret_key_required (403) URL: https://docs.apidata.one/errors/secret_key_required/ ================================================================================ # secret_key_required (403) A `pk_` key called an endpoint reserved for secret keys: minting client tokens, deleting a consumer, every `/v1/webhook-endpoints` route, and `GET /v1/events`. **Fix:** call it from your server with the `sk_` key. Never put the `sk_` key in a browser. ================================================================================ PAGE: shape_in_use (409) URL: https://docs.apidata.one/errors/shape_in_use/ ================================================================================ # shape_in_use (409) The saved shape is named by one or more of the consumer's saved searches, so it was not deleted. `savedSearchIds` lists them. A saved search is never left pointing at a shape that is gone: it would silently match nothing. **Fix:** change those saved searches so they no longer use the shape (`PATCH /v1/saved-searches/{id}` with new `criteria`), or delete them, then delete the shape. ================================================================================ PAGE: shape_invalid (400) URL: https://docs.apidata.one/errors/shape_invalid/ ================================================================================ # shape_invalid (400) A shape sent as `location.shape` (a search or a map) or as `geometry` (a saved shape) is not one closed ring that can be searched. `field` names where it came in and `reason` what was wrong: | `reason` | Meaning | | --- | --- | | `not_a_polygon` | not a GeoJSON object of `type: "Polygon"` with `coordinates` | | `holes_not_allowed` | more than one ring | | `bad_coordinate` | a position that isn't exactly `[longitude, latitude]` inside ±180 and ±90 | | `not_closed` | the last position doesn't repeat the first | | `too_few_vertices` | fewer than three corners | | `self_intersecting` | the ring crosses or touches itself | The error never repeats a coordinate. See [drawn shapes](https://docs.apidata.one/concepts/shapes.md). **Fix:** send one closed ring of `[longitude, latitude]` positions that doesn't cross itself. ================================================================================ PAGE: shape_too_large (400) URL: https://docs.apidata.one/errors/shape_too_large/ ================================================================================ # shape_too_large (400) A shape has more than 200 corners (`reason: "too_many_vertices"`, with `vertices` and `maxVertices`) or covers more than 5,000 km² (`reason: "area_too_large"`, with `areaSqKm` and `maxAreaSqKm`). `field` names where it came in: `location.shape` or `geometry`. The largest county in the region is about 4,035 km². See [drawn shapes](https://docs.apidata.one/concepts/shapes.md). **Fix:** draw a smaller or simpler shape. For a whole city, county or ZIP area, search its place with `location.placeIds` instead. ================================================================================ PAGE: temporarily_unavailable (500) URL: https://docs.apidata.one/errors/temporarily_unavailable/ ================================================================================ # temporarily_unavailable (500) The request could not be completed right now. The response carries a `Retry-After` header (seconds). For a write, nothing was saved in the first two cases below, and repeating it is safe in every case (a write here either creates the record or returns the existing one). The causes: - The write kept losing a race with another change to the same consumer's data, and was given up after a few attempts. - Writes for one consumer are applied one at a time, and this one waited about a second for an earlier write of the same consumer that was still in progress. The wait is capped so that a queue behind one slow write can never hold up other consumers or other accounts. - The service was busy: no database connection became free for this request within its wait. - The database did not answer a step of this request in time. The connection was given up rather than waited on. - The service could not reach its database at all when the request arrived. Nothing was done. No request is left waiting without an answer: each of these waits has a limit. **Fix:** try again after `Retry-After`. If it keeps happening, report the `requestId`. The status is `500`, not `503`: tell this answer from `internal_error` by `error.code`. Most HTTP client libraries retry a `503` by themselves but not a `500`, so write the retry yourself. The API never answers `502`, `503` or `504`; an HTML page with one of those comes from the hosting platform, not from the API (see [responses and errors](https://docs.apidata.one/concepts/responses-and-errors.md)). ================================================================================ PAGE: tier_insufficient (403) URL: https://docs.apidata.one/errors/tier_insufficient/ ================================================================================ # tier_insufficient (403) The request used a Premium feature with a key on a Basic account. The response names the feature in `capability`: - `shapes`: a place outline (`GET /v1/places/{placeId}/geometry`), a drawn shape (`location.shape`), the saved-shape routes and `location.shapeId`; - `schools`: a listing's schools (`GET /v1/listings/{listingKey}/schools`), a school district as a place (its details, or in `location.placeIds`), `types=schoolDistricts` in autocomplete, and `location.schoolIds`. Nothing is ignored silently: a request that asks for a Premium feature is refused as a whole rather than answered without it, and the refusal comes before any other check of the request's content. An upgrade or a downgrade applies from the next request, with the same keys. After a downgrade nothing is deleted: saved shapes stay stored and come back with Premium. Basic keys search by place IDs (cities, counties, townships, ZIP areas, communities, subdivisions), bounding boxes, radii, ZIP codes, cities and subdivisions, and read every place but school districts. **Fix:** upgrade the account to Premium, or remove the Premium field from the request. ================================================================================ PAGE: validation_failed (400) URL: https://docs.apidata.one/errors/validation_failed/ ================================================================================ # validation_failed (400) A parameter or body field is missing, malformed or out of range, or the body could not be read. The response lists each problem in `fields: [{ path, problem, expected }]`. **Fix:** correct the listed fields. Examples: request bodies are JSON only, sent with `Content-Type: application/json` (UTF-8) and at most 64 KiB; `listingKey` is 1–64 characters of `A-Z a-z 0-9 _ -`; `expiresInMinutes` is a whole number from 1 to 60 (it is never silently shortened); `clientId` is required when minting a client token (a value that isn't opaque is `client_id_must_be_opaque` instead); with an `sk_` key, consumer endpoints need the `X-Client-Id` header. A path that can't be read is `validation_failed` too, with `fields[0].path` of `path`: a broken percent-escape (`malformed`), or a part of the path longer than 100 characters where a route takes a value (`too long`). That answer repeats nothing of the request and comes before the key is checked. The body is checked last: a bad key, a secret key in a browser, an unlisted origin, a bad token or client ID, or a pending or suspended account is reported before any body problem. ================================================================================ PAGE: webhook_destination_refused (400) URL: https://docs.apidata.one/errors/webhook_destination_refused/ ================================================================================ # webhook_destination_refused (400) The endpoint's host name resolves to an address that isn't on the public internet, so the registration ping was not sent and the endpoint was not saved. The API calls only public addresses. Private networks (`10.…`, `172.16.…`, `192.168.…`), loopback (`127.…`, `localhost`), link-local addresses, carrier-grade NAT and every other reserved range are refused, in IPv4 and IPv6 alike. A name that resolves to several addresses is refused if **any one** of them is not public. The answer never says which address the name resolved to. The same check runs before every delivery, not only at registration. An endpoint whose name later starts resolving to a private address gets no requests: its deliveries show `refused_destination` in the [delivery list](https://docs.apidata.one/reference/endpoints/list-webhook-deliveries.md). **Fix:** point the host name at a public address. To receive webhooks on a development machine, use a tunnel that gives it a public `https://` name, or read [`GET /v1/events`](https://docs.apidata.one/reference/endpoints/list-events.md) instead, which needs no public address at all. ================================================================================ PAGE: webhook_ping_failed (400) URL: https://docs.apidata.one/errors/webhook_ping_failed/ ================================================================================ # webhook_ping_failed (400) Registering a webhook endpoint sends it a signed `ping`, which must be answered with a 2xx within 10 seconds. It wasn't, so the endpoint was not saved. `result` says what happened: | `result` | Meaning | | ----------------------- | ---------------------------------------------------------------------------- | | `http_status` | Your server answered with the status in `statusCode`, which isn't a 2xx | | `timeout` | No answer within 10 seconds | | `tls_failed` | The TLS certificate did not verify for the URL's host name | | `connection_failed` | The host name did not resolve, or no connection could be made | | `redirect_not_followed` | Your server answered with a redirect (`statusCode`). Redirects are never followed | Nothing your server sent back is kept or shown: only the status code. **Fix:** make the URL answer a `POST` with a 2xx, at exactly that address, then register again. - Deploy the endpoint before you register it. - **Answer every `ping` with a 2xx, whether or not its signature verifies.** A ping is a request whose `ApiData-Event-Type` header is `ping`. The registration ping is signed with a secret you receive only in the answer, and a second endpoint's ping is signed with its own new secret, not with one you already hold. An endpoint that answers `400` to a ping it can't verify fails registration with `result: http_status` and `statusCode: 400` ([registration](https://docs.apidata.one/reference/endpoints/create-webhook-endpoint.md)). - Until the secret is stored, answer every other request `503`, never a 2xx: a notice answered 2xx is not sent again. - A redirect from `http` to `https`, to a `www.` name or to a trailing slash counts as a failure. Register the final URL. - Use a certificate from a public authority, with its full chain, valid for the host name. ================================================================================ PAGE: webhook_url_invalid (400) URL: https://docs.apidata.one/errors/webhook_url_invalid/ ================================================================================ # webhook_url_invalid (400) The `url` of a webhook endpoint can't be used. `fields[0].problem` says why: | Problem | Meaning | | ------------------------------------- | ---------------------------------------------------------- | | `not a string`, `not a URL` | The value isn't a URL at all | | `not https` | Only `https://` endpoints are called | | `names an IP address, not a host name` | The host must be a name, such as `example.com` | | `has no usable host name` | The host is empty or isn't a valid name | | `holds a user name or password` | `https://user:pass@…` is refused: don't put a secret in the URL | | `holds a fragment (#…)` | A fragment is never sent to a server | | `longer than 2048 characters` | The whole URL must fit in 2,048 characters | Nothing was sent and nothing was saved. This refusal doesn't count toward the registration limit. **Fix:** register an `https://` URL with a host name, such as `https://example.com/webhooks/apidata`. Any port and any path are fine. To tell your endpoints apart, use the path or the endpoint's `description`, not a user name or a password.