Brave Search API Key: Get One and Make Your First Search

Sign up on the Brave Search API page, choose a plan and create a key in the API dashboard. Send it in the X-Subscription-Token header to https://api.search.brave.com/res/v1/web/search with your query in the q parameter. As of October 2026, Search costs $5 per 1,000 requests and includes $5 of free credit each month.

Brave Search API plans, as of October 2026 (brave.com/search/api)
SearchAnswersEnterprise
Price$5 per 1,000 requests$4 per 1,000 requests plus $5 per million input/output tokensContact Brave
Free credit$5 every month$5 every monthNot listed
Rate limit50 queries per second2 queries per secondNot listed

Updated

Build a request below: type a query, choose how many results and the safe search level, and copy a curl command or a fetch snippet. The key field is never filled in for you; paste your own in place of the placeholder on your server.

Request builder

Search query: best bakery website ideas. Results (1 to 20): 10. Safe search: Moderate (default).

curl

curl "https://api.search.brave.com/res/v1/web/search?q=best+bakery+website+ideas&count=10&safesearch=moderate" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"

fetch (server side)

const res = await fetch("https://api.search.brave.com/res/v1/web/search?q=best+bakery+website+ideas&count=10&safesearch=moderate", {
  headers: { "X-Subscription-Token": process.env.BRAVE_SEARCH_API_KEY },
});
const data = await res.json();
console.log(data.web.results);

Monthly cost on the Search plan

Requests per month: 3000

About $10.00 after the monthly free credit, at the October 2026 rate.

Give an agent a search tool

A small function an agent can call. It keeps the key on the server and returns only what the agent needs.

webSearch tool function

Register this with your agent framework as a tool that takes a query string.

export async function webSearch(query) {
  const url = new URL("https://api.search.brave.com/res/v1/web/search");
  url.searchParams.set("q", query);
  url.searchParams.set("count", "5");
  const res = await fetch(url, {
    headers: { "X-Subscription-Token": process.env.BRAVE_SEARCH_API_KEY },
  });
  if (!res.ok) throw new Error("Search failed: " + res.status);
  const data = await res.json();
  return (data.web?.results ?? []).map((r) => ({
    title: r.title,
    url: r.url,
    description: r.description,
  }));
}

Endpoints you will see in the docs

Web search lives at /res/v1/web/search. Images, videos and news have their own paths under /res/v1/, and an LLM context endpoint at /res/v1/llm/context returns text shaped for language models.

All of them use the same key and header, so one key covers each endpoint your plan includes.

How it works

  1. Open the Brave Search API page and select Get API key to reach the API dashboard.
  2. Pick a plan. Brave's documentation does not spell out every screen, so follow the dashboard's own prompts for billing and keys.
  3. Copy the key and store it as an environment variable on your server, never in front-end code.
  4. Call the web search endpoint with the key in the X-Subscription-Token header and read web.results from the JSON reply.

Tips

Frequently asked questions

Is the Brave Search API free?

Not unlimited. As of October 2026, the Search plan bills $5 per 1,000 requests and includes $5 in free credits every month, so light use can cost nothing.

Which header carries the key?

X-Subscription-Token. Brave's examples send it as a request header on every call; there is no key in the URL.

Can an AI agent use Brave Search as its web search tool?

Yes. Wrap the request in a function your agent framework can call, return the titles, links and descriptions, and let the agent pick what to read. Brave also offers an LLM context endpoint built for this.

What is the Answers plan?

Answers returns written answers instead of a list of links. It is priced per 1,000 requests plus per million tokens and has a lower rate limit of 2 queries per second.

Can I call the API from my website's front end?

You should not, because visitors could read the key in the page code. Call it from your server or a serverless function and send only the results to the browser.

Related: What is an API key, Build an AI agent, What is an MCP server, Webhook vs API.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap