OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add brave/brave-search-skills --skill 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.
npx skills add brave/brave-search-skills --skill answers
Requires API Key: Get one at https://api.search.brave.com
Plan: Included in the Answers plan. See https://api-dashboard.search.brave.com/app/subscriptions/subscribe
| Use Case | Skill | Why |
|---|---|---|
| Quick factual answer (raw context) | llm-context | Single search, returns raw context for YOUR LLM |
| Fast AI answer with citations | answers (single-search) | streaming, citations |
| Thorough multi-search deep research | answers (research mode) | Iterative deep research, synthesized cited answer |
This endpoint (/res/v1/chat/completions) supports two modes:
enable_citations.enable_research=true): Multi-iteration deep research with progress events and synthesized cited answer.Authentication: X-Subscription-Token: <API_KEY> header (or Authorization: Bearer <API_KEY>)
SDK Compatible: Works with OpenAI SDK via base_url="https://api.search.brave.com/res/v1"
| Feature | Single-Search (default) | Research (enable_research=true) |
|---|---|---|
| Speed | Fast | Slow |
| Searches | 1 | Multiple (iterative) |
| Streaming | Optional (stream=true/false) | Required (stream=true) |
| Citations | enable_citations=true (streaming only) | Built-in (in <answer> tag) |
| Progress events | No | Yes (<progress> tags) |
| Blocking response | Yes (stream=false) | No |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messages | array | Yes | - | Single user message (exactly 1 message) |
stream | bool | No | true | Enable SSE streaming |
country | string | No | "US" | Search country (2-letter country code or ALL) |
language | string | No | "en" | Response language |
safesearch | string | No | "moderate" | Search safety level (off, moderate, strict) |
max_completion_tokens | int | No | null | Upper bound on completion tokens |
enable_citations | bool | No | false | Include inline citation tags (single-search streaming only) |
web_search_options | object | No | null | OpenAI-compatible; search_context_size: low, medium, high |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
enable_research | bool | No | false | Enable research mode |
research_allow_thinking | bool | No | true | Enable extended thinking |
research_maximum_number_of_tokens_per_query | int | No | 8192 | Max tokens per query (1024-16384) |
research_maximum_number_of_queries | int | No | 20 | Max total search queries (1-50) |
research_maximum_number_of_iterations | int | No | 4 | Max research iterations (1-5) |
research_maximum_number_of_seconds | int | No | 180 | Time budget in seconds (1-300) |
research_maximum_number_of_results_per_query | int | No | 60 | Results per search query (1-60) |
| Constraint | Error |
|---|---|
enable_research=true requires stream=true | "Blocking response doesn't support 'enable_research' option" |
enable_research=true incompatible with enable_citations=true | "Research mode doesn't support 'enable_citations' option" |
enable_citations=true requires stream=true | "Blocking response doesn't support 'enable_citations' option" |
stream=false, single-search only)Standard OpenAI-compatible JSON:
SSE response with OpenAI-compatible chunks:
enable_citations=true)| Tag | Purpose |
|---|---|
<citation> | Inline citation references |
<usage> | JSON cost/billing data |
| Tag | Purpose | Keep? |
|---|---|---|
<queries> | Generated search queries | Debug |
<analyzing> | URL counts (verbose) | Debug |
<thinking> | URL selection reasoning | Debug |
<progress> | Stats: time, iterations, queries, URLs analyzed, tokens | Monitor |
<blindspots> | Knowledge gaps identified | Yes |
<answer> | Final synthesized answer (only the final answer is emitted; intermediate drafts are dropped) | Yes |
<usage> | JSON cost/billing data (included at end of streaming response) | Yes |
The <usage> tag contains JSON-stringified cost and token data:
base_url="https://api.search.brave.com/res/v1".enable_research=true) for complex questions needing multi-source synthesis (e.g., "Compare approaches to nuclear fusion").base_url and api_key. Works with both sync and async clients.enable_citations=true in single-search mode for inline citation tags, or use research mode which automatically includes citations in its answer.messages array must contain exactly 1 user message<usage> tag from streaming responses to track costs