Agent skill

Brave Answers API

by brave in brave/brave-search-skills

Calls the Brave Search Answers endpoint for AI-grounded, cited answers, either a fast single-search reply or a slower multi-search deep research run.

MITAuto-check passedAI & LLM Engineering

Install Brave Answers API

skills CLI
$ npx skills add brave/brave-search-skills --skill answers -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install brave/brave-search-skills answers --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/brave/brave-search-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/answers .claude/skills/answers && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
answers
GitHub stars
183
Token cost
~2.3k tokens
SKILL.md length
566 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Calls the Brave Search Answers endpoint for AI-grounded, cited answers, either a fast single-search reply or a slower multi-search deep research run.

  • Getting a fast cited answer from live web search inside an app
  • SKILL.md covers When to Use, Quick Start (cURL), Endpoint and Two Modes, plus 5 more sections
  • Calls curl; reaches api.search.brave.com; needs API_KEY and BRAVE_SEARCH_API_KEY
  • Running a deeper multi-search research request with progress streaming

What it does

The skill documents Brave's OpenAI-compatible chat completions endpoint, which also works with the OpenAI SDK when its base URL points at Brave. A request carries exactly one user message and authenticates with an X-Subscription-Token header or a bearer token. Single-search mode is the default: it is fast, can stream or block, and can return citations when streaming.

Setting enable_research switches to research mode, which runs iterative searches, requires streaming, emits progress events and returns a synthesized answer with built-in citations. The skill includes cURL quick starts for blocking, streaming and research calls and a parameter reference, and it points to a separate llm-context skill when you only want raw search context for your own model. It needs a Brave Search API key on the Answers plan.

When your agent uses it

  • Getting a fast cited answer from live web search inside an app
  • Running a deeper multi-search research request with progress streaming
  • Switching an OpenAI SDK client over to Brave's endpoint

Example prompts

  • “Write a script that asks Brave Answers a question and prints the streamed citations.”
  • “Run Brave's research mode on this topic and show me the progress events.”
  • “Point my OpenAI SDK client at Brave's answers endpoint.”

Requirements

  • A Brave Search API key on the Answers plan

What it can do on your machine

Read from SKILL.md and the folder at commit 62793e0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.search.brave.com

    Also links to:

    • api-dashboard.search.brave.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY
    • BRAVE_SEARCH_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Brave Answers API loads about 2.3k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 566 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from brave/brave-search-skills at commit 62793e0, republished under its MIT licence (© brave). 566 words, ~2,335 tokens.

Download SKILL.mdSave it as .claude/skills/answers/SKILL.md (or your agent's skills folder).
name
answers
description
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.

Answers — AI Grounding

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

When to Use

Use CaseSkillWhy
Quick factual answer (raw context)llm-contextSingle search, returns raw context for YOUR LLM
Fast AI answer with citationsanswers (single-search)streaming, citations
Thorough multi-search deep researchanswers (research mode)Iterative deep research, synthesized cited answer

This endpoint (/res/v1/chat/completions) supports two modes:

  • Single-search (default): Fast AI-grounded answer from a single search. Supports enable_citations.
  • Research (enable_research=true): Multi-iteration deep research with progress events and synthesized cited answer.

Quick Start (cURL)

bash
curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -d '{
    "messages": [{"role": "user", "content": "How does the James Webb Space Telescope work?"}],
    "stream": false
  }'
bash
curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -d '{
    "messages": [{"role": "user", "content": "What are recent breakthroughs in fusion energy?"}],
    "stream": true,
    "enable_citations": true
  }'
Research Mode
bash
curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-Subscription-Token: ${BRAVE_SEARCH_API_KEY}" \
  -d '{
    "messages": [{"role": "user", "content": "Compare quantum computing approaches"}],
    "stream": true,
    "enable_research": true,
    "research_maximum_number_of_iterations": 3,
    "research_maximum_number_of_seconds": 120
  }'

Endpoint

http
POST https://api.search.brave.com/res/v1/chat/completions

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"

Two Modes

FeatureSingle-Search (default)Research (enable_research=true)
SpeedFastSlow
Searches1Multiple (iterative)
StreamingOptional (stream=true/false)Required (stream=true)
Citationsenable_citations=true (streaming only)Built-in (in <answer> tag)
Progress eventsNoYes (<progress> tags)
Blocking responseYes (stream=false)No

Parameters

Standard Parameters
ParameterTypeRequiredDefaultDescription
messagesarrayYes-Single user message (exactly 1 message)
streamboolNotrueEnable SSE streaming
countrystringNo"US"Search country (2-letter country code or ALL)
languagestringNo"en"Response language
safesearchstringNo"moderate"Search safety level (off, moderate, strict)
max_completion_tokensintNonullUpper bound on completion tokens
enable_citationsboolNofalseInclude inline citation tags (single-search streaming only)
web_search_optionsobjectNonullOpenAI-compatible; search_context_size: low, medium, high
Research Parameters
ParameterTypeRequiredDefaultDescription
enable_researchboolNofalseEnable research mode
research_allow_thinkingboolNotrueEnable extended thinking
research_maximum_number_of_tokens_per_queryintNo8192Max tokens per query (1024-16384)
research_maximum_number_of_queriesintNo20Max total search queries (1-50)
research_maximum_number_of_iterationsintNo4Max research iterations (1-5)
research_maximum_number_of_secondsintNo180Time budget in seconds (1-300)
research_maximum_number_of_results_per_queryintNo60Results per search query (1-60)
Constraints (IMPORTANT)
ConstraintError
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"

OpenAI SDK Usage

Blocking (Single-Search)
python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.search.brave.com/res/v1",
    api_key="your-brave-api-key",
)

response = client.chat.completions.create(
    model="brave",
    messages=[{"role": "user", "content": "How does the James Webb Space Telescope work?"}],
    stream=False,
)
print(response.choices[0].message.content)
Show full SKILL.md (228 more words)Show less
Streaming with Citations (Single-Search)
python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.search.brave.com/res/v1",
    api_key="your-brave-api-key",
)

stream = client.chat.completions.create(
    model="brave",
    messages=[{"role": "user", "content": "What are the current trends in renewable energy?"}],
    stream=True,
    extra_body={"enable_citations": True}
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
Research Mode
python
from openai import AsyncOpenAI

client = AsyncOpenAI(
    base_url="https://api.search.brave.com/res/v1",
    api_key="your-brave-api-key",
)

stream = await client.chat.completions.create(
    model="brave",
    messages=[{"role": "user", "content": "Compare quantum computing approaches"}],
    stream=True,
    extra_body={
        "enable_research": True,
        "research_maximum_number_of_iterations": 3,
        "research_maximum_number_of_seconds": 120
    }
)

async for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Response Format

Blocking Response (stream=false, single-search only)

Standard OpenAI-compatible JSON:

json
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "choices": [{"message": {"role": "assistant", "content": "The James Webb Space Telescope works by..."}, "index": 0, "finish_reason": "stop"}],
  "usage": {"prompt_tokens": 10, "completion_tokens": 50, "total_tokens": 60}
}
Streaming Response

SSE response with OpenAI-compatible chunks:

text
data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":"Based on"},"index":0}]}

data: {"id":"chatcmpl-...","object":"chat.completion.chunk","choices":[{"delta":{"content":" recent research"},"index":0}]}

data: [DONE]
Streaming Tags by Mode
Single-Search (with enable_citations=true)
TagPurpose
<citation>Inline citation references
<usage>JSON cost/billing data
Research Mode
TagPurposeKeep?
<queries>Generated search queriesDebug
<analyzing>URL counts (verbose)Debug
<thinking>URL selection reasoningDebug
<progress>Stats: time, iterations, queries, URLs analyzed, tokensMonitor
<blindspots>Knowledge gaps identifiedYes
<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
Usage Tag Format

The <usage> tag contains JSON-stringified cost and token data:

text
<usage>{"X-Request-Requests":1,"X-Request-Queries":8,"X-Request-Tokens-In":15000,"X-Request-Tokens-Out":2000,"X-Request-Requests-Cost":0.005,"X-Request-Queries-Cost":0.032,"X-Request-Tokens-In-Cost":0.075,"X-Request-Tokens-Out-Cost":0.01,"X-Request-Total-Cost":0.122}</usage>

Use Cases

  • Chat interface integration: Drop-in OpenAI SDK replacement with web-grounded answers. Set base_url="https://api.search.brave.com/res/v1".
  • Deep research / comprehensive topic research: Use research mode (enable_research=true) for complex questions needing multi-source synthesis (e.g., "Compare approaches to nuclear fusion").
  • OpenAI SDK drop-in: Same SDK, same streaming format — just change base_url and api_key. Works with both sync and async clients.
  • Cited answers: Enable enable_citations=true in single-search mode for inline citation tags, or use research mode which automatically includes citations in its answer.

Notes

  • Timeout: Set client timeout to at least 30s for single-search, 300s (5 min) for research
  • Single message: The messages array must contain exactly 1 user message
  • Cost monitoring: Parse the <usage> tag from streaming responses to track costs

© brave, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/answers of brave/brave-search-skills.

Open the folder on GitHubat commit 62793e0

Compare with similar skills

Brave Answers API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Brave Answers API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Brave Answers API this skillbrave/brave-search-skills183—~2.3kAutomated safety check: PassMIT
Dingo VerifyMigoXLab/dingo757—~833Automated safety check: PassApache-2.0
Venice Responsesveniceai/skills144—~3.7kAutomated safety check: PassMIT
Venice Chatveniceai/skills144—~5.9kAutomated safety check: PassMIT
Bmad Deep Recondelorenj/mcp-server-trello445—~2.3kAutomated safety check: PassMIT
Deep Researchjuanandresgs/claude-ctrl193—~3.1kAutomated safety check: NotesNone

Similar skills

  • Dingo Verify

    MigoXLab/dingo

    A skill your agent uses when the user wants to fact-check an article or verify factual claims in a document.

    757 GitHub stars~833 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Venice Responses

    veniceai/skills

    Use Venice's Alpha POST /responses endpoint - an OpenAI-compatible, stateless Responses API with typed output blocks (reasoning, message, functioncall, websearchcall).

    144 GitHub stars~3.7k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed
  • Venice Chat

    veniceai/skills

    Call POST /chat/completions on Venice. An agent skill from veniceai/skills.

    144 GitHub stars~5.9k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check passed
  • Bmad Deep Recon

    delorenj/mcp-server-trello

    Decision-grade research, three ways: draft a deep-research prompt for the user to run in their own tool (ChatGPT, Gemini, Grok, Perplexity, …), process a finished research report — file it, distill…

    445 GitHub stars~2.3k tokensUpdated 17 days ago
    Research & ScienceAuto-check passed
  • Deep Research

    juanandresgs/claude-ctrl

    Multi-model deep research with comparative assessment (OpenAI + Perplexity + Gemini).

    193 GitHub stars~3.1k tokensUpdated 2 mo ago
    Research & ScienceAuto-check: notes
  • Deep Research

    glebis/claude-skills

    This skill should be used when conducting comprehensive research on any topic using the OpenAI Deep Research API.

    391 GitHub stars~2.6k tokensUpdated 2 days ago
    Research & ScienceAuto-check: notes

More from brave/brave-search-skills

All 11 skills in this repo
  • Brave Image Search

    brave/brave-search-skills

    Searches images through the Brave Search API and returns titles, source pages, thumbnails and original image URLs, with a SafeSearch filter and up to 200 results.

    183 GitHub stars~1.4k tokensUpdated 17 days ago
    Auto-check passed
  • Brave LLM Context API

    brave/brave-search-skills

    Documents Brave's LLM Context API, which returns pre-extracted, ranked web page content for grounding agent and RAG answers, with GET and POST calls and Goggles filters.

    183 GitHub stars~3.3k tokensUpdated 17 days ago
    Auto-check passed
  • Brave Local Place Descriptions

    brave/brave-search-skills

    Fetches AI-written text descriptions for local places from the Brave Search API, using place IDs returned by an earlier local search.

    183 GitHub stars~1k tokensUpdated 17 days ago
    Auto-check passed
  • Brave Local Place Search

    brave/brave-search-skills

    Looks up businesses, points of interest, addresses and streets through the Brave Search place endpoint, returning contact details, ratings and hours in one call.

    183 GitHub stars~3.4k tokensUpdated 17 days ago
    Auto-check passed
  • Brave Local POI Details

    brave/brave-search-skills

    Looks up full details for local businesses and places, including ratings, hours and contact information, from Brave Search API point-of-interest IDs.

    183 GitHub stars~1.9k tokensUpdated 17 days ago
    Auto-check passed
  • News Search

    brave/brave-search-skills

    A skill your agent uses FOR news search. An agent skill from brave/brave-search-skills.

    183 GitHub stars~2k tokensUpdated 17 days ago
    Auto-check passed

Questions about Brave Answers API

What does Brave Answers API do?

Calls the Brave Search Answers endpoint for AI-grounded, cited answers, either a fast single-search reply or a slower multi-search deep research run. The skill documents Brave's OpenAI-compatible chat completions endpoint, which also works with the OpenAI SDK when its base URL points at Brave. A request carries exactly one user message and authenticates with an X-Subscription-Token header or a bearer token.

When should I use Brave Answers API?

Brave Answers API fits situations like: getting a fast cited answer from live web search inside an app; running a deeper multi-search research request with progress streaming; switching an OpenAI SDK client over to Brave's endpoint.

How do I install Brave Answers API in Claude Code?

Run `npx skills add brave/brave-search-skills --skill answers -a claude-code`. Or copy the skill folder (skills/answers in brave/brave-search-skills) into .claude/skills/answers in your project. Claude Code loads it when a task matches its description.

How do I install Brave Answers API in Codex?

Run `npx skills add brave/brave-search-skills --skill answers -a codex`. Or copy the skill folder (skills/answers in brave/brave-search-skills) into .agents/skills/answers in your project. Codex loads it when a task matches its description.

Can I use Brave Answers API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add brave/brave-search-skills --skill answers -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/answers, .gemini/skills/answers, .github/skills/answers and .opencode/skills/answers in your project.

What does Brave Answers API need to run?

Going by SKILL.md and its folder, Brave Answers API needs the command-line tools its instructions call (curl) and credentials named API_KEY and BRAVE_SEARCH_API_KEY. Our summary lists: A Brave Search API key on the Answers plan.

Does Brave Answers API access the network?

SKILL.md names 2 domains. In commands or code: api.search.brave.com; the agent is likely to contact it when it follows the instructions. As links in the text: api-dashboard.search.brave.com. This is read from the text; nothing was executed.

Is Brave Answers API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Brave Answers API use?

Brave Answers API is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Brave Answers API use?

About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Brave Answers API?

Skills that share tags, products or a category with Brave Answers API: Dingo Verify (MigoXLab/dingo, 757 stars), Venice Responses (veniceai/skills, 144 stars), Venice Chat (veniceai/skills, 144 stars) and Bmad Deep Recon (delorenj/mcp-server-trello, 445 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Brave Answers API?

brave (a GitHub organization) maintains it in brave/brave-search-skills, which has 183 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on September 23, 2026.

Source: brave/brave-search-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.