---
title: "How to Get a Brave Search API Key (2026 Guide)"
description: "Brave Search API key requires setting up a dashboard account and selecting a plan. You'll be able to get your key and integrate it into your project."
url: https://www.activepieces.com/blog/how-to-get-a-brave-search-api-key-2026-guide
updated: 2026-12-05
---

> Every page on www.activepieces.com is available as markdown: add `.md` to the URL, or send `Accept: text/markdown`. Site index: https://www.activepieces.com/llms.txt

# How to Get a Brave Search API Key (2026 Guide)

By Priscilla Nakabuye · December 5, 2026 · 15 min read · Filed under [Automation tutorials](https://www.activepieces.com/blog/category/automation-tutorials)

**Summary**

Get a Brave Search API key by creating an account in the API dashboard, choosing a plan, adding payment if required, then generating the key.

- Autosuggest and Spellcheck support 100 requests per second, Answers supports 2 requests per second.
- Stolen Gemini API key cost $82,314.44, student key cost $55,444.78 in unauthorized charges.

You'll get a [Brave](https://brave.com/blog/search-api-growth/) Search API key by creating an account in Brave's API dashboard and choosing a plan.

Add a card if that plan asks for one, then generate a key on the API keys page, which you can later paste into a workflow tool such as [Activepieces](https://www.activepieces.com) when you're ready to use it.

A Brave Search API key is a secret token, generated in Brave's API dashboard, that you send with each request to authenticate it to the Brave Search API and tie it to your plan's rate limit and monthly quota.

The Brave Search API is Brave's paid and free web search service, which **returns results from Brave's own index as JSON** for your code to consume. This matches Brave's [documentation](https://api-dashboard.search.brave.com/app/documentation) as of 5 Dec 2026, and the dashboard layout may have changed since.

## Create your Brave Search API key

### Create the account and pick a plan

Treat the plan choice as the first rollout decision. The plan sets your rate limit and monthly quota, and a prototype that starts on the wrong tier is usually the first thing to fail when a second team begins calling it.

Read the plan descriptions on the dashboard before you click, and note which plan you chose so everyone who inherits the key knows what it may do.

From sign-up to a usable key, the path is short, and the order matters: the dashboard only lets you create a key once you attach a plan to the account. The sequence below shows it.

![Creating a project variable](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/0070bd2b-a8f0-401a-a7a8-18a2da6f6633/self-host-mistral-ai-enterprise-deployment-guide-4dc19d0b.webp)

1. Create a Brave Search API account in the API dashboard.
2. Choose a plan on the plans page.
3. Enter a card if the plan you chose requires one.
4. Open the API keys page.
5. Create a key and copy it immediately.

### Copy your Brave Search API subscription token

Copy it straight into an environment variable or a secrets manager rather than a chat thread or a shared document, because every place the key lands is a place it can leak from.

![One key surrounded by outlines of copies on chat, document and note](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/0da5c898-d8ce-4e0e-89f2-02efd1689321/how-to-get-a-brave-search-api-key-2026-guide-ill-7b39d1ee.webp)

Brave calls the credential a subscription token, and your requests send it in the `X-Subscription-Token` header.

If you'd rather skip the code, [Activepieces](https://www.activepieces.com), whose core is MIT-licensed, holds the same token as a connection. You paste it once and it isn't scattered across scripts.

### Check what the free plan covers

Read the plan selection screen rather than assuming, because it shows whether even the free plan needs a card.

Open the plan details and look for three things: the requests allowed per second, the total allowed per month, and which endpoints the plan includes. Those three settings decide how many people and automations can share one key before requests start returning 429 errors.

Write the limits down next to the key's name. A key whose limits nobody recorded tends to turn into an outage nobody can explain.

## Test a Brave Search API request

To prove the key and plan work before anything else depends on them, send a GET to Brave's web search endpoint with your key in the `X-Subscription-Token` header and your query in the `q` parameter.

![A terminal window showing a curl command with a header line holding the X-Subscription-Token and a q parameter, beside a…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/19e12810-cecb-431c-beaa-72c6573a779f/how-to-get-a-brave-search-api-key-2026-guide-ill-1f8ca9f3.webp)

Export the key first so it never appears in your shell history or your code:

```bash
export BRAVE_API_KEY="your-key-here"

curl -s "https://api.search.brave.com/res/v1/web/search" \
 -H "Accept: application/json" \
 -H "X-Subscription-Token: $BRAVE_API_KEY" \
 --get --data-urlencode "q=open source vector databases"
```

`--data-urlencode` encodes spaces and special characters in the query for you. If this returns JSON, the key is valid and the plan is active. If it returns an error body, read it before changing anything, because it usually names the cause.

### Make a Brave Search API request in Python

```python
import os
import requests

response = requests.get(
 "https://api.search.brave.com/res/v1/web/search",
 headers={
 "Accept": "application/json",
 "X-Subscription-Token": os.environ,
 },
 params={"q": "open source vector databases"},
 timeout=10,
)
response.raise_for_status()
data = response.json()
```

If the variable is missing, reading the key with `os.environ[...]` makes the script fail loudly. Otherwise it'd send an empty header and return a confusing authentication error.

`raise_for_status()` surfaces a rejected key or a rate-limit response as an exception, which is the hook you'll build 429 handling on later.

Add the documented optional parameters, such as `count`, `country`, `search_lang` and `freshness`, to the same `params` dictionary, but only once the bare query works, so any failure points at the one thing you changed.

![Activepieces workflow builder showing a Send HTTP request step configured with Google Search RapidAPI credentials.](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/da977bec-9b3b-44ea-89dc-d64f009a35fe/opus-clip-integration-how-to-set-it-up-2026-guid-8ea5333c.webp)

### Read the Brave Search API response

Under `web.results` you'll find the organic hits, and each entry carries a `title`, a `url` and a `description`. That's enough to feed a result list or hand snippets to a model.

Check for the `web` key before indexing into it, since a query with no matches may not include it.

Whatever tool sends it, a first call should look like the one below: the request with its authorization header recorded as input, and a 200 status with an OK status text as output. That pairing is what you want to see every time.

![A completed flow run showing trigger and step execution with HTTP request details and success status](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/bf7801a3-7dea-4788-a83a-1d3dde0fbc59/what-actually-transfers-when-you-migrate-off-aut-3c5ad478.webp)

## Check Brave Search API pricing and limits

on [Brave's pricing page](https://api-dashboard.search.brave.com/documentation/pricing) the Autosuggest and Spellcheck plans run at 100 requests per second and Answers at 2. Each plan sets its own price and monthly credit, so check them before you budget.

### Endpoints included in each plan

A key on one plan isn't a licence for the others. Brave sells access plan by plan, and the plans line up with the endpoints: Search, Answers, Autosuggest and Spellcheck.

A pilot team that tests Search and then adds a spellcheck step in week three is buying a second plan, not flipping a flag.

List every endpoint your workflow calls before you pick a plan, and match each one to its own line on the pricing page.

### Price per 1,000 requests and monthly quota

At the pilot stage and again at full rollout, when volume has grown severalfold and the per-1,000 price dominates, two numbers set your cost: the price per 1,000 requests and the monthly credit each plan carries.

Treat anything you read here as dated 5 Dec 2026 and verify before budgeting, because Brave can change both. Multiply expected monthly calls by the per-1,000 price, then subtract the credit, and you have a defensible number for a steering committee.

### Requests per second and the rate limit headers

Between plans, **per-second capacity differs more than price does**. The chart on the pricing page, "Brave API plans differ widely in per-second capacity", shows this:

| Plan | Requests per second |
|---|---|
| Autosuggest | 100 |
| Spellcheck | 100 |
| Answers | 2 |

At 100 per second, Autosuggest and Spellcheck leave room for per-keystroke calls from many users at once.

Answers at 2 per second means a third concurrent request in the same second will likely be refused, so any batch job or parallel agent on that plan needs a queue.

The chart doesn't cover every plan. Search is absent, so read its per-second limit from your own dashboard rather than assuming it matches one of these rows.

Log Brave's rate limit headers from the first test call. They report your limit and how much of it remains, and they show how close each team is to its ceiling before a 429 arrives.

They also give your retry logic a number to wait on instead of a guess.

Copy the exact header names from Brave's documentation.

## Troubleshoot Brave Search API errors

**Four status codes cover nearly every failure** a Brave Search integration hits in production. Each one points to a different owner: the person holding the key, the person who chose the plan, the developer who built the request, or the traffic itself.

Before anyone opens the logs, the table below lets you route an alert to the right person. It shows what each code means, the cause that usually sits behind it, and the fix.

| Status | Meaning | Usual production cause | Fix |
|---|---|---|---|
| 401 | The token was missing or not recognised | Key not loaded in the deployed environment, or a key copied from the wrong account | Send the token in the header the docs specify and confirm it matches the dashboard |
| 403 | The token is valid but not allowed this request | The plan doesn't include the endpoint being called | Check the endpoint against your plan in the dashboard, then change plan or endpoint |
| 422 | The request was understood but its parameters were rejected | Malformed or unsupported parameter values, often from user input passed straight through | Validate parameters against the docs before sending |
| 429, per-second limit | Too many requests in a short window | A burst from parallel workers or a retry loop | Back off using the reset headers, then spread requests out |
| 429, exhausted quota | The plan's allowance for the period is used up | Growth in traffic, or a runaway job | Top up credit or change plan; retrying will not help |

I'm ready to add the consequences to your sentences, but I don't see any content to work with yet. The last two are conditions your code must live with.

### 401 and 403: wrong key or wrong plan

When you get a 401, Brave doesn't accept the token. Start with the boring checks: the variable is set in the deployed environment, no stray whitespace or quotes came along, and the key belongs to the account you're looking at in the dashboard.

If a key works locally and fails after release, staging and production have usually drifted onto different accounts.

A 403 is a different conversation. The key is real, but the plan behind it doesn't cover what you asked for. Compare the endpoint in your code with what your plan lists, and fix it there rather than by generating new keys, which changes nothing.

![Person with a working key at the wrong door, spare keys at feet](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/f733e961-1772-4571-b4ac-f8cd30137b20/how-to-get-a-brave-search-api-key-2026-guide-ill-532b7168.webp)

A 422 belongs with these: read the response body, correct the parameter, and add validation upstream so one bad user input can't become a recurring error.

### 429: per-second limit versus monthly quota

Both come back as 429, so your code must tell them apart, because the right reaction is opposite.

A per-second limit clears in moments, so wait and retry. An exhausted quota stays exhausted until the period resets or credit is added, so retrying only burns time and floods your logs.

Read the rate-limit headers on the response, which report your limit, what remains and when it resets.

If the remaining allowance for the period is spent, stop calling and alert a human. If only the short window is full, pause until the reset the headers give.

### Retry and cache Brave Search API requests

Back off on the reset header rather than a guessed delay, since the header tells you exactly when capacity returns. Add jitter so parallel workers don't wake together and trigger the same 429 again. Cap the retry count, and fail visibly once it's reached.

Most per-second errors never happen if you queue. Route every search through one queue with a worker pace set below your plan's limit, so bursts wait in line instead of colliding. That also gives you a single place to pause when quota runs out.

Cache repeated queries where Brave's terms permit it; read the terms before storing results, since they govern how long and for what purpose. Where caching is allowed, it cuts both quota use and latency for the questions users ask most.

Activepieces lists a Brave Search integration among its 751 integrations, counted from an MIT-licensed open source monorepo, so the key goes in once as a connection and a search step runs without code.

Describe the search process in its built-in chat and what it publishes is an ordinary flow in your account, the same kind you'd build by hand, and the run trace on that flow records exactly what happened on each call, including any 429.

## Secure your Brave Search API key

Keep the key out of source code, public repos and browsers from the first commit, because a leaked key creates spend you don't intend. The incidents reported in [The Register](https://www.theregister.com/security/2026/03/03/dev-stunned-by-82k-gemini-api-key-bill-after-theft/4925029) involve other providers, and they show the pattern.

![What leaked API keys have cost in reported incidents](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/9dc5bc93-632b-4571-997a-0afc5d4dffeb/how-to-get-a-brave-search-api-key-2026-guide-str-884c92b8.svg "Source: The Register (2026)")

**$82,314.44 came from a stolen Gemini key**, and a student key reached $55,444.78, meaning unauthorized API access in both cases went undetected long enough to generate five-figure charges. A startup bill hit $35,000, and one overnight bill reached $18,391.78.

Even an old client key cost $4,368, so forgotten keys still count. **The lesson is that any metered key someone else can use becomes your invoice.**

Four rules cover most of the risk:

- Load the key from an environment variable or a secrets manager, never from a string in code.
- Never ship it client-side or commit it to a public repo.
- Route browser traffic through a server-side proxy you control.
- Issue one key per environment, so a leaked test key can't touch production.

### Environment variables and secret stores

Read the key at startup from the process environment, and keep local `.env` files in `.gitignore` before the first commit. In shared or production setups, use your platform's secrets manager so the key is injected at deploy time and access is logged.

With separate keys for development, staging and production, a contractor's laptop never holds anything that can drain production quota.

Anything in a browser bundle is readable by every visitor. Put a small endpoint on your server that accepts the user's query, adds the key and calls Brave.

This also gives you a place to enforce per-user limits and caching, so one noisy client can't spend your per-second rate limit.

### Rotate and revoke after a leak

If a key appears in a commit, log or screenshot, treat it as compromised. Create a replacement in the Brave dashboard, deploy it, then revoke the old key; check the dashboard for which of those actions your plan offers.

**Purging git history doesn't un-leak a key** that was already public.

Afterward, review usage for spikes you didn't cause. The overnight bill above is what a missed spike looks like, so check usage daily for the first week after a rotation.

## Use the Brave Search API key in Activepieces without code

Keep the key in one place and rotation and daily usage checks get easier. In [Activepieces](https://www.activepieces.com/blog/brave-search-api-pricing-plans-limits-cost-2026) you paste the Brave Search key once as the integration's connection, and every flow that searches reuses it.

A run costs 1 credit however many steps it has, and the free plan includes 1,000 credits a month and unlimited flows, so sharing one connection across flows adds no cost of its own.

That starts in the flow builder's Select Step panel. Type a word into its search field, narrow by All, Core or App Actions, and the matching integrations appear with their actions.

![Activepieces flow builder showing a piece selector panel with spreadsheet app options filtered by search term "sheet"](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/04948e09-900a-4544-98d6-20b39b03d6fb/self-host-deepseek-r1-for-private-automation-202-1b88673a.webp)

The screenshot shows it filtered on "sheet", and typing "brave" instead brings up the search integration.

I'm ready to add the missing clauses that explain what numbers MEAN for readers.

![The Activepieces Select Step panel, which searches its 751 integrations, filtered on "sheet", beside a flow with an Every Hour trigger, an Ask ChatGPT action and an End node](activepieces-select-step.png)

Sign up in Brave's API dashboard and choose a plan before you build anything. The plan sets your per-second rate limit and your quota, and a flow that loops over a list will reach both sooner than an hourly trigger ever does.

On a schedule, nobody is watching the run, so teams that automate that way tend to hit the ceiling first.

Create the subscription token in the dashboard and copy it once. Paste it into the connection field when the Brave Search integration asks for it, not into a step's text input or a flow description.

> On a schedule, nobody is watching the run, so teams that automate that way tend to hit the ceiling first.

Both would put the key in every copy of the flow, and templates would carry it along.

With a single connection, a rotation means editing one record, and every flow picks up the new key.

Read the dashboard's plan page for what the free plan allows, in both rate and quota. Activepieces doesn't raise those limits; a flow that fires searches faster than the plan allows will get 429 responses just as a script would.

Keep loops short, space out the searches, and treat a failed run as a signal to slow down rather than to retry at once.

With the connection saved, add the Brave Search integration to a flow, choose its search action, and enter a query. Run the step, then reference its output in the next one.

![An HTTP request step configuration in a workflow builder showing authentication headers and URL for Google Search API via…](https://ap-marketing-media.fra1.cdn.digitaloceanspaces.com/uploads/3b426a13-fcc2-40a2-8a60-b6f4105b495f/automate-cloudflare-dns-waf-and-workers-2026-gui-d2ecc330.webp)

In the screenshot's flow, that next step would be Ask ChatGPT, which can summarize what came back.

Monday checklist:

1. Confirm the plan, its per-second rate and its quota in the dashboard.
2. Check that the key exists only in the connection, not in any step or note.
3. Run one search flow and read the output.
4. Space out any loop so it stays under the rate limit.
5. Put a daily usage check on the calendar for the first week.

## Related reading

- [Brave Search API MCP Server: Setup Guide (2026)](https://www.activepieces.com/blog/brave-search-api-mcp-server-setup-guide-2026)
- [Brave Search API Workflow: Integration Guide (2026)](https://www.activepieces.com/blog/brave-search-api-workflow-integration-guide-2026)
- [Brave Search API Pricing: Plans, Limits, Cost (2026)](https://www.activepieces.com/blog/brave-search-api-pricing-plans-limits-cost-2026)

## References

- [The Register](https://www.theregister.com/security/2026/03/03/dev-stunned-by-82k-gemini-api-key-bill-after-theft/4925029)
- [Brave Search API](https://api-dashboard.search.brave.com/documentation/pricing)
