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.
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
Search query (1-600 chars, max 75 words)
2-letter country code for results (default US)
Language code for results (default en)
Max search results to consider (1-50, default 20)
pd (24h), pw (7d), pm (31d), py (365d), or YYYY-MM-DDtoYYYY-MM-DD
Max URLs in response (1-50, default 20)
Approx max tokens of context (1024-32768, default 8192)
Max snippets across all URLs (1-256)
Max tokens per URL (512-8192, default 4096)
Max snippets per URL (1-100)
strict, balanced, lenient, or disabled
off, moderate, or strict. Unset means no filtering (local recall stays strict)
Force local/POI recall
Goggle URL or inline definition for custom re-ranking
Add site_name, favicon, thumbnail, description to sources
Spellcheck the query before searching (default true)