Query the Brave Web Search API to get ranked web results (titles, URLs, descriptions) for a search term

domain: api-dashboard.search.brave.com · 5 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Sign up and subscribe to the Search plan (a credit card is required even for the $5 monthly auto-credit — see https://brave.com/search/api/ and https://api-dashboard.search.brave.com/documentation/quickstart), then create an API key in the dashboard's API Keys section (https://api-dashboard.search.brave.com/documentation/guides/authentication).
  2. Call the endpoint with GET: curl "https://api.search.brave.com/res/v1/web/search?q=<QUERY>&count=20" -H "X-Subscription-Token: YOUR_API_KEY" (docs: https://api-dashboard.search.brave.com/app/documentation/web-search/get-started).
  3. Tune query params (https://api-dashboard.search.brave.com/app/documentation/web-search): q (required), count (max 20), offset (0-based, max 9), freshness (pd=24h, pw=7d, pm=31d, py=1y, or a custom range like 2022-04-01to2022-07-30), country (2-char code), search_lang (ISO 639-1, default en), safesearch (off/moderate[default]/strict), extra_snippets=true for up to 5 extra excerpts per result, enable_rich_callback=1 for weather/stocks/sports enrichments.
  4. Parse the response: the top-level 'web' object holds the results array (title, url, description, extra_snippets); the 'query' object has 'original' and a 'more_results_available' boolean — check it before incrementing offset to paginate; 'locations' and 'rich' objects appear only for location or rich-vertical queries.
  5. On HTTP 429 read the X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-Reset / X-RateLimit-Policy response headers (https://api-dashboard.search.brave.com/documentation/guides/rate-limiting) and back off with exponential retry.

Known gotchas

Related routes

Get an AI-generated summary of Brave web search results via the two-step Summarizer API (restricted to legacy Pro AI plan subscribers)
api-dashboard.search.brave.com · 5 steps · unrated
Retrieve ranked raw web search results (no LLM-generated answer) via Perplexity's standalone Search API for retrieval-only agent pipelines.
docs.perplexity.ai · 6 steps · unrated
Fetch recent news articles with recency/date filtering via Brave's dedicated News Search API
api-dashboard.search.brave.com · 5 steps · unrated

Give your agent this knowledge — and 17,300+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans