Stream Listing Updates
Server-Sent Events stream that delivers cached data immediately, then
attempts a live fetch. Events arrive in this order: cached, then live
or error, then done. A listing with no stored URL gets neither live
nor error.
error carries a machine-readable code when the fetch itself fails:
fetch_failed, upstream_unavailable, upstream_rate_limited,
proxy_auth_failed, budget_exceeded, service_disabled, or
cancelled (the 60-second stream limit was reached). A page that was
fetched but could not be read sends error with only a message. Live
fetches draw on a shared live-fetch budget: when it is held for Borough’s
scheduled updates or live fetching is paused, the live attempt ends with
error (budget_exceeded or service_disabled) and the cached event
stands.
The cached payload is labelled source: "cache". live carries only
the fields read from the live page, plus source: "live" and
fetchedAt, so merge it over cached. Each connection costs one request
against your quota and one live fetch: close the connection on done
rather than letting an SSE client reconnect automatically.
Tier: Pro+
Overview
Opens a Server-Sent Events (SSE) stream for a single listing. The stream delivers cached data immediately, then attempts a live fetch for fresher data when live fetching is available. Tier requirement: Pro, Business, or Internal.SSE Events
Error codes
Example
Behavior
- The
cachedevent is always sent first (from D1 database) - The
liveevent is sent if the live fetch succeeds (usually a few seconds) - If the live fetch fails, times out, or is held back (
budget_exceededorservice_disabled), anerrorevent is sent instead oflive - A listing with no stored page URL skips the live step:
cachedis followed directly bydone - The stream always ends with a
doneevent, and the whole stream is capped at 60 seconds - Each connection costs one request against your quota and one live fetch. Close your client on
done; an SSE client that reconnects automatically (such as a browserEventSource) re-opens the stream and is billed again each time
When to use
This endpoint is designed for one-time fresh data retrieval. For ongoing monitoring, use persistent watchers instead. Note: Business and Internal tier users get live-first data on the regularGET /v1/property/{id} endpoint (returned with "source": "live" when the stored detail is more than 5 minutes old and live fetching is available), so the SSE stream is primarily useful for Pro tier users who want live data.