Skip to content
Petra Vlk

Dec 3, 202614 min read

Get a key from Brave's API dashboard, send a GET request with the X-Subscription-Token header, and parse the JSON that comes back, whether you do that in a script or in a workflow tool like Activepieces.

Plan on about fifteen minutes, and treat any step that runs much longer as a sign that the key or the header's wrong.

Because the Brave Search API is a hosted HTTP service that returns search results from Brave's own independent index as JSON, your code gets structured data instead of a page to scrape.

Your first Brave Search API workflow

Brave Search API quick start in four steps

  1. Create an account and generate an API key in the dashboard.
  2. Send one GET request to the web search endpoint with the key in the X-Subscription-Token header.
  3. Read the web.results array in the response and pull out the title, URL and description of each result.
  4. Add handling for rate limits, so you retry or skip a refused request instead of dropping it silently.

A short three-step checklist card beside a laptop showing an API dashboard with a key, with arrows from the key to a GET…

Stop after step three and you have a working search.

What the API is and which endpoints exist

You will be calling https://api.search.brave.com/res/v1/web/search, the web search endpoint this workflow uses, with your query in the q parameter. Brave also documents separate endpoints for other result types, such as news, images and videos, plus suggestions and spellcheck.

A web search endpoint drawn as a server box with a URL strip above it, a small query parameter q card slotting into the…

If a Brave endpoint you need has no ready-made connector in your automation tool, the same request shape still applies.

Activepieces counts 751 integrations in its open source monorepo, roughly 60% of them community-contributed, and you can generate a missing one with AI and add it privately to your own instance without waiting on a vendor release, so you won't need custom integration work for common tools.

Brave Search API documentation version and date

As of 3 December 2026, the endpoint, header name and response structure described here match Brave's API documentation. Rate limits and plan terms are the details most likely to change after that date.

This takes minutes, not a project: automate it in Activepieces free.

Brave Search account, plan and API key

Register in Brave's API dashboard, choose a plan from the pricing page, add payment details if the plan asks for them, and create a key under API Keys.

Choose a plan from Brave's pricing page

Brave Search API free tier history

In May 2023, the free allowance was 2,000 queries a month.

Brave Search API free monthly allowance, before and after the change

By August 2025 it had risen to 5,000 queries a month.

Then in February 2026 the allowance fell to 1,000 queries a month. Anything built around the 5,000 figure lost four-fifths of its budget overnight.

A script that made 200 calls a day was fine before the cut. After it, that script runs dry in five days and every call after that fails until the month turns over.

Expect to enter payment details even if you never intend to spend: the same Implicator report frames the change as a move to metered billing for all developers.

Brave Search API pricing details to record

Open the pricing page and copy four things for the plan you pick: its name, its price, the number of included queries, and the per-second rate limit. Write them in your project notes with the date you read them.

A pricing page on paper beside a project notes sheet with four filled lines for plan name, price, included queries and…

Don't look only at the monthly count. A plan with plenty of queries but a low per-second ceiling will still reject a loop that fires requests back to back.

Generate and store the key

With the plan active, open API Keys in the dashboard and create a new key. Give it a name that says what it's for, such as the project or environment, so you can revoke one key without guessing which application it fed.

A plan with plenty of queries but a low per-second ceiling will still reject a loop that fires requests back to back.

Copy the key straight into a secrets store or an environment variable the moment Brave shows it to you. Don't paste it into source code, a shared document or a chat message.

Your first Brave Search request and response

Send a GET to Brave's web search endpoint with your key in a header and a query in q, and JSON comes back with the results you want under web.results.

The curl request, field by field

curl -s "https://api.search.brave.com/res/v1/web/search?q=brave+search+api" \
 -H "Accept: application/json" \
 -H "X-Subscription-Token: YOUR_API_KEY"

In the URL, the endpoint plus q is all you need, since q is the only required parameter.

X-Subscription-Token carries your key, and a missing or wrong value gets you an error response instead of results, so a rejected first call is almost always this header.

To ask for JSON explicitly, send Accept: application/json.

Reading web.results in the Brave Search response

Open the response and you'll find an object with several top-level keys, and web.results is an array of result objects. Each carries a title, a url, and a description snippet, which together are enough for a first parser.

Check before you read them: many results also include an age field and a meta_url object with the source's hostname, so treat both as optional. A parser that assumes every field is present will fail on the first sparse result.

Brave Search API parameters to set first

Set count to control how many results come back per request, and use offset to page through further results. Both have documented maximums, so read the limits there before building pagination.

country takes a two-letter country code and search_lang a language code. Set both, or results drift toward defaults you didn't choose.

If results are shown to users, safesearch matters. It accepts off, moderate or strict. freshness restricts results by age, using shorthand values for the past day, week, month or year, or a date range. Use it when stale pages would make your output wrong.

Activepieces pricing page with four subscription tiers showing features and costs

Your repeatable Brave Search API workflow

Once your plan covers the endpoint, wrap the one working request in a scheduled job that writes parsed results somewhere you'll actually look. Three routes get you there, and they differ less in capability than in what happens when the job breaks.

Route Setup effort Who maintains it Failure visibility
Cron script Low if you already have a server; you write the request, the parsing and the output You, including the machine it runs on None by default; a failed run leaves nothing unless you add logging or an alert
No-code tool (Activepieces) Low; you assemble steps in a visual editor You for the flow, the vendor for the platform A run history shows each step and its error
AI agent or app Moderate; you define the tool and the instructions You, plus whoever owns the agent framework Uneven; a failed call can surface as a confident answer with no results behind it

Option A: script on a scheduler

Take the request from Step 2, loop over web.results, and append each title, URL and description to a file or database. Run it from cron or any scheduler you already trust.

Write the HTTP status to a log on every run, and send yourself a message when the status isn't a success.

Send search results to your sheet

Build the flow in four steps, in this order. A schedule trigger set to the interval you want comes first.

Next is an HTTP GET step to the search endpoint, with your API key in the request header, then a loop over web.results from the response. A Google Sheets or Slack step comes last and writes one row or one message per result.

Option C: calling it from an AI agent or app

Here the search call becomes a tool the agent decides to use. That suits ad hoc questions, but it's a poor fit for a job that must run on a schedule and leave a record.

If you take this route, log the raw response outside the model so you can tell a failed call from a thin answer.

You can follow the rest of this with the builder open. Start free, no card.

Brave Search API limits, errors and fixes

When Brave refuses a request, it's one of three codes: 401 or 403 for a key or plan problem, 422 for bad parameters, and 429 for too many requests. Each has a different fix, and only the last should trigger a retry.

Status What it means Likely cause Fix
401 / 403 Request not accepted as authenticated or permitted Missing or mistyped key header, or a key whose plan excludes the endpoint Resend the key in the X-Subscription-Token header; confirm the plan covers the endpoint
422 Request understood but parameters rejected Value out of range or malformed Compare each parameter with the docs; don't retry unchanged
429 Limit reached Too many requests per second, or monthly quota spent Read X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; wait until reset, then retry

401, 403 and 422: key, plan and parameter problems

When you get a 401, the first request usually never worked: the key is absent, truncated or in the wrong header. A 403 points at the plan, so check that the key was issued for the product you're calling.

A 422 means the request reached Brave and failed validation. Fix the query string rather than the key, and treat any value you pass through from user input as suspect.

429: rate limit versus monthly quota

Check which product you're calling first, because per-second rates differ by product, according to Brave's pricing page. Autosuggest allows 100 requests per second, and Spellcheck allows 100, so a typing-driven feature rarely trips either.

Requests per second allowed by Brave API plans

Search allows 50, which is plenty for a scheduled job but not for an unthrottled fan-out.

Answers allows 2, so a loop of ten calls with no pause will be refused within the first second. That's a 50-fold gap between the highest and lowest, and a queue tuned for one product will fail on another.

Read the reset header and sleep until it says the window reopens. A 429 that persists after the reset's passed suggests the monthly quota's spent, which no backoff will cure.

Brave Search API result caps and usage terms

Page deep enough and nothing new comes back, because Brave sets a maximum for the count parameter and a cap on offset; check both numbers in the docs for your plan.

Whether you may store results, and for how long, depends on your plan's terms, so read them before you build a database on the output.

What Activepieces does about this

The article's weak point is the last step: the first request works, then the job fails quietly weeks later. Activepieces is built around that gap.

You assemble the four parts as a flow: a schedule trigger, an HTTP GET step carrying your X-Subscription-Token header, a loop over web.results, and a Google Sheets or Slack step that writes each result.

Activepieces workflow builder showing a Send HTTP request step configured with Google Search RapidAPI credentials.

The run history records every execution, step by step, with the status and error each step returned.

A 401 from a mistyped header, a 422 from a bad parameter and a 429 from a spent quota are each visible as a failed step, not as an empty sheet.

For rate limits, put a delay step between calls inside the loop.

That keeps a fan-out under the per-second ceiling you copied from Brave's pricing page, such as the 2 requests per second the article gives for Answers, any faster and you get throttled, which means your throughput ceiling is effectively 2 operations per second.

Then check the reset header from the response before deciding whether to retry. Activepieces won't know your plan's limits for you, so the figures in your project notes still decide the pacing.

Activepieces is open source under the MIT licence, so you can self-host it and keep your Brave key and your results on your own infrastructure. That matters if your plan's storage terms restrict where results may live.

Its monorepo counts 751 integrations, roughly 60% of them community-contributed, which means development is distributed across the community.

If the step you need has no connector, the plain HTTP request from Step 2 still applies, and you can generate a missing integration with AI and add it privately to your own instance.

Activepieces workflow builder with the Send HTTP request step selected, showing its configuration panel with HTTP method…

Build the flow only after the single curl request works, and read the schedule's first unattended run in the history, not just the manual test.

Frequently asked questions

Because most open questions come down to plan terms, which Brave changes, each answer here ends the same way, with a pointer to Brave's pages. Five questions decide whether the workflow survives contact with your plan:

  • Is there a free tier today, and what does it include? Confirm on Brave's pages.
  • May you store results, and for how long? Confirm on Brave's pages.
  • What's the maximum count per endpoint? Confirm on Brave's pages.
  • Which other endpoints exist beyond web search, and are they on your plan? Confirm on Brave's pages.
  • Does your plan permit feeding results to an LLM? Confirm on Brave's pages.

Of those, the answers below take the ones that stop people most often.

The free plan

Is there a free Brave Search API plan in 2026? Brave's offered a free entry plan in the past, but plan names, quotas and eligibility have been revised, so a tutorial's description may be stale.

Open the pricing page, read what the entry plan includes and what it excludes, and treat that page as the answer. Confirm on Brave's pages.

Storing and caching results

Can I store or cache Brave Search results? That depends on your plan's terms, not on anything in the API response. Some plans restrict storage, and a cache is storage.

If your design keeps results in a database or reuses them across users, read the terms first. Confirm on Brave's pages.

Credit card requirements

Does the Brave Search API need a credit card? Signup requirements have varied by plan, and a free plan may still ask for a card to verify the account.

Check the signup flow itself instead of relying on a forum post. If you hit a card prompt, stop and read what it'll charge before you continue. Confirm on Brave's pages.

Paging through results

How do I get more than one page of results? Pair the count parameter with offset. Request a batch, then request again with the offset moved forward. Each call spends quota, so paging through ten pages costs ten requests.

Depth is limited too, since each endpoint caps count and offset at its own limits, and those caps decide how deep you can go. Confirm on Brave's pages.

Grounding an LLM

Can I use the Brave Search API to ground an LLM? Technically yes: you parse the results and pass the titles, URLs and snippets into a model's prompt.

Whether your plan allows that use is a separate question, and it's tied to the storage terms above. Brave also documents offerings aimed at AI use, which may suit you better than raw web search. Confirm on Brave's pages.

References

Share

Build it

Set this up in minutes.

No code required. Connect your accounts, and Activepieces runs it from there.

Start free Talk to sales