Skip to main content
Use the stream endpoints to export a whole result set in one request. They suit backfills and full exports. For a count or a single page, use the paginated endpoints instead.
One request returns the entire result set as NDJSON (newline-delimited JSON): one JSON object per line. Each line has the same shape as one data[] entry from the paginated endpoint. Endpoint reference: Stream People and Stream Companies. The same filters apply. Paging parameters (page, limit, skip_count) are ignored.

Paginated vs stream

Use the stream for backfills and full exports. Use pagination for interactive queries where you want a count, or where you only need the first page.

Reading the stream

You must use a streaming line reader: code that processes the body line by line as it arrives. fetch().json(), requests.get().json() and PowerShell’s Invoke-RestMethod all load the entire body into memory before they return. That defeats the point of streaming and can run out of memory on large exports.
Each sample below reads one line at a time and stops if it sees an error line (see Mid-stream errors).

Mid-stream errors

Once the response starts, the HTTP status line has already been sent. So a failure partway through cannot be reported as a status code. Instead, we send one final line and close the connection:
Treat a final object that contains error as a truncated result, not data. A stream that ends this way is incomplete. Discard what you collected, or mark it partial, then retry. If you ignore this line, you silently import half an export as if it were the whole thing.

Retrying a large export

The stream is not resumable, so a retry starts again from the beginning. For very large exports, narrow each request with discovered_from and discovered_to, and stream one date window at a time. See Date filtering.