/llm-context
USE FOR RAG/LLM grounding. Returns pre-extracted web content (text, tables, code) optimized for LLMs. GET + POST. Adjust max_tokens/count based on complexity. Supports Goggles, local/POI. For AI answers use answers. Recommended for anyone building AI/agentic applications.
$ npx -y skills add brave/brave-search-skills --skill llm-context --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/llm-context
Context preview
The summary Claude sees to decide when to auto-load this skill.
USE FOR RAG/LLM grounding. Returns pre-extracted web content (text, tables, code) optimized for LLMs. GET + POST. Adjust max_tokens/count based on complexity. Supports Goggles, local/POI. For AI answers use answers. Recommended for anyone building AI/agentic applications.
SKILL.md
llm-context.SKILL.mdname: llm-context
description: USE FOR RAG/LLM grounding. Returns pre-extracted web content (text, tables, code) optimized for LLMs. GET + POST. Adjust max_tokens/count based on complexity. Supports Goggles, local/POI. For AI answers use answers. Recommended for anyone building AI/agentic applications.
LLM Context
> **Requires API Key**: Get one at https://api.search.brave.com > > **Plan**: Included in the **Search** plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
Brave LLM Context API delivers pre-extracted, relevance-ranked web content optimized for grounding LLM responses in real-time search results. Unlike traditional web search APIs that return links and snippets, LLM Context extracts the actual page content—text chunks, tables, code blocks, and structured data—so your LLM or AI agent can reason over it directly.
LLM Context vs AI Grounding
| Feature | LLM Context (this) | AI Grounding (`answers`) | |--|--|--| | Output | Raw extracted content for YOUR LLM | End-to-end AI answers with citations | | Interface | REST API (GET/POST) | OpenAI-compatible `/chat/completions` | | Searches | Single search per request | Multi-search (iterative research) | | Speed | Fast (<1s) | Slower | | Plan | Search | Answers | | Endpoint | `/res/v1/llm/context` | `/res/v1/chat/completions` | | Best for | AI agents, RAG pipelines, tool calls | Chat interfaces, research mode |
Endpoint
GET https://api.search.brave.com/res/v1/llm/context
POST https://api.search.brave.com/res/v1/llm/context
**Authentication**: `X-Subscription-Token: <API_KEY>` header
**Optional Headers**:
- `Accept-Encoding: gzip` — Enable gzip compression
Quick Start
GET Request
curl -s "https://api.search.brave.com/res/v1/llm/context?q=tallest+mountains+in+the+world" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"POST Request (JSON body)
curl -s --compressed -X POST "https://api.search.brave.com/res/v1/llm/context" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"q": "tallest mountains in the world"}'With Goggles (Inline)
curl -s "https://api.search.brave.com/res/v1/llm/context" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=rust programming" \
--data-urlencode 'goggles=$discard
$site=docs.rs
$site=rust-lang.org'Parameters
Query Parameters
| Parameter | Type | Required | Default | Description | |--|--|--|--|--| | `q` | string | **Yes** | - | Search query (1-400 chars, max 50 words) | | `country` | string | No | `US` | Search country (2-letter country code or `ALL`) | | `search_lang` | string | No | `en` | Language preference (2+ char language code) | | `count` | int | No | `20` | Max search results to consider (1-50) | | `spellcheck` | bool | No | `true` | Whether to spellcheck the query before searching | | `freshness` | string | No | `""` | Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. Supported values: `pd` (24h or less), `pw` (7 days or less), `pm` (31 days or less), `py` (365 days or less), or a custom date range `YYYY-MM-DDtoYYYY-MM-DD` (e.g. `2022-04-01to2022-07-30`). |
Context Size Parameters
| Parameter | Type | Required | Default | Description | |--|--|--|--|--| | `maximum_number_of_urls` | int | No | `20` | Max URLs in response (1-50) | | `maximum_number_of_tokens` | int | No | `8192` | Approximate max tokens in context (1024-32768) | | `maximum_number_of_snippets` | int | No | `50` | Max snippets across all URLs (1-256) | | `maximum_number_of_tokens_per_url` | int | No | `4096` | Max tokens per individual URL (512-8192) | | `maximum_number_of_snippets_per_url` | int | No | `50` | Max snippets per individual URL (1-100) |
Filtering & Local Parameters
| Parameter | Type | Required | Default | Description | |--|--|--|--|--| | `context_threshold_mode` | string | No | `null` | Relevance threshold for including content (`strict`/`balanced`/`lenient`/`disabled`) | | `safesearch` | string | No | `null` | Adult content filter (`off`/`moderate`/`strict`); not set means no filtering, except local recall which stays `strict` | | `enable_local` | bool | No | `null` | Local recall control (`true`/`false`/`null`, see below) | | `goggles` | string/list | No | `null` | Goggle URL or inline definition for custom re-ranking | | `enable_source_metadata` | bool | No | `false` | Adds `site_name`, `favicon`, `thumbnail` and `description` to each `sources[url]` entry |
Context Size Guidelines
| Task Type | count | max_tokens | Example | |--|--|--|--| | Simple factual | 5 | 2048 | "What year was Python created?" | | Standard queries | 20 | 8192 | "Best practices for React hooks" | | Complex research | 50 | 16384 | "Compare AI frameworks for production" |
Larger context windows provide more information but increase latency and cost (of your inference). Start with defaults and adjust.
Threshold Modes
| Mode | Behavior | |--|--| | `null` (not set) | **Default** — resolves to `lenient` on the current API version | | `strict` | Higher threshold — fewer but more relevant results | | `balanced` | Good balance between coverage and relevance | | `lenient` | Lower threshold — more results, may include less relevant content | | `disabled` | No threshold filtering — return all extracted content |
Local Recall
The `enable_local` parameter controls location-aware recall:
| Value | Behavior | |--|--| | `null` (not set) | **Auto-detect** — local recall enabled when any location header is provided | | `true` | **Force local** — always use local recall, even without location headers | | `false` | **Force standard** — always use standard web ranking, even with l
Read more
name: llm-context description: USE FOR RAG/LLM grounding. Returns pre-extracted web content (text, tables, code) optimized for LLMs. GET + POST. Adjust max_tokens/count based on complexity. Supports Goggles, local/POI. For AI answers use answers. Recommended for anyone building AI/agentic applications.
LLM Context
> **Requires API Key**: Get one at https://api.search.brave.com > > **Plan**: Included in the **Search** plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
Brave LLM Context API delivers pre-extracted, relevance-ranked web content optimized for grounding LLM responses in real-time search results. Unlike traditional web search APIs that return links and snippets, LLM Context extracts the actual page content—text chunks, tables, code blocks, and structured data—so your LLM or AI agent can reason over it directly.
LLM Context vs AI Grounding
| Feature | LLM Context (this) | AI Grounding (`answers`) | |--|--|--| | Output | Raw extracted content for YOUR LLM | End-to-end AI answers with citations | | Interface | REST API (GET/POST) | OpenAI-compatible `/chat/completions` | | Searches | Single search per request | Multi-search (iterative research) | | Speed | Fast (<1s) | Slower | | Plan | Search | Answers | | Endpoint | `/res/v1/llm/context` | `/res/v1/chat/completions` | | Best for | AI agents, RAG pipelines, tool calls | Chat interfaces, research mode |
Endpoint
GET https://api.search.brave.com/res/v1/llm/context POST https://api.search.brave.com/res/v1/llm/context
**Authentication**: `X-Subscription-Token: <API_KEY>` header
**Optional Headers**:
- `Accept-Encoding: gzip` — Enable gzip compression
Quick Start
GET Request
curl -s "https://api.search.brave.com/res/v1/llm/context?q=tallest+mountains+in+the+world" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}"POST Request (JSON body)
curl -s --compressed -X POST "https://api.search.brave.com/res/v1/llm/context" \
-H "Accept: application/json" \
-H "Accept-Encoding: gzip" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"q": "tallest mountains in the world"}'With Goggles (Inline)
curl -s "https://api.search.brave.com/res/v1/llm/context" \
-H "Accept: application/json" \
-H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
-G \
--data-urlencode "q=rust programming" \
--data-urlencode 'goggles=$discard
$site=docs.rs
$site=rust-lang.org'Parameters
Query Parameters
| Parameter | Type | Required | Default | Description | |--|--|--|--|--| | `q` | string | **Yes** | - | Search query (1-400 chars, max 50 words) | | `country` | string | No | `US` | Search country (2-letter country code or `ALL`) | | `search_lang` | string | No | `en` | Language preference (2+ char language code) | | `count` | int | No | `20` | Max search results to consider (1-50) | | `spellcheck` | bool | No | `true` | Whether to spellcheck the query before searching | | `freshness` | string | No | `""` | Filters search results by page age. The age of a page is determined by the most relevant date reported by the content, such as its published or last modified date. Supported values: `pd` (24h or less), `pw` (7 days or less), `pm` (31 days or less), `py` (365 days or less), or a custom date range `YYYY-MM-DDtoYYYY-MM-DD` (e.g. `2022-04-01to2022-07-30`). |
Context Size Parameters
| Parameter | Type | Required | Default | Description | |--|--|--|--|--| | `maximum_number_of_urls` | int | No | `20` | Max URLs in response (1-50) | | `maximum_number_of_tokens` | int | No | `8192` | Approximate max tokens in context (1024-32768) | | `maximum_number_of_snippets` | int | No | `50` | Max snippets across all URLs (1-256) | | `maximum_number_of_tokens_per_url` | int | No | `4096` | Max tokens per individual URL (512-8192) | | `maximum_number_of_snippets_per_url` | int | No | `50` | Max snippets per individual URL (1-100) |
Filtering & Local Parameters
| Parameter | Type | Required | Default | Description | |--|--|--|--|--| | `context_threshold_mode` | string | No | `null` | Relevance threshold for including content (`strict`/`balanced`/`lenient`/`disabled`) | | `safesearch` | string | No | `null` | Adult content filter (`off`/`moderate`/`strict`); not set means no filtering, except local recall which stays `strict` | | `enable_local` | bool | No | `null` | Local recall control (`true`/`false`/`null`, see below) | | `goggles` | string/list | No | `null` | Goggle URL or inline definition for custom re-ranking | | `enable_source_metadata` | bool | No | `false` | Adds `site_name`, `favicon`, `thumbnail` and `description` to each `sources[url]` entry |
Context Size Guidelines
| Task Type | count | max_tokens | Example | |--|--|--|--| | Simple factual | 5 | 2048 | "What year was Python created?" | | Standard queries | 20 | 8192 | "Best practices for React hooks" | | Complex research | 50 | 16384 | "Compare AI frameworks for production" |
Larger context windows provide more information but increase latency and cost (of your inference). Start with defaults and adjust.
Threshold Modes
| Mode | Behavior | |--|--| | `null` (not set) | **Default** — resolves to `lenient` on the current API version | | `strict` | Higher threshold — fewer but more relevant results | | `balanced` | Good balance between coverage and relevance | | `lenient` | Lower threshold — more results, may include less relevant content | | `disabled` | No threshold filtering — return all extracted content |
Local Recall
The `enable_local` parameter controls location-aware recall:
| Value | Behavior | |--|--| | `null` (not set) | **Auto-detect** — local recall enabled when any location header is provided | | `true` | **Force local** — always use local recall, even without location headers | | `false` | **Force standard** — always use standard web ranking, even with l
Official skills for using Brave Search API with AI coding agents. Works with Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI, VS Code, Windsurf, OpenClaw, Cline, Goose, Amp, Roo Code, and many other agents that support the Agent Skills standard.
Other skills on brave-search-skills.
- /answers
USE FOR AI-grounded answers via OpenAI-compatible /chat/completions. Two modes: single-search (fast) or deep research (enable_research=true, thorough multi-search). Streaming/blocking. Citations.
Open skill - /bx
USE FOR web search, research, RAG, grounding, browse, find, lookups, fact-checking, documentation, agentic AI. All-in-one, optimized for AI agents. Pre-extracted, token-budgeted web content, deep research, news, images, videos, places, custom ranking
Open skill - /images-search
USE FOR image search. Returns images with title, source URL, thumbnail. Supports SafeSearch filter. Up to 200 results.
Open skill - /local-descriptions
USE FOR getting AI-generated POI text descriptions. Requires POI IDs obtained from web-search (with result_filter=locations). Returns markdown descriptions grounded in web search context. Max 20 IDs per request.
Open skill - /local-pois
USE FOR getting local business/POI details. Requires POI IDs obtained from web-search (with result_filter=locations). Returns full business information including ratings, hours, contact info. Max 20 IDs.
Open skill - /news-search
USE FOR news search. Returns news articles with title, URL, description, age, thumbnail. Supports freshness and date range filtering, SafeSearch filter and Goggles for custom ranking.
Open skill

