How do I read streamed citations from Brave's Answers API?

The Citead team, updated

In short. Read citation JSON from tagged streamed content after enabling stream and enable_citations in single-search mode.

Definition: Streamed citations from Brave's Answers API are source records encoded as JSON inside <citation> tags in answer content. As of 17 October 2026, Brave documents inline citation tags for single-search requests with streaming enabled.

Key facts

  • Brave's API reference sets enable_citations to false by default and requires stream=true when it is enabled.
  • Brave's Answers guide shows citation records containing start_index, end_index, number, url, favicon and snippet.
  • Brave's Answers skill file describes server-sent events (SSE), a stream of data: messages carrying response chunks, followed by data: [DONE].

Which request enables inline citations?

The API reference accepts exactly one user message. It lists brave and brave-pro as model options and defaults to brave-pro. The following request body explicitly selects streaming and inline citations:

{
  "messages": [{"role": "user", "content": "Explain quantum computing"}],
  "model": "brave",
  "stream": true,
  "enable_citations": true,
  "enable_research": false
}

The reference restricts enable_citations to requests outside research mode. It separately defines enable_research as iterative research requiring streaming. This distinction matters when selecting a parser: the inline citation option belongs to the single-search format.

Where does the citation data appear?

Brave's Answers guide reads streamed content from choices[0].delta.content. Its citation example is:

<citation>{"start_index": 0, "end_index": 10, "number": 1, "url": "https://...", "favicon": "...", "snippet": "..."}</citation>

The URL and ellipses are documentation placeholders. The guide's parser checks for opening and closing citation tags, removes them, and decodes the enclosed JSON. It renders a link using number as the label and url as the destination. The record also carries the snippet and favicon fields shown above.

The same example handles <usage> tags separately and prints ordinary answer text progressively. Usage metadata arrives as the last streaming message and includes fields such as X-Request-Queries and X-Request-Total-Cost.

How does the outer stream differ from research output?

Brave's Answers skill file shows the outer SSE message structure:

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":"Based on"},"index":0}]}

data: [DONE]

Reading this format involves extracting the response chunk's content, then interpreting tags within that content. The SSE data: prefix belongs to the transport envelope; <citation> belongs to the answer content.

For research mode, the same file describes <progress> events and a final <answer> containing built-in citations. It also lists <usage> for cost data. A consumer handling research output therefore needs the documented research tags in addition to the single-search citation handler.

FAQ

Why are inline citation tags missing?

Check enable_citations: the API reference defaults it to false. To request those tags, set it to true, enable streaming and keep research mode disabled.

Can I place highlights using the index fields?

The Answers guide shows start_index and end_index but leaves their offset units and boundary convention unspecified. Its display example uses the citation number and URL directly.

Sources

  1. Brave, "Answers" service guide, undated
  2. Brave, "Answers" API reference, undated
  3. Brave, Answers skill file, undated

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark