apidata.one docs Get a key

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):

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.

The criteria are the filters of a search, exactly as POST /v1/listings/search takes them, without paging or sorting:

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"}'

Show the visitor their searches with GET /v1/saved-searches, let them change the frequency with PATCH, and delete with DELETE (reference).

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.

{
  "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):

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 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 lists every element and where its text comes from.

Favorites alert too

A visitor's favorites 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 changes by itself every 5 minutes, so a saved search there alerts before long. To see one at once, send a sandbox trigger with the saved search's ID, and read the notice within about 10 seconds:

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).

Good to know

This page as Markdown