Stream Listing Updates
Overview
Section titled “Overview”Opens a Server-Sent Events (SSE) stream for a single listing. The stream delivers cached data immediately, then attempts a live fetch for the freshest data available.
Tier requirement: Pro, Business, or Internal.
SSE Events
Section titled “SSE Events”| Event | Description |
|---|---|
cached | Immediate response from D1 cache (arrives within milliseconds) |
live | Fresh data fetched live from the source (arrives in 2-5 seconds) |
error | Live fetch or parse could not complete; the payload includes an error code such as fetch_failed |
done | Stream complete, connection will close |
Example
Section titled “Example”curl -N -H "Authorization: Bearer BOROUGH-..." \ -H "Accept: text/event-stream" \ https://borough.qwady.app/v1/listing/4961849event: cacheddata: {"id":"4961849","price":3200,"status":"ACTIVE",...}
event: livedata: {"id":"4961849","price":3150,"status":"ACTIVE",...}
event: donedata: {}Behavior
Section titled “Behavior”- The
cachedevent is always sent first (from D1 database) - The
liveevent is sent if the live fetch succeeds (typically 2-5 seconds) - If the live fetch fails or times out, an
errorevent is sent instead oflive - The stream always ends with a
doneevent - Total stream duration is typically under 10 seconds
When to use
Section titled “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 data automatically on the regular GET /v1/property/{id} endpoint (returned with "source": "live"), so the SSE stream is primarily useful for Pro tier users who want live data.