Skip to content
Talk to an Engineer Dashboard

Brave Search

Connect to Brave Search to run privacy-first web, news, and local searches, retrieve AI summaries, get LLM grounding context, and use search-backed chat completions.

Connect to Brave Search to run privacy-first web, news, image, video, and local searches; retrieve AI-generated summaries and entity data; get LLM-optimized context for grounding; and use OpenAI-compatible chat completions backed by real-time search results.

Brave Search logo

Supports authentication: API Key

What you can build with this connector
Use caseTools involved
Real-time web researchbrave_web_search → feed results into LLM context
News monitoringbrave_news_search with freshness: pd → summarise headlines
LLM groundingbrave_llm_context → pass structured snippets directly to your model
Search-augmented chatbrave_chat_completions with conversation history → cited AI answers
Local business lookupbrave_local_place_searchbrave_local_pois → display hours, ratings, address
AI summaries with follow-upsbrave_web_search (summary: true) → brave_summarizer_searchbrave_summarizer_followups

Key concepts:

  • Plan tiers: Free covers core search. Pro adds brave_llm_context and summarizer tools. AI plan adds brave_chat_completions. Data for AI plan adds local/POI tools.
  • Summarizer two-step: First call brave_web_search with summary: true to get a summarizer.key, then pass that key to brave_summarizer_* tools.
  • LLM context vs web search: brave_llm_context returns token-budgeted, snippet-optimised output specifically for grounding — prefer it over raw web search results when feeding an LLM.
  • Rate limits: Free plan allows 1 req/s. Paid plans scale to 20 req/s. Handle 429 errors with backoff.

Register your Brave Search API key with Scalekit so it can authenticate and proxy search requests on behalf of your users. Unlike OAuth connectors, Brave Search uses API key authentication — there is no redirect URI or OAuth flow.

  1. Get a Brave Search API key

    • Go to api.search.brave.com and sign in or create a free account.

    • In the left sidebar, click API Keys+ New Key. Give it a name (e.g., Agent Auth) and click Create.

    • Copy the key immediately — it is shown only once.

    Brave Search API dashboard showing API Keys page with existing keys and the New Key button

  2. Create a connection in Scalekit

    • In Scalekit dashboard, go to Agent AuthCreate Connection. Find Brave Search and click Create.

    • Note the Connection name — you will use this as connection_name in your code (e.g., brave-search).

    Scalekit connection configuration page for Brave Search showing the connection name and API Key authentication type

  3. Add a connected account

    Connected accounts link a specific user identifier in your system to a Brave Search API key. Add them via the dashboard for testing, or via the Scalekit API in production.

    Via dashboard (for testing)

    • Open the connection you created and click the Connected Accounts tab → Add account.

    • Fill in:

      • Your User’s ID — a unique identifier for this user in your system (e.g., user_123)
      • API Key — the Brave Search API key you copied in step 1
    • Click Save.

    Add connected account form for Brave Search in Scalekit dashboard showing User ID and API Key fields

    Via API (for production)

    await scalekit.actions.upsertConnectedAccount({
    connectionName: 'brave-search',
    identifier: 'user_123', // your user's unique ID
    credentials: { api_key: 'BSA...' },
    });

Once a connected account is set up, make search API calls through the Scalekit proxy. Scalekit injects the Brave Search API key automatically as the X-Subscription-Token header — you never handle credentials in your application code.

You can interact with Brave Search in two ways — via direct proxy API calls or via Scalekit optimized tool calls. Scroll down to see the list of available Scalekit tools.

Proxy API calls

import { ScalekitClient } from '@scalekit-sdk/node';
import 'dotenv/config';
const connectionName = 'brave-search'; // connection name from your Scalekit dashboard
const identifier = 'user_123'; // your user's unique identifier
// Get your credentials from app.scalekit.com → Developers → Settings → API Credentials
const scalekit = new ScalekitClient(
process.env.SCALEKIT_ENV_URL,
process.env.SCALEKIT_CLIENT_ID,
process.env.SCALEKIT_CLIENT_SECRET
);
const actions = scalekit.actions;
// Web search via Scalekit proxy — no API key needed here
const result = await actions.request({
connectionName,
identifier,
path: '/res/v1/web/search',
method: 'GET',
queryParams: { q: 'best open source LLM frameworks 2025', count: '5' },
});
console.log(result.data.web.results);

Scalekit tools

Use actions.execute_tool() to call Brave Search tools directly. Scalekit injects credentials automatically — your application code never handles the API key.

Search the web and retrieve real-time results. Works on all plans including Free.

examples/brave_web_search.py
import os
from scalekit.client import ScalekitClient
scalekit_client = ScalekitClient(
client_id=os.environ["SCALEKIT_CLIENT_ID"],
client_secret=os.environ["SCALEKIT_CLIENT_SECRET"],
env_url=os.environ["SCALEKIT_ENV_URL"],
)
# Ensure a connected account exists for this user before making tool calls
scalekit_client.actions.get_or_create_connected_account(
connection_name="brave-search",
identifier="user_123",
)
# Search for recent articles — freshness "pw" limits results to the past 7 days
result = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_web_search",
input={
"q": "open source LLM frameworks 2025",
"count": 5,
"freshness": "pw",
},
)
for item in result["web"]["results"]:
print(item["title"], item["url"])

Retrieve recent news articles by topic or keyword. Useful for monitoring a brand, topic, or competitor.

examples/brave_news_search.py
# Fetch the latest news on a topic from the past 24 hours
result = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_news_search",
input={
"q": "AI regulation Europe",
"count": 10,
"freshness": "pd", # pd = past 24 hours
},
)
for article in result["results"]:
print(article["title"], article["age"], article["url"])

LLM grounding context

Retrieve search results structured specifically for grounding LLM responses. Requires Pro plan. Use token_budget to stay within your model’s context window.

examples/brave_llm_context.py
# Get search context sized to fit a 4 000-token budget
result = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_llm_context",
input={
"q": "vector database comparison 2025",
"count": 5,
"token_budget": 4000,
},
)
# Pass the structured context directly to your LLM
grounding_context = result["context"]
print(grounding_context)

Get an AI-generated answer backed by real-time Brave Search results, using an OpenAI-compatible interface. Requires AI plan.

examples/brave_chat_completions.py
# Drop-in replacement for OpenAI /v1/chat/completions — results are grounded in live search
result = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_chat_completions",
input={
"messages": [
{"role": "user", "content": "What are the latest developments in quantum computing?"}
],
"model": "brave/serp-claude-3-5-haiku",
},
)
print(result["choices"][0]["message"]["content"])
# Each answer includes citations back to source URLs
for source in result.get("search_results", []):
print(source["title"], source["url"])

Local place search and POI details

Find nearby businesses or points of interest, then retrieve full details. Requires Data for AI plan.

examples/brave_local_search.py
# Step 1: Find coffee shops near San Francisco city centre
places = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_local_place_search",
input={
"q": "specialty coffee",
"location": "San Francisco, CA",
"count": 5,
},
)
location_ids = [p["id"] for p in places["results"]]
# Step 2: Fetch rich details (hours, ratings, address) for those locations
# Location IDs expire after ~8 hours — always fetch details in the same session
pois = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_local_pois",
input={"ids": location_ids},
)
for poi in pois["results"]:
print(poi["name"], poi["address"], poi["rating"])

AI summary with follow-up queries

Get an AI-generated summary for a search query, then surface follow-up questions. Requires Pro plan.

examples/brave_summarizer.py
# Step 1: Web search with summary: true to obtain a summarizer key
search_result = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_web_search",
input={
"q": "benefits of RAG vs fine-tuning for enterprise LLMs",
"summary": True,
"count": 5,
},
)
summarizer_key = search_result["summarizer"]["key"]
# Step 2: Retrieve the full AI summary using the key
summary = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_summarizer_search",
input={"key": summarizer_key, "entity_info": True},
)
print(summary["title"])
print(summary["summary"])
# Step 3: Get follow-up questions for a conversational search experience
followups = scalekit_client.actions.execute_tool(
connection_name="brave-search",
identifier="user_123",
tool_name="brave_summarizer_followups",
input={"key": summarizer_key},
)
for q in followups["queries"]:
print("-", q)

LangChain integration

Use Scalekit’s LangChain helper to load all Brave Search tools into a LangChain agent. The agent selects and calls the right tool automatically based on the user’s query.

examples/brave_langchain_agent.py
import os
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_anthropic import ChatAnthropic
from langchain_core.prompts import ChatPromptTemplate
from scalekit.client import ScalekitClient
scalekit_client = ScalekitClient(
client_id=os.environ["SCALEKIT_CLIENT_ID"],
client_secret=os.environ["SCALEKIT_CLIENT_SECRET"],
env_url=os.environ["SCALEKIT_ENV_URL"],
)
# Load all Brave Search tools — Scalekit handles auth for each call
tools = scalekit_client.actions.langchain.get_tools(
providers=["BRAVE_SEARCH"],
identifier="user_123",
)
llm = ChatAnthropic(
model="claude-sonnet-4-6",
api_key=os.environ["ANTHROPIC_API_KEY"],
)
prompt = ChatPromptTemplate.from_messages([
("system", "You are a helpful research assistant with access to Brave Search tools."),
("human", "{input}"),
("placeholder", "{agent_scratchpad}"),
])
agent = create_tool_calling_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
response = agent_executor.invoke({
"input": (
"Find the top 5 news articles about AI regulation in Europe from the past week "
"and give me a one-sentence summary of each."
)
})
print(response["output"])

The following tools are available when you connect a Brave Search account. Each tool maps to a Brave Search API endpoint. Required plan is noted per tool.

Search the web using Brave’s privacy-focused search engine. Returns real-time results including web pages, news, videos, images, and rich data. Supports filtering by country, language, recency, and custom re-ranking via Goggles.

Required plan: Free and above.

NameTypeRequiredDescription
qstringYesSearch query. Maximum 400 characters, 50 words.
countrystringNoCountry code (ISO 3166-1 alpha-2, e.g., US, GB, DE) to localise results.
search_langstringNoLanguage of search results (ISO 639-1, e.g., en, fr, de).
ui_langstringNoUI language for rendering result labels (e.g., en-US).
countintegerNoNumber of results per page (1–20, default 20).
offsetintegerNoPagination offset (0–9). Use with count to page through up to 200 results.
safesearchstringNoContent filter: off, moderate (default), or strict.
freshnessstringNoRecency filter: pd (24 h), pw (7 days), pm (31 days), py (1 year), or a date range YYYY-MM-DDtoYYYY-MM-DD.
text_decorationsbooleanNoInclude bold markers in result snippets for query-term highlighting.
spellcheckbooleanNoAutomatically spellcheck the query before searching.
goggles_idstringNoURL of a Goggles re-ranking file for custom result ordering.
unitsstringNoUnit system for unit-sensitive results: metric or imperial.
extra_snippetsbooleanNoReturn up to 5 additional snippets per result. Requires Pro plan.
summarybooleanNoRequest an AI summarizer key in the response for use with brave_summarizer_* tools. Requires Pro plan.

Search for recent news articles using Brave Search. Returns results with titles, URLs, snippets, publication dates, and source information. Supports filtering by country, language, and recency.

Required plan: Free and above.

NameTypeRequiredDescription
qstringYesNews search query.
countrystringNoCountry code (ISO 3166-1 alpha-2) to localise news results.
search_langstringNoLanguage of news results (ISO 639-1).
countintegerNoNumber of results (1–20, default 20).
offsetintegerNoPagination offset (0–4).
freshnessstringNoRecency filter: pd (24 h), pw (7 days), pm (31 days).
extra_snippetsbooleanNoReturn additional text snippets per result. Requires Pro plan.
goggles_idstringNoURL of a Goggles re-ranking file.
safesearchstringNoContent filter: off, moderate (default), or strict.
spellcheckbooleanNoAutomatically spellcheck the query before searching.

Search for images using Brave Search. Returns image results with thumbnails, source URLs, dimensions, and metadata.

Required plan: Free and above.

NameTypeRequiredDescription
qstringYesImage search query.
countrystringNoCountry code (ISO 3166-1 alpha-2) to localise results.
search_langstringNoLanguage filter (ISO 639-1).
countintegerNoNumber of image results to return (1–3 per API call).
safesearchstringNoContent filter: off, moderate (default), or strict.
spellcheckbooleanNoAutomatically spellcheck the query before searching.

Search for videos using Brave Search. Returns results with titles, URLs, thumbnails, durations, and publisher metadata.

Required plan: Free and above.

NameTypeRequiredDescription
qstringYesVideo search query.
countrystringNoCountry code (ISO 3166-1 alpha-2) to localise results.
search_langstringNoLanguage filter (ISO 639-1).
countintegerNoNumber of results (1–20, default 20).
offsetintegerNoPagination offset (0–9).
freshnessstringNoRecency filter: pd, pw, pm, or a date range.
safesearchstringNoContent filter: off, moderate (default), or strict.
spellcheckbooleanNoAutomatically spellcheck the query before searching.

Get autocomplete search suggestions from Brave Search for a given query prefix. Useful for query completion, exploring related search terms, and building search UIs.

Required plan: Free and above.

NameTypeRequiredDescription
qstringYesQuery prefix to get autocomplete suggestions for.
countrystringNoCountry code (ISO 3166-1 alpha-2) to localise suggestions.
countintegerNoNumber of suggestions to return (1–20, default 5).

Check and correct spelling of a query using Brave Search’s spellcheck engine. Returns suggested corrections for misspelled queries.

Required plan: Free and above.

NameTypeRequiredDescription
qstringYesThe query to spellcheck.
countrystringNoCountry code (ISO 3166-1 alpha-2) to apply locale-aware corrections.

Retrieve real-time web search results structured as grounding context for LLMs. Returns curated snippets, source URLs, titles, and metadata specifically formatted to maximise contextual relevance for AI-generated answers. Supports fine-grained token and snippet budgets to control context size.

Required plan: Pro and above.

NameTypeRequiredDescription
qstringYesSearch query to retrieve grounding context for.
countintegerNoNumber of web results to include (1–20, default 5).
token_budgetintegerNoMaximum total tokens for the returned context. Use to fit within your LLM’s context window.
snippet_budgetintegerNoMaximum number of snippets to include across all results.
countrystringNoCountry code (ISO 3166-1 alpha-2) to localise results.
search_langstringNoLanguage filter (ISO 639-1).
freshnessstringNoRecency filter: pd, pw, pm, py, or date range.
safesearchstringNoContent filter: off, moderate (default), or strict.

Get AI-generated answers grounded in real-time Brave Search results using an OpenAI-compatible chat completions interface. Returns summarised, cited answers with source references and token usage statistics. Drop-in replacement for OpenAI /v1/chat/completions for search-augmented generation.

Required plan: AI plan.

NameTypeRequiredDescription
messagesarrayYesConversation history in OpenAI format: [{"role": "user", "content": "..."}]. Supported roles: system, user, assistant.
modelstringNoModel identifier (e.g., brave/serp-claude-3-5-haiku). Defaults to the plan’s included model.
streambooleanNoStream the response using server-sent events (SSE). Default false.
countrystringNoCountry code (ISO 3166-1 alpha-2) to localise the underlying search.
search_langstringNoLanguage filter for the underlying search (ISO 639-1).
safesearchstringNoContent filter applied to the underlying search: off, moderate, or strict.
freshnessstringNoRecency filter for the underlying search results.

Search 200M+ Points of Interest (POIs) by geographic centre and radius. Supports searching by coordinates or location name with an optional keyword query. Returns location IDs that you can use with brave_local_pois and brave_local_descriptions to get full details.

Required plan: Data for AI plan.

NameTypeRequiredDescription
qstringNoKeyword to filter POIs (e.g., coffee shop, hospital).
latnumberNoLatitude of the search centre (–90 to 90). Use with lon instead of location.
lonnumberNoLongitude of the search centre (–180 to 180). Use with lat instead of location.
locationstringNoHuman-readable location name (e.g., San Francisco, CA). Alternative to lat/lon.
radiusintegerNoSearch radius in metres from the centre point.
countintegerNoNumber of POI results to return (1–20, default 5).

Fetch detailed Point of Interest data for up to 20 location IDs returned by brave_local_place_search. Returns rich local business data including address, phone, opening hours, ratings, and reviews.

Required plan: Data for AI plan.

NameTypeRequiredDescription
idsarrayYesList of location IDs from a brave_local_place_search response (maximum 20 IDs per call).

Fetch AI-generated descriptions for locations using IDs from a brave_local_place_search response. Returns natural language summaries describing the place, its atmosphere, and what visitors can expect.

Required plan: Data for AI plan.

NameTypeRequiredDescription
idsarrayYesList of location IDs from a brave_local_place_search response (maximum 20 IDs per call).

Retrieve a full AI-generated summary for a summarizer key obtained from a brave_web_search response (requires summary: true on the web search call). Returns the complete summary with title, content, enrichments, follow-up queries, and entity details.

Required plan: Pro and above.

NameTypeRequiredDescription
keystringYesSummarizer key from the summarizer.key field of a brave_web_search response.
entity_infobooleanNoInclude entity metadata (people, places, organisations) referenced in the summary.
rawbooleanNoReturn unformatted (raw) summary text without inline citation markers.

Fetch only the complete AI-generated summary content for a summarizer key. Use when you only need the summary text without enrichments or follow-up data.

Required plan: Pro and above.

NameTypeRequiredDescription
keystringYesSummarizer key from a brave_web_search response.

Fetch enrichment data for a Brave AI summary key. Returns associated images, Q&A pairs, entity details, and source references that accompany the summary.

Required plan: Pro and above.

NameTypeRequiredDescription
keystringYesSummarizer key from a brave_web_search response.

Fetch suggested follow-up queries for a Brave AI summary key. Useful for building conversational search flows and helping users explore related topics.

Required plan: Pro and above.

NameTypeRequiredDescription
keystringYesSummarizer key from a brave_web_search response.

Fetch detailed entity metadata for a specific entity mentioned in a Brave AI summary. Returns structured information about people, places, organisations, and concepts referenced in the summary.

Required plan: Pro and above.

NameTypeRequiredDescription
keystringYesSummarizer key from a brave_web_search response.
entitystringYesName of the entity to retrieve details for (must be present in the summary).

Fetch only the title component of a Brave AI summary. Use when you need a short heading for the summary without loading the full content.

Required plan: Pro and above.

NameTypeRequiredDescription
keystringYesSummarizer key from a brave_web_search response.