Service APIs
State-of-the-art AI-powered search that generates comprehensive answers and summaries from web search results
Overview
Brave Summarizer Search API leverages advanced AI to provide intelligent summaries and answers based on real-time web search results. Our “AI Answers” feature goes beyond traditional search by understanding your query, gathering relevant information from across the web, and synthesizing it into clear, comprehensive responses with citations.
Access to Summarizer is available through the Pro AI plan. Subscribe to Pro AI to unlock these advanced features.
Key Features
AI-Generated Answers
Get comprehensive, AI-synthesized answers to your questions with citations
Modular Output
Access answers through various specialized endpoints for different use cases
Entity Enrichment
Get detailed information about entities mentioned in summaries
Inline Citations
Answers include inline references to source materials
API Reference
Summarizer API Documentation
View the complete API reference, including endpoints, parameters, and example requests
Use Cases
Summarizer Search is perfect for:
- AI Assistants: Build intelligent chat interfaces with web-grounded answers
- Research Tools: Quickly synthesize information from multiple sources
- Question Answering: Provide direct answers to user questions
- Content Summarization: Generate summaries of web content on any topic
- Knowledge Applications: Create applications that need factual, cited information
Available Endpoints
The Summarizer API provides multiple specialized endpoints:
# Main endpoints
https://api.search.brave.com/res/v1/web/search
https://api.search.brave.com/res/v1/summarizer/search
https://api.search.brave.com/res/v1/summarizer/summary
https://api.search.brave.com/res/v1/summarizer/summary_streaming
# Specialized endpoints
https://api.search.brave.com/res/v1/summarizer/title
https://api.search.brave.com/res/v1/summarizer/enrichments
https://api.search.brave.com/res/v1/summarizer/followups
https://api.search.brave.com/res/v1/summarizer/entity_infoLooking for the OpenAI-compatible endpoint? Check out AI
Grounding for direct AI answers using the /res/v1/chat/completions endpoint with OpenAI SDK compatibility.
How Summarizer Works
The Traditional Flow (Web Search + Summarizer)
This method gives you full control over the search results and summary generation:
Step 1: Web Search with Summary Flag
First, make a web search request with the summary=1 parameter:
curl "https://api.search.brave.com/res/v1/web/search?q=what+is+the+second+highest+mountain&summary=1" \
-H "X-Subscription-Token: <YOUR_API_KEY>"Step 2: Extract the Summarizer Key
If the query is eligible for summarization, the response includes a summarizer object with a key:
{
"summarizer": {
"type": "summarizer",
"key": "{\"query\": \"what is the second highest mountain\", \"country\": \"us\", \"language\": \"en\", \"safesearch\": \"moderate\", \"results_hash\": \"a51e129180225a2f4fe1a00984bcbf58f0ae0625c97723aae43c2c6e3440715b}"
}
}Treat the key as an opaque string. The format may change in the future, so always pass it as-is without parsing.
Step 3: Fetch the Summary
Use the key to retrieve the complete summary:
curl "https://api.search.brave.com/res/v1/summarizer/search?key=<URL_ENCODED_KEY>&entity_info=1" \
-H "X-Subscription-Token: <YOUR_API_KEY>"Summarizer requests are not billed - only the initial web search request counts toward your plan limits.
Advanced Features
Inline References
Get inline citations within the summary text:
curl "https://api.search.brave.com/res/v1/summarizer/search?key=<KEY>&inline_references=true" \
-H "Accept: application/json" \
-H "X-Subscription-Token: <YOUR_API_KEY>"Including inline_references=true query parameter will add reference markers throughout the summary text,
allowing users to see which sources support each statement.
Entity Information
Retrieve detailed information about entities mentioned in the summary:
curl "https://api.search.brave.com/res/v1/summarizer/search?key=<KEY>&entity_info=1" \
-H "Accept: application/json" \
-H "X-Subscription-Token: <YOUR_API_KEY>"The response includes descriptions, images, and metadata about key entities.
Complete Python Example
Here’s a full example demonstrating the traditional flow:
import asyncio
import json
from urllib.parse import urljoin
from aiohttp import ClientSession, ClientTimeout, TCPConnector
from aiolimiter import AsyncLimiter
# Configuration
API_KEY = "your_api_key"
API_HOST = "https://api.search.brave.com"
API_RATE_LIMIT = AsyncLimiter(1, 1)
API_PATH = {
"web": urljoin(API_HOST, "res/v1/web/search"),
"summarizer_search": urljoin(API_HOST, "res/v1/summarizer/search"),
}
API_HEADERS = {
"web": {"X-Subscription-Token": API_KEY},
"summarizer": {"X-Subscription-Token": API_KEY},
}
async def get_summary(session: ClientSession) -> None:
# Step 1: Get web search results with summary flag
async with session.get(
API_PATH["web"],
params={"q": "what is the second highest mountain", "summary": 1},
headers=API_HEADERS["web"],
) as response:
data = await response.json()
if response.status != 200:
print("Error fetching web results")
return
# Step 2: Extract summary key
summary_key = data.get("summarizer", {}).get("key")
if not summary_key:
print("No summary available for this query")
return
# Step 3: Fetch the summary
async with session.get(
url=API_PATH["summarizer_search"],
params={"key": summary_key, "entity_info": 1},
headers=API_HEADERS["summarizer"],
) as response:
summary_data = await response.json()
print(json.dumps(summary_data, indent=2))
async def main():
async with API_RATE_LIMIT:
async with ClientSession(
connector=TCPConnector(limit=1),
timeout=ClientTimeout(20),
) as session:
await get_summary(session=session)
asyncio.run(main())Response Structure
Summarizer responses include:
- status: Current status (
completeorfailed) - title: A title for the summary
- summary: The main summary content with text and entities
- enrichments: Additional data including:
- Raw text summary
- Related images
- Q&A pairs
- Entity details
- Source references
- followups: Suggested follow-up queries
- entities_info: Detailed entity information (when requested)
Best Practices
Caching
- Summary results are cached for a limited time
- After cache expiration, restart the flow with a new web search
Error Handling
- Check if
summarizer.keyexists in web search response - Handle
failedstatus in summarizer response - Implement retry logic for transient failures
Rate Limiting
- Only web search requests count toward rate limits
- Summarizer endpoint calls are free
- Implement rate limiting on your end to avoid throttling
Specialized Endpoints
The API provides additional endpoints for specific use cases:
- /summarizer/summary: Get just the summary without full search results
- /summarizer/summary_streaming: Stream the summary in real-time
- /summarizer/title: Fetch only the summary title
- /summarizer/enrichments: Get enrichment data separately
- /summarizer/followups: Retrieve follow-up question suggestions
- /summarizer/entity_info: Fetch entity information independently
These endpoints all use the same key parameter obtained from the initial web search.
Summarizer Search vs AI Grounding
Brave offers two complementary approaches for AI-powered search:
Summarizer Search
Two-step workflow that first retrieves search results, then generates summaries. Best when you need control over search results or want to use specialized summarizer endpoints.
AI Grounding
Direct AI answers using OpenAI-compatible endpoint. Best for building chat interfaces and applications that need instant, grounded AI responses.
When to use Summarizer Search:
- Need access to underlying search results
- Want to use specialized endpoints (title, enrichments, followups, etc.)
- Building applications with custom search result processing
- Prefer the traditional web search + summarization flow
When to use AI Grounding:
- Building conversational AI applications
- Need OpenAI SDK compatibility
- Want simple, single-endpoint integration
- Require research mode for thorough answers
Learn more about AI Grounding.
Changelog
This changelog outlines all significant changes to the Brave Summarizer Search API in chronological order.
2025-06-13
- Add inline references to summarizer answers via
inline_references=truequery parameter - Available on
/res/v1/summarizer/searchand/res/v1/summarizer/summaryendpoints
2024-04-23
- Launch “AI Answers” resource
- Replaces previous Summarizer API with enhanced capabilities
2023-08-25
- Initial Brave Summarizer Search API release (now deprecated)