In short. count sets the candidate search budget, while maximum_number_of_urls sets the returned distinct URL limit.
Definition: In Brave LLM Context,
countlimits the search results considered when selecting context, whilemaximum_number_of_urlslimits the different URLs included in the returned context. Both parameters default to20and accept values from1to50.
Key facts
- Brave defines
countas the maximum number of search results considered to select LLM context data in its API reference. - Brave defines
maximum_number_of_urlsas the maximum number of different URLs to include in LLM context in the same API reference. - The LLM Context documentation gives both parameters a default of
20and a range of1to50. - The service returns extracted page chunks and source metadata, rather than only the titles and short snippets used by traditional Web Search, according to Brave's LLM Context documentation.
What does each parameter limit?
count is an upstream candidate budget. Brave's API reference describes it as the maximum number of search results considered to select the LLM context data. The candidates are search results, so this parameter controls how wide the selection stage may look.
maximum_number_of_urls is a returned-context budget. Brave describes it as the maximum number of different URLs to include in LLM context. The unit is a distinct URL, while count is expressed in search results considered. A request can therefore use a wider candidate count and a smaller URL limit when an application wants selection to consider more results but wants the context to contain fewer source pages.
The documented endpoint accepts both GET and POST requests. A GET request can express the two budgets as query parameters:
curl -G "https://api.search.brave.com/res/v1/llm/context" \
-H "X-Subscription-Token: <YOUR_API_KEY>" \
--data-urlencode "q=web accessibility requirements" \
--data-urlencode "count=50" \
--data-urlencode "maximum_number_of_urls=5"
Why can the response contain fewer URLs?
The URL limit is one ceiling among several. Brave also documents maximum_number_of_tokens with a default of 8192 and a range of 1024 to 32768, plus maximum_number_of_tokens_per_url with a default of 4096 and a range of 512 to 8192. These budgets affect how much extracted content can fit in the context.
Relevance filtering also affects inclusion. The documentation lists strict, balanced, lenient and disabled as context_threshold_mode options, and says the parameter controls how aggressively the API filters content for relevance. The API reference describes each returned generic item as having a source URL, a page title and extracted text chunks selected for relevance to the query.
The API reference describes the total token parameter as an approximate maximum number of tokens to include in context, and the per URL parameter as a maximum number of tokens to include per URL. These token budgets are separate from the distinct URL ceiling.
How should an integration inspect the result?
The response schema separates content from URL metadata. Brave documents grounding.generic as an array of LLM context items with extracted web content, and documents sources as metadata for all referenced URLs keyed by URL. Inspect the URLs in grounding.generic when counting returned generic context items, then use the sources object for metadata associated with those URLs.
The two parameters do not describe a citation count. They describe retrieval and context assembly controls in an API whose stated output is pre-extracted content for an LLM or AI agent. The documented LLM Context service is optimized for a single search per request, while its separate Answers service is the interface Brave documents for end-to-end answers with citations.
Related terms
FAQ
If count is 50, will the response contain 50 URLs?
No. count is the maximum number of search results considered during context selection. maximum_number_of_urls separately caps the different URLs included in the context, and relevance and token budgets also shape the response.
If maximum_number_of_urls is 5, will Brave consider only five candidates?
No. The URL parameter limits different URLs in the returned context. The candidate budget remains controlled by count, whose documented maximum is 50.
Which parameter should limit a small context?
Use maximum_number_of_urls to cap the number of source URLs, and use the token parameters to cap context size. Brave's documentation recommends starting with defaults and adjusting the budgets to the task.
Sources
- Brave, "LLM Context: Web search for AI agents and chatbots", undated
- Brave, "LLM Context API reference", undated
- Brave Search, "LLM Context skill", undated
Check how a page reads to answer engines. Open the GEO score analyzer