← Back to Brave Search
GET/llm/context

LLM Context

Web search for AI agents: returns pre-extracted, relevance-ranked page chunks (text, tables, code) plus source metadata, sized to a token budget for LLM grounding and RAG.

Brave Search·$0.006 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "brave-search", path: "/llm/context", query: { "q": "example" } }); console.log(output);

Query parameters

qrequired
string

Search query (1-600 chars, max 75 words)

country
string

2-letter country code for results (default US)

search_lang
string

Language code for results (default en)

count
integer

Max search results to consider (1-50, default 20)

freshness
string

pd (24h), pw (7d), pm (31d), py (365d), or YYYY-MM-DDtoYYYY-MM-DD

maximum_number_of_urls
integer

Max URLs in response (1-50, default 20)

maximum_number_of_tokens
integer

Approx max tokens of context (1024-32768, default 8192)

maximum_number_of_snippets
integer

Max snippets across all URLs (1-256)

maximum_number_of_tokens_per_url
integer

Max tokens per URL (512-8192, default 4096)

maximum_number_of_snippets_per_url
integer

Max snippets per URL (1-100)

context_threshold_mode
string

strict, balanced, lenient, or disabled

safesearch
string

off, moderate, or strict. Unset means no filtering (local recall stays strict)

enable_local
boolean

Force local/POI recall

goggles
string

Goggle URL or inline definition for custom re-ranking

enable_source_metadata
boolean

Add site_name, favicon, thumbnail, description to sources

spellcheck
boolean

Spellcheck the query before searching (default true)

    Orthogonal - Giving AI agents the tools they need.