Skip to content
AnswerWell geo Documentation

Research · 6 min read · Answerwell

Search API Authentication, Plans, LLM Context, and Answers

How to authenticate, pick Search vs Answers vs LLM Context, call endpoints, and respect Brave Search API limits and terms.

This page summarizes Brave Search API documentation for developers who need programmatic web search or AI-grounded answers without routing queries through Google or Bing. The same independent index that powers Brave Search is exposed through REST endpoints on base URL https://api.search.brave.com/res, with separate prepaid plans for classic search, grounded answers, autosuggest, and spellcheck.

Brave Search API plans: which plan fits your product

Section titled “Brave Search API plans: which plan fits your product”

Brave Search API is organized by capability, not by a single “do everything” SKU. Pick the plan that matches the HTTP surface you will call.

Plan Typical use Documented capacity Indicative pricing (from docs)
Search Web, news, image, video search; LLM Context for RAG 50 requests per second $5.00 per 1,000 requests
Answers OpenAI-compatible chat completions grounded on search 2 requests per second (Answers API default) $4.00 per 1,000 queries plus token fees
Autosuggest Query completion as users type 100 requests per second $5.00 per 10,000 requests
Spellcheck “Did you mean?” style correction 100 requests per second $5.00 per 10,000 requests

The Help & Feedback page states that the Search plan covers web, news, image, and video search with local enrichments and LLM context for agents, while the Answers plan adds AI-powered answers grounded on one or more searches. Autosuggest and Spellcheck are separate plans for autocomplete and spelling correction.

Each activated plan includes $5 in free credits per month (roughly 1,000 Search-plan queries at published rates). There is no standalone free plan, but you can activate with $0 prepay and a card check to use monthly free credits only—see Help & Feedback. Prepaid balance at $0 pauses the API until you add funds or auto-reload triggers.

X-Subscription-Token: how to authenticate API requests

Section titled “X-Subscription-Token: how to authenticate API requests”

Every Brave Search API request must include an API key in the X-Subscription-Token HTTP header unless you use agent micropayments (stablecoin via x402—no API key in that flow). Authentication describes the full flow.

The Brave Search API uses API key authentication to secure requests. Every API request must include an API key in the request header to authenticate and authorize access.

— Brave, Authentication

All requests to the Brave Search API must include an API key in the X-Subscription-Token HTTP header.

— Brave, Authentication

  1. Create an account in the Brave Search API dashboard and verify your email (Quickstart).
  2. Activate a plan on the Plans page and add payment details (Quickstart).
  3. Open API Keys in the dashboard, create a key, and copy the token (Authentication).
  4. Store the token in environment variables or a secrets manager—never in client-side code or public repos (Authentication).

LLM Context vs Answers: grounded search for agents

Section titled “LLM Context vs Answers: grounded search for agents”

Brave documents complementary AI paths. The choice is whether you want raw grounding text for your own model or a finished answer from Brave’s stack.

LLM Context (/v1/llm/context): web content for RAG and agents

Section titled “LLM Context (/v1/llm/context): web content for RAG and agents”

LLM Context returns pre-extracted web content optimized for LLM grounding and RAG pipelines. It is available on GET and POST at https://api.search.brave.com/res/v1/llm/context, with POST useful when query parameters exceed URL limits.

Pre-extracted web content optimized for AI agents, LLM grounding, and RAG pipelines. Use this API to get the context for your LLM or AI agent.

— Brave, LLM Context API reference

For local queries (coffee shops, businesses), pass location headers such as X-Loc-Lat, X-Loc-Long, or place-name headers, or set enable_local=true (LLM Context service doc). POST bodies can include maximum_number_of_tokens (example: 8192) per POST reference.

Answers API (/v1/chat/completions): OpenAI-compatible grounded answers

Section titled “Answers API (/v1/chat/completions): OpenAI-compatible grounded answers”

The Answers API exposes a single OpenAI-compatible endpoint:

Answers uses a single, OpenAI-compatible endpoint: https://api.search.brave.com/res/v1/chat/completions

— Brave, Answers

Brave AI Answers API provides state-of-the-art AI-generated answers backed by verifiable sources from the web. This technology improves the accuracy, relevance, and trustworthiness of AI responses by grounding them in real-time search results.

— Brave, Answers

Use model="brave", standard messages, and either stream=false for blocking replies or stream=true for token streams (Answers API reference). Advanced options passed via extra_body include country, language, enable_citations, and enable_research; citations and research mode require stream=true (Answers).

Practical split: build your own prompt and model loop → Search plan + LLM Context. Ship an end-user Q&A widget with minimal glue code → Answers plan + chat completions.

Web search and vertical endpoints: when to call what

Section titled “Web search and vertical endpoints: when to call what”

Beyond AI surfaces, the Search plan covers indexed web, news, images, videos, local places, and rich real-time cards.

Need Method Endpoint doc
Ranked web results with snippets GET/POST Web Search (/v1/web/search)
News with extra excerpts GET/POST News Search
Images (default 50, max 200 per request) GET Image Search
Videos GET/POST Video Search
Nearby POIs GET Place Search (/v1/local/place_search)
Weather/stocks-style cards Two-step Web search with enable_rich_callback=1, then Rich Search
Query operators (filetype:, lang:) In q Search Operators

Web Search supports country, search_lang, pagination (count max 20, offset max 9), and extra_snippets=true for up to five extra excerpts per result. Image search defaults to strict safe search and includes proxied thumbnail URLs for privacy (Image Search).

Local workflows often chain APIs: web search returns temporary location id values, then Local POIs or POI descriptions enrich listings. POI IDs expire in about eight hours—do not treat them as persistent keys (Place Search).

Rate limits, versioning, and compliance mistakes

Section titled “Rate limits, versioning, and compliance mistakes”

Documented defaults differ by product:

Client-side debouncing (150–300 ms) is recommended for Autosuggest and Spellcheck to avoid burning credits (Autosuggest, Spellcheck).

Lock behavior with header Api-Version: YYYY-MM-DD; omitting it uses the latest version (Versioning). Backwards-incompatible changes are tied to dated versions; adding optional parameters or JSON fields is considered compatible.

Help & Feedback states:

It is prohibited to retain any and all data received through the Brave Search API. If you need to store the results or train an LLM, please reach out to our team at searchapi-support@brave.com.

— Brave, Help & Feedback

The Terms of Use also forbid storing or caching Search Results beyond transient operational storage, redistributing results, and using Search Results to train or benchmark models (section 3(b)). Customers remain responsible for end-user privacy notices and lawful use of third-party page content (Terms of Use, Privacy Notice).

Common mistakes

  • Calling Answers endpoints on a Search-only plan (or vice versa).
  • Enabling enable_citations or enable_research without stream=true.
  • Persisting POI id values or building a search-results database.
  • Embedding the API key in browser-side autosuggest code.
  1. Confirm your dashboard plan matches the endpoint you call (Pricing, Help & Feedback).
  2. Send a test request with X-Subscription-Token and verify HTTP 200 using the Playground or the Quickstart LLM Context example.
  3. For Answers, POST to chat completions with model="brave" and compare streaming vs non-streaming behavior.
  4. Review remaining credits and usage limits in the dashboard (Help & Feedback).
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page disagrees with the linked Brave documentation, email yimasynthetic@gmail.com with the page URL and the exact statement you believe is wrong so it can be corrected.