Streaming

Server-sent events (SSE) streaming for search and AI search — receive results incrementally.

Overview

Two streaming endpoints are available:

  • POST /v1/search/stream (backend) — search results delivered as SSE events: start, results, done, error
  • POST /api/search/stream (web) — AI search wrapped in SSE, one data: event with the answer payload followed by data: [DONE]

Streaming requires an API key and is metered the same as the non-streaming equivalent: credits are deducted up front and refunded automatically if the client disconnects or the engine fails mid-stream.

Rate limit: 20 stream requests per minute per user.

Event Format

Each SSE block has an event: line and a data: line:

text

Client Example

Consuming the stream from JavaScript:

javascript

Credit Cost

AI search streaming costs 8 credits per run. Search streaming costs the standard live-search rate for the chosen engine. Disconnects before completion trigger an automatic refund.

Need help?

Check our error codes or reach out to the team.