# Table of Contents - [Documentation - Brave Search API](#documentation-brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search API | Brave](#brave-search-api-brave) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) - [Brave Search - API](#brave-search-api) --- # Documentation - Brave Search API Overview Privacy-first search infrastructure for developers The Brave Search API gives you access to the same powerful, independent search index that powers Brave Search - the privacy-first search engine trusted by millions. Built from the ground up without relying on Google or Bing, our API delivers unbiased, high-quality search results for your applications. With comprehensive coverage across web search, news, images, videos, and advanced AI capabilities, the Brave Search API provides everything you need to build privacy-respecting search experiences. [Get started\ -----------\ \ Get your API key and make your first request in minutes.](https://api-dashboard.search.brave.com/documentation/quickstart) Search APIs ----------- Choose the right search API for your use case. [Web Search\ ----------\ \ Access billions of web pages with our core search API. Includes local results and rich content enhancements.](https://api-dashboard.search.brave.com/documentation/services/web-search) [News Search\ -----------\ \ Get real-time news articles from thousands of trusted sources worldwide.](https://api-dashboard.search.brave.com/documentation/services/news-search) [Image Search\ ------------\ \ Search through billions of images with advanced filtering and SafeSearch options.](https://api-dashboard.search.brave.com/documentation/services/image-search) [Videos Search\ -------------\ \ Find video content from across the web with metadata and thumbnails.](https://api-dashboard.search.brave.com/documentation/services/video-search) AI-Powered Features ------------------- Enhance your applications with advanced AI capabilities. [AI Summarizer\ -------------\ \ Get AI-generated summaries of search results to provide quick insights to your users.](https://api-dashboard.search.brave.com/documentation/services/summarizer) [Grounding\ ---------\ \ Ground your AI applications with real-time, accurate search data to reduce hallucinations.](https://api-dashboard.search.brave.com/documentation/services/grounding) Why Brave Search API? --------------------- Independent Index ----------------- Our own search index means no dependence on Big Tech and no hidden biases. Privacy-First ------------- Built with privacy at the core. No user tracking or profiling. High Quality ------------ Comprehensive coverage with billions of pages indexed and updated in real-time. Rich Results ------------ Enhanced results with local information, knowledge graphs, and structured data. Flexible Plans -------------- Scalable pricing from free tier to enterprise solutions. Fast & Reliable --------------- Best-in-class latencies and 99.9% uptime. Ready to get started? --------------------- [API Reference\ -------------\ \ Explore our complete API reference with interactive examples.](https://api-dashboard.search.brave.com/api-reference/web/search/get) --- # Brave Search - API Log in to your Brave Search API account. Email Password [Forgot your password?](https://api-dashboard.search.brave.com/forgot-password) Login Verifying you're a human being... Don't have an account? [Sign up](https://api-dashboard.search.brave.com/register) --- # Brave Search - API Getting started Get started with the Brave Search API in minutes Introduction ------------ This guide will walk you through everything you need to perform your first search using the Brave Search API. From creating your account to making your first API request, you’ll be up and running in just a few minutes. Prerequisites ------------- Before you begin, make sure you have: * A valid email address for account registration * A credit card for plan subscription (required also on free plans) * Basic familiarity with making HTTP requests Step 1: Create Your Account --------------------------- Go to [Brave Search API Dashboard](https://api-dashboard.search.brave.com/register) to create your account: 1. Enter your email address and create a secure password 2. Verify your email address by clicking the confirmation link sent to your inbox 3. Log in and you are ready for Step 2. Account creation is free and only takes a minute. Step 2: Subscribe to a Plan --------------------------- Once your account is created, you’ll need to subscribe to a plan to access the API: 1. Navigate to the [**Available plans**](https://api-dashboard.search.brave.com/app/subscriptions/subscribe) section in your dashboard 2. Review the available plans and select one that fits your needs 3. Enter your credit card information **Free Plan Available**: We offer a free tier that includes generous monthly query limits. While a credit card is required to prevent fraud and abuse, you won’t be charged unless you upgrade. ### Plan Options Our plans are designed to scale with your needs: * **Free**: Perfect for testing and small projects (credit card required for verification) * **Base**: Ideal for production applications with moderate traffic * **Pro**: For businesses with high-volume requirements * **Enterprise**: Custom solutions with dedicated support and capacities Step 3: Create an API Key ------------------------- After subscribing to a plan, generate your API key: 1. Go to the [**API Keys**](https://api-dashboard.search.brave.com/app/keys) section in your dashboard 2. Click on **Add API Key** 3. Give your key a descriptive name (e.g., “Production App” or “Development”) 4. Copy your API key and store it securely Your API key is confidential. Never share it publicly, commit it to version control, or expose it in client-side code. Treat it like a password. Step 4: Make Your First Search Request -------------------------------------- Now you’re ready to make your first search! The Brave Search API uses a simple REST architecture. All requests require your API key in the `X-Subscription-Token` header. ### Basic Web Search Here’s how to perform a basic web search: curl "https://api.search.brave.com/res/v1/web/search?q=artificial+intelligence" \ -H "X-Subscription-Token: YOUR_API_KEY" import requests url = "https://api.search.brave.com/res/v1/web/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } params = { "q": "artificial intelligence" } response = requests.get(url, headers=headers, params=params) results = response.json() # Print the first search result if results.get("web", {}).get("results"): first_result = results["web"]["results"][0] print(f"Title: {first_result['title']}") print(f"URL: {first_result['url']}") print(f"Description: {first_result['description']}") const url = new URL("https://api.search.brave.com/res/v1/web/search"); url.searchParams.append("q", "artificial intelligence"); const response = await fetch(url, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, }); const results = await response.json(); // Print the first search result if (results.web?.results?.length > 0) { const firstResult = results.web.results[0]; console.log(`Title: ${firstResult.title}`); console.log(`URL: ${firstResult.url}`); console.log(`Description: ${firstResult.description}`); } ### Understanding the Response A successful search returns a JSON object with various result types: { "type": "search", "query": { "original": "artificial intelligence" }, "web": { "results": [\ {\ "title": "Artificial Intelligence - Overview",\ "url": "https://example.com/ai",\ "description": "Learn about artificial intelligence...",\ "age": "2024-10-08T10:30:00.000Z"\ }\ ] } } Full documentation of responses at [API Reference](https://api-dashboard.search.brave.com/api-reference/web/search) page. ### Monitor Your Usage Keep track of your API usage in the dashboard to: * Stay within your plan limits * Optimize your query patterns * Plan for scaling needs Next Steps ---------- Congratulations! You’ve made your first search with the Brave Search API. Here’s what to explore next: [Authentication Guide\ --------------------\ \ Learn more about securing your API requests](https://api-dashboard.search.brave.com/documentation/guides/authentication) [API Reference\ -------------\ \ Explore all available endpoints and parameters](https://api-dashboard.search.brave.com/api-reference/web/search/get) [Rate Limiting\ -------------\ \ Understand rate limits and how to optimize requests](https://api-dashboard.search.brave.com/documentation/guides/rate-limiting) [API Versioning\ --------------\ \ Learn about API versions and backward compatibility](https://api-dashboard.search.brave.com/documentation/guides/versioning) Need Help? ---------- If you run into any issues or have questions: * Check our [API Documentation](https://api-dashboard.search.brave.com/api-reference/web/search) for detailed endpoint information * Review our [Security Guidelines](https://api-dashboard.search.brave.com/documentation/resources/security) for best practices * See the common questions and answers or contact our support team at [Help & Feedback](https://api-dashboard.search.brave.com/documentation/resources/help-feedback) page --- # Brave Search - API Basics Learn how to authenticate your requests to the Brave Search API using subscription tokens Overview -------- The Brave Search API uses API key authentication to secure requests. Every API request must include your subscription token in the request header to authenticate and authorize access. Your API key is confidential and should be kept secure. Never expose it in client-side code, public repositories, or any public location. Obtaining Your API Key ---------------------- To get started with the Brave Search API, you’ll need a subscription token: 1. **Subscribe to a plan** — Visit the [Brave Search API](https://api-dashboard.search.brave.com/app/subscriptions/subscribe) page and choose a plan that fits your needs 2. **Create an API key** — Once subscribed, navigate to the [API Keys section](https://api-dashboard.search.brave.com/app/keys) in your dashboard and create a new key 3. **Copy your token** — Your subscription token will be displayed. Copy it to use in your requests Even on the Free plan, you need to subscribe to obtain an API key. You won’t be charged for the free tier. Authentication Method --------------------- All requests to the Brave Search API must include your subscription token in the `X-Subscription-Token` HTTP header. ### Header Format X-Subscription-Token: YOUR_API_KEY Code Examples ------------- Here are examples of how to authenticate your search queries: curl "https://api.search.brave.com/res/v1/web/search?q=brave+search" \ -H "X-Subscription-Token: YOUR_API_KEY" import requests url = "https://api.search.brave.com/res/v1/web/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } params = { "q": "brave search" } response = requests.get(url, headers=headers, params=params) data = response.json() print(data) const url = new URL("https://api.search.brave.com/res/v1/web/search"); url.searchParams.append("q", "brave search"); const response = await fetch(url, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, }); const data = await response.json(); console.log(data); Best Practices -------------- ### Secure Storage Never hardcode your API key directly in your source code. Instead, use environment variables or secure configuration management: import os api_key = os.environ.get('BRAVE_API_KEY') headers = { 'X-Subscription-Token': api_key } const apiKey = process.env.BRAVE_API_KEY; const headers = { "X-Subscription-Token": apiKey, }; export BRAVE_API_KEY="your_actual_api_key_here" ### Key Rotation Regularly rotate your API keys as a security best practice. You can generate new and revoke old keys from the [dashboard](https://api-dashboard.search.brave.com/app/keys) . If you suspect your API key has been compromised, immediately revoke it from your dashboard and generate a new one. ### More To learn more about best practises, see [OWASP Cheat Sheet for Secrets Management](https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html) . Next Steps ---------- [API Overview\ ------------\ \ Learn about available endpoints and features](https://api-dashboard.search.brave.com/documentation) [API Reference\ -------------\ \ Explore detailed API documentation](https://api-dashboard.search.brave.com/api-reference/web/search/get) --- # Brave Search - API Getting started Explore the Brave Search API pricing plans and features $ 0.00 credit card required via Stripe * 1 request per second * 2,000 requests per month [Sign up](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=normal) * Web search * Goggles * News cluster * Videos cluster * Videos * News * Images * Schema-enriched Web results * Infobox * FAQ * Discussions * Locations * Extra alternate snippets for AI * Rights to use data for AI inference * Rights to store data $ 3.00 per 1,000 requests * 20 requests per second * 20,000,000 requests per month [Sign up](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=normal) * Web search * Goggles * News cluster * Videos cluster * Videos * News * Images * Schema-enriched Web results * Infobox * FAQ * Discussions * Locations * Extra alternate snippets for AI * Rights to use data for AI inference * Rights to store data $ 5.00 per 1,000 requests * 50 requests per second * Unlimited requests [Sign up](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=normal) * Web search * Goggles * News cluster * Videos cluster * Videos * News * Images * Schema-enriched Web results * Infobox * FAQ * Discussions * Locations * Extra alternate snippets for AI * Rights to use data for AI inference * Rights to store data [Looking for a custom plan?\ --------------------------\ \ Get a tailor-made solution by reaching out to us directly.](mailto:searchapi-support@brave.com) --- # Brave Search API | Brave Pricing ------- ##### Free AI $0 Get familiar with the API * 1 query/second * Up to 2,000 queries/month [See all Free plans](https://api-dashboard.search.brave.com/app/plans) ##### Base AI $5.00 per 1,000 requests * Up to 20 queries/second * Up to 20M queries/month * Rights to use in AI apps [See all Base plans](https://api-dashboard.search.brave.com/app/plans) ##### Pro AI $9.00 per 1,000 requests * Up to 50 queries/second * Unlimited queries/month * Rights to use in AI apps [See all Pro plans](https://api-dashboard.search.brave.com/app/plans) ##### Enterprise Custom Need higher limits? Reach out to inquire about bespoke enterprise solutions. [Contact us](https://form.asana.com/?k=HC0W0xLSL03oWYuxbZ_HvA&d=41575557782189) Build with the power of the web ------------------------------- Power agentic search Chatbots, coding assistants, and AI-search engines all need real-time data to reduce hallucinations and ground their responses with multiple sources. The Brave Search API excels in RAG pipelines, and it’s the leading search tool for applications that use Claude MCP. Train foundation models The open Web is a critical source of training data for today’s state-of-the-art AI models. With up to five snippets from over 30 billion pages, the Brave Search API is the best blend of scale, quality, and cost. Create search-enabled tools Build comprehensive company profiles in CRM platforms, gather citations for ed-tech apps, or fetch the latest news for a stock trading assistant. Thousands of teams rely on the Brave Search API to connect their apps to the Web. ![Power agentic search](https://api-dashboard.search.brave.com/static-assets/images/optimized/search/api/images/robot-arm.png) ![Train foundation models](https://api-dashboard.search.brave.com/static-assets/images/optimized/search/api/images/search-training.png) ![Create search-enabled tools](https://api-dashboard.search.brave.com/static-assets/images/optimized/search/api/images/search-tools.png) Trusted by industry leaders --------------------------- ![Axel Springer logo](https://api-dashboard.search.brave.com/search/api/images/companies/axel-springer.png) ![Chegg logo](https://api-dashboard.search.brave.com/search/api/images/companies/chegg.svg) ![Cohere logo](https://api-dashboard.search.brave.com/search/api/images/companies/cohere.svg) ![Ghostery logo](https://api-dashboard.search.brave.com/search/api/images/companies/ghostery.svg) ![Mistral AI logo](https://api-dashboard.search.brave.com/search/api/images/companies/mistral-ai.svg) ![Kagi logo](https://api-dashboard.search.brave.com/search/api/images/companies/kagi.svg) ![Together.ai logo](https://api-dashboard.search.brave.com/search/api/images/companies/together-ai.png) ![Sana logo](https://api-dashboard.search.brave.com/search/api/images/companies/sana.png) ![Venice logo](https://api-dashboard.search.brave.com/search/api/images/companies/venice.png) ![Turnitin logo](https://api-dashboard.search.brave.com/search/api/images/companies/turnitin.svg) ![You logo](https://api-dashboard.search.brave.com/search/api/images/companies/you.png) > The Brave Search API provides accurate search results for our academic citation services. It delivers high-quality data at a reasonable price, and with intuitive data structuring. Its speed and precision have been crucial. —Ben Tucker, SVP of Engineering, Chegg Key features ------------ * ### World-class quality In blinded testing, Brave Search performs on par with—or better than—incumbent search giants. * ### Specialized endpoints Adapt results with different specialized endpoints, including local, images, AI summaries, and more. * ### Comprehensive and fresh Brave’s index includes over 30 billion pages, kept fresh by over 100 million page updates every day. * ### Search Goggles Discard domains or re-rank results for better control of the response to your query via [the Brave Search Goggles feature](https://search.brave.com/help/goggles) . * ### Extra snippets Get up to five snippets picked in real time to maximize contextual relevance to a search. * ### Schema-enriched results Get additional formatted data for popular formats like movie reviews and wikis. Web AI Grounding Image Video News Suggest Spellcheck Web AI Grounding Image Video News Suggest Spellcheck Python cURL JavaScript GO 1#!/usr/bin/env python 2 3import requests 4 5print( 6 requests.get( 7 "https://api.search.brave.com/res/v1/web/search", 8 headers={ 9 "X-Subscription-Token": "", 10 }, 11 params={ 12 "q": "greek restaurants in san francisco", 13 "count": 20, 14 "country": "us", 15 "search_lang": "en", 16 }, 17 ).json() 18) 1curl -s --compressed "https://api.search.brave.com/res/v1/web/search?q=greek+restaurants+in+san+francisco" \ 2 -H "Accept: application/json" \ 3 -H "Accept-Encoding: gzip" \ 4 -H "X-Subscription-Token: " 1#!/usr/bin/env node 2 3fetch( 4 `https://api.search.brave.com/res/v1/web/search?${new URLSearchParams({ 5 q: "greek restaurants in san francisco", 6 count: 10, 7 country: "us", 8 search_lang: "en", 9 })}`, 10 { 11 headers: { 12 "X-Subscription-Token": "", 13 }, 14 }, 15) 16 .then((response) => response.json()) 17 .then((data) => console.log(data)); 1package main 2 3import ( 4 "fmt" 5 "io" 6 "net/http" 7 "net/url" 8) 9 10func main() { 11 u, _ := url.Parse("https://api.search.brave.com/res/v1/web/search") 12 q := u.Query() 13 q.Set("q", "greek restaurants in san francisco") 14 q.Set("count", "10") 15 q.Set("country", "us") 16 q.Set("search_lang", "en") 17 u.RawQuery = q.Encode() 18 19 req, _ := http.NewRequest("GET", u.String(), nil) 20 req.Header.Set("X-Subscription-Token", "") 21 22 resp, _ := http.DefaultClient.Do(req) 23 defer resp.Body.Close() 24 25 body, _ := io.ReadAll(resp.Body) 26 fmt.Println(string(body)) 27} JSON 1{ 2 "type": "search", 3 "web": { 4 "type": "search", 5 "results": [\ 6 {\ 7 "title": "THE 10 BEST Greek Restaurants in San Francisco (Updated 2025)",\ 8 "url": "https://www.tripadvisor.com/Restaurants-g60713-c23-San_Francisco_California.html",\ 9 "is_source_local": false,\ 10 "is_source_both": false,\ 11 "description": "Best Greek Restaurants in San Francisco, California: Find Tripadvisor traveller reviews of San Francisco Greek restaurants and search by price, location, and more.",\ 12 "profile": {\ 13 "name": "Tripadvisor",\ 14 "url": "https://www.tripadvisor.com/Restaurants-g60713-c23-San_Francisco_California.html",\ 15 "long_name": "tripadvisor.com",\ 16 "img": "https://imgs.search.brave.com/OEuNbeVBPVl2AlxDmpKDNcYk4RuERMK4gTlMyVzbpSw/rs:fit:32:32:1:0/g:ce/aHR0cDovL2Zhdmlj/b25zLnNlYXJjaC5i/cmF2ZS5jb20vaWNv/bnMvZjQ1MjliOWZi/NmMxZWRhYmY2MmYy/MmNjMmM0ZWM3MTA4/ZTUxM2E1M2JlMzgx/ODM0N2E2NzY5OTJk/YjQwNmNlNi93d3cu/dHJpcGFkdmlzb3Iu/Y29tLw"\ 17 }…\ \ Python cURL JavaScript GO\ \ 1from openai import OpenAI\ 2\ 3client = OpenAI(\ 4 api_key="",\ 5 base_url="https://api.search.brave.com/res/v1",\ 6)\ 7\ 8completions = client.chat.completions.create(\ 9 messages=[\ 10 {\ 11 "role": "user",\ 12 "content": "What is the second highest mountain?",\ 13 }\ 14 ],\ 15 model="brave",\ 16 stream=False,\ 17)\ 18\ 19print(completions.choices[0].message.content)\ \ 1curl -X POST -s --compressed "https://api.search.brave.com/res/v1/chat/completions" \\ 2 -H "accept: application/json" \\ 3 -H "Accept-Encoding: gzip" \\ 4 -H "Content-Type: application/json" \\ 5 -d '{"stream": "false", "messages": [{"role": "user", "content": "What is the second highest mountain?"}]}' \\ 6 -H "x-subscription-token: "\ \ 1import OpenAI from 'openai';\ 2\ 3const client = new OpenAI({\ 4 apiKey: process.env['BRAVE_SEARCH_API_KEY'], \ 5 baseURL: 'https://api.search.brave.com/res/v1',\ 6});\ 7\ 8(async () => {\ 9 const response = await client.chat.completions.create({\ 10 model: 'brave',\ 11 stream: false,\ 12 messages: [\ 13 { role: 'user', content: 'What is the second highest mountain?' },\ 14 ],\ 15 });\ 16\ 17 console.log(response.choices[0].message.content);\ 18})();\ \ 1package main\ 2\ 3import (\ 4 "context"\ 5 "fmt"\ 6\ 7 openai "github.com/openai/openai-go"\ 8 "github.com/openai/openai-go/option"\ 9)\ 10\ 11func main() {\ 12 client := openai.NewClient(\ 13 option.WithAPIKey("BRAVE_SEARCH_API_KEY"),\ 14 option.WithBaseURL("https://api.search.brave.com/res/v1"), \ 15 )\ 16\ 17 chatCompletion, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\ 18 Messages: []openai.ChatCompletionMessageParamUnion{\ 19 openai.UserMessage("What is the second highest mountain?"),\ 20 },\ 21 Model: "brave",\ 22 })\ 23\ 24 if err != nil {\ 25 panic(err.Error())\ 26 }\ 27\ 28 fmt.Println(chatCompletion.Choices[0].Message.Content)\ 29}\ \ JSON\ \ 1{\ 2 "model": "brave-pro",\ 3 "system_fingerprint": "",\ 4 "choices": [\ 5 {\ 6 "index": 0,\ 7 "message": {\ 8 "role": "assistant",\ 9 "content": "The second highest mountain in the world is K2, standing at 8,611 metres (28,251 ft) above sea level. It is located in the Karakoram range, on the border between the Gilgit-Baltistan region of Pakistan and the Taxkorgan Tajik Autonomous County of Xinjiang, China.\n\nK2 is known as the \"Savage Mountain,\" a nickname attributed to climber George Bell after the 1953 American expedition, due to its extreme difficulty and high fatality rate. It is considered a more challenging climb than Mount Everest, the world's highest peak, because of its steep slopes, unpredictable weather, and technical climbing routes.\n\nThe first successful ascent of K2 was achieved on July 31, 1954, by Italian climbers Lino Lacedelli and Achille Compagnoni as part of an expedition led by Ardito Desio. As of August 2023, approximately 800 people have summited K2, with 96 recorded deaths during attempts.\n\nK2 is also known by other names, including Mount Godwin-Austen and Chogori, though it is most commonly referred to by its survey designation. In January 2021, it became the last of the 14 eight-thousanders to be summited in winter, accomplished by a team of Nepalese climbers led by Nirmal Purja and Mingma Gyalje Sherpa."\ 10 },\ 11 "finish_reason": "stop"\ 12 }\ 13\ 14 ],\ 15 "created": 1754426219,\ 16 "id": "749fc052-ea6d-47f1-ab11-a4ae293d0b57",\ 17 "object": "chat.completion",\ 18 "usage": {\ 19 "completion_tokens": 305,\ 20 "prompt_tokens": 7275,\ 21 "total_tokens": 7580,\ 22 "completion_tokens_details": {\ 23 "reasoning_tokens": 0\ 24 }\ 25 }\ 26}\ \ Python cURL JavaScript GO\ \ 1#!/usr/bin/env python\ 2\ 3import requests\ 4\ 5print(\ 6 requests.get(\ 7 "https://api.search.brave.com/res/v1/images/search",\ 8 headers={\ 9 "X-Subscription-Token": "",\ 10 },\ 11 params={\ 12 "q": "munich",\ 13 "count": 20,\ 14 "country": "us",\ 15 "search_lang": "en",\ 16 "spellcheck": 1,\ 17 },\ 18 ).json()\ 19)\ \ 1curl -s --compressed "https://api.search.brave.com/res/v1/images/search?q=munich&safesearch=strict&count=20&search_lang=en&country=us&spellcheck=1" \\ 2 -H "Accept: application/json" \\ 3 -H "Accept-Encoding: gzip" \\ 4 -H "X-Subscription-Token: "\ \ 1#!/usr/bin/env node\ 2\ 3fetch(\ 4 `https://api.search.brave.com/res/v1/images/search?${new URLSearchParams({\ 5 q: "munich",\ 6 count: 20,\ 7 country: "us",\ 8 search_lang: "en",\ 9 spellcheck: 1,\ 10 })}`,\ 11 {\ 12 headers: {\ 13 "X-Subscription-Token": "",\ 14 },\ 15 },\ 16)\ 17 .then((response) => response.json())\ 18 .then((data) => console.log(data));\ \ 1package main\ 2\ 3import (\ 4 "compress/gzip"\ 5 "fmt"\ 6 "io"\ 7 "net/http"\ 8 "net/url"\ 9)\ 10\ 11func main() {\ 12 baseUrl := "https://api.search.brave.com/res/v1/images/search"\ 13 params := url.Values{}\ 14 params.Add("q", "munich")\ 15 params.Add("safesearch", "strict")\ 16 params.Add("count", "20")\ 17 params.Add("search_lang", "en")\ 18 params.Add("country", "us")\ 19 params.Add("spellcheck", "1")\ 20\ 21 client := &http.Client{}\ 22 req, err := http.NewRequest("GET", baseUrl+"?"+params.Encode(), nil)\ 23 if err != nil {\ 24 panic(err)\ 25 }\ 26\ 27 req.Header.Set("Accept", "application/json")\ 28 req.Header.Set("Accept-Encoding", "gzip")\ 29 req.Header.Set("X-Subscription-Token", "")\ 30\ 31 resp, err := client.Do(req)\ 32 if err != nil {\ 33 panic(err)\ 34 }\ 35 defer resp.Body.Close()\ 36\ 37 var reader io.ReadCloser\ 38 if resp.Header.Get("Content-Encoding") == "gzip" {\ 39 reader, err = gzip.NewReader(resp.Body)\ 40 if err != nil {\ 41 panic(err)\ 42 }\ 43 defer reader.Close()\ 44 } else {\ 45 reader = resp.Body\ 46 }\ 47\ 48 body, err := io.ReadAll(reader)\ 49 if err != nil {\ 50 panic(err)\ 51 }\ 52\ 53 fmt.Println(string(body))\ 54}\ \ JSON\ \ 1{\ 2 "type": "images",\ 3 "query": {\ 4 "original": "hammerhead shark",\ 5 "spellcheck_off": false,\ 6 "show_strict_warning": false\ 7 },\ 8 "results": [\ 9 {\ 10 "type": "image_result",\ 11 "title": "Hammerhead Shark",\ 12 "url": "https://stock.adobe.com/search?k=%22hammerhead+shark%22",\ 13 "source": "stock.adobe.com",\ 14 "page_fetched": "2025-02-28T23:32:43Z",\ 15 "thumbnail": {\ 16 "src": "https://imgs.search.brave.com/PlleyzpCI84WDWewoXw1E38DYRsdoNYaMVmYuuXaX-g/rs:fit:500:0:0:0/g:ce/aHR0cHM6Ly90My5m/dGNkbi5uZXQvanBn/LzAzLzczLzYxLzU0/LzM2MF9GXzM3MzYx/NTQ1MV9lbE1SWW5N/VE1zZ1ZVOXd0Nmps/dTRkS2Z3dUdwUmZK/dy5qcGc"\ 17 },\ 18 "properties": {\ 19 "url": "https://t3.ftcdn.net/jpg/03/73/61/54/360_F_373615451_elMRYnMTMsgVU9wt6jlu4dKfwuGpRfJw.jpg",\ 20 "placeholder": "https://imgs.search.brave.com/fY6pOi-eKjgdulvjAfnJ4r4I4taP73Mvk_XB_I8aWM4/rs:fit:76:0:0:0/g:ce/q:10/aHR0cHM6Ly90My5m/dGNkbi5uZXQvanBn/LzAzLzczLzYxLzU0/LzM2MF9GXzM3MzYx/NTQ1MV9lbE1SWW5N/VE1zZ1ZVOXd0Nmps/dTRkS2Z3dUdwUmZK/dy5qcGc"\ 21 },\ 22 "meta_url": {\ 23 "scheme": "https",\ 24 "netloc": "stock.adobe.com",\ 25 "hostname": "stock.adobe.com",\ 26 "favicon": "https://imgs.search.brave.com/ZxIJGoK8dKjPx3r6T5VEe1HXg5wLOSkejXoCy5fIufQ/rs:fit:32:32:1:0/g:ce/aHR0cDovL2Zhdmlj/b25zLnNlYXJjaC5i/cmF2ZS5jb20vaWNv/bnMvOTFhMDJkZGQ1/OWEwZTBhOGJjODU2/ZDcwNTQ1MzYyYmNm/NDlhYTY4Y2FhYjY4/MjYzNTgxMWUwM2Q3/YmJmZTQ2ZS9zdG9j/ay5hZG9iZS5jb20v",\ 27 "path": "› search"\ 28 },\ 29 "confidence": "high"\ 30 }\ 31 ]\ 32}\ \ Python cURL JavaScript GO\ \ 1#!/usr/bin/env python\ 2\ 3import requests\ 4\ 5print(\ 6 requests.get(\ 7 "https://api.search.brave.com/res/v1/images/search",\ 8 headers={\ 9 "X-Subscription-Token": "",\ 10 },\ 11 params={\ 12 "q": "black myth wukong",\ 13 "count": 10,\ 14 "country": "us",\ 15 "search_lang": "en",\ 16 "spellcheck": 1,\ 17 },\ 18 ).json()\ 19)\ \ 1curl -s --compressed "https://api.search.brave.com/res/v1/videos/search?q=black+myth+wukong&count=10&country=us&search_lang=en&spellcheck=1" \\ 2 -H "Accept: application/json" \\ 3 -H "Accept-Encoding: gzip" \\ 4 -H "X-Subscription-Token: "\ \ 1#!/usr/bin/env node\ 2\ 3fetch(\ 4 `https://api.search.brave.com/res/v1/videos/search?${new URLSearchParams({\ 5 q: "black myth wukong",\ 6 count: 10,\ 7 country: "us",\ 8 search_lang: "en",\ 9 spellcheck: 1,\ 10 })}`,\ 11 {\ 12 headers: {\ 13 "X-Subscription-Token": "",\ 14 },\ 15 },\ 16)\ 17 .then((response) => response.json())\ 18 .then((data) => console.log(data));\ \ 1package main\ 2\ 3import (\ 4 "fmt"\ 5 "io/ioutil"\ 6 "net/http"\ 7)\ 8\ 9func main() {\ 10 client := &http.Client{}\ 11 req, err := http.NewRequest("GET", "https://api.search.brave.com/res/v1/videos/search?q=black+myth+wukong&count=10&country=us&search_lang=en&spellcheck=1", nil)\ 12 if err != nil {\ 13 panic(err)\ 14 }\ 15\ 16 req.Header.Set("Accept", "application/json")\ 17 req.Header.Set("Accept-Encoding", "gzip")\ 18 req.Header.Set("X-Subscription-Token", "")\ 19\ 20 resp, err := client.Do(req)\ 21 if err != nil {\ 22 panic(err)\ 23 }\ 24 defer resp.Body.Close()\ 25\ 26 body, err := ioutil.ReadAll(resp.Body)\ 27 if err != nil {\ 28 panic(err)\ 29 }\ 30\ 31 fmt.Println(string(body))\ 32}\ \ JSON\ \ 1{\ 2 "type": "videos",\ 3 "query": {\ 4 "original": "black myth wukong",\ 5 "spellcheck_off": false,\ 6 "show_strict_warning": false\ 7 },\ 8 "results": [\ 9 {\ 10 "type": "video_result",\ 11 "url": "https://www.youtube.com/watch?v=VLnywm2XgJg",\ 12 "title": "Black Myth: Wukong - Before You Buy - YouTube",\ 13 "description": "Black Myth: Wukong (PC, PS5, Xbox Series X/S) is a fresh action game from a newer development studio. How is it? Let's talk.Subscribe for more: http://youtub...",\ 14 "age": "August 16, 2024",\ 15 "page_age": "2024-08-16T17:41:12",\ 16 "video": {\ 17 "duration": "12:22",\ 18 "views": 2832944,\ 19 "creator": "gameranx",\ 20 "publisher": "YouTube",\ 21 "requires_subscription": false,\ 22 "tags": [\ 23 "jake baldino"\ 24 ],\ 25 "author": {\ 26 "name": "gameranx",\ 27 "url": "http://www.youtube.com/@gameranxTV"\ 28 }\ 29 }\ 30 }\ 31 ]\ 32}\ \ Python cURL JavaScript GO\ \ 1#!/usr/bin/env python\ 2\ 3import requests\ 4\ 5print(\ 6 requests.get(\ 7 "https://api.search.brave.com/res/v1/news/search",\ 8 headers={\ 9 "X-Subscription-Token": "",\ 10 },\ 11 params={\ 12 "q": "munich",\ 13 "count": 10,\ 14 "country": "us",\ 15 "search_lang": "en",\ 16 "spellcheck": 1,\ 17 },\ 18 ).json()\ 19)\ \ 1curl -s --compressed "https://api.search.brave.com/res/v1/news/search?q=munich&count=10&country=us&search_lang=en&spellcheck=1" \\ 2 -H "Accept: application/json" \\ 3 -H "Accept-Encoding: gzip" \\ 4 -H "X-Subscription-Token: "\ \ 1#!/usr/bin/env node\ 2\ 3fetch(\ 4 `https://api.search.brave.com/res/v1/news/search?${new URLSearchParams({\ 5 q: "munich",\ 6 count: 10,\ 7 country: "us",\ 8 search_lang: "en",\ 9 spellcheck: 1,\ 10 })}`,\ 11 {\ 12 headers: {\ 13 "X-Subscription-Token": "",\ 14 },\ 15 },\ 16)\ 17 .then((response) => response.json())\ 18 .then((data) => console.log(data));\ \ 1package main\ 2\ 3import (\ 4 "fmt"\ 5 "io"\ 6 "net/http"\ 7)\ 8\ 9func main() {\ 10 client := &http.Client{}\ 11 req, err := http.NewRequest("GET", "https://api.search.brave.com/res/v1/news/search?q=munich&count=10&country=us&search_lang=en&spellcheck=1", nil)\ 12 if err != nil {\ 13 panic(err)\ 14 }\ 15\ 16 req.Header.Set("Accept", "application/json")\ 17 req.Header.Set("Accept-Encoding", "gzip")\ 18 req.Header.Set("X-Subscription-Token", "")\ 19\ 20 resp, err := client.Do(req)\ 21 if err != nil {\ 22 panic(err)\ 23 }\ 24 defer resp.Body.Close()\ 25\ 26 body, err := io.ReadAll(resp.Body)\ 27 if err != nil {\ 28 panic(err)\ 29 }\ 30\ 31 fmt.Println(string(body))\ 32}\ \ JSON\ \ 1{\ 2 "type": "news",\ 3 "query": {\ 4 "original": "munich",\ 5 "spellcheck_off": false,\ 6 "show_strict_warning": false\ 7 },\ 8 "results": [\ 9 {\ 10 "type": "news_result",\ 11 "title": "News | Munich tops TD100 ranking for office and retail rents",\ 12 "url": "https://www.costar.com/article/376440806/munich-tops-td100-ranking-for-office-and-retail-rents",\ 13 "description": "Sister publication Thomas Daily gathers metrics like rent and yield for the top 100 cities in Germany",\ 14 "age": "1 day ago",\ 15 "page_age": "2025-04-01T13:20:42",\ 16 "meta_url": {\ 17 "scheme": "https",\ 18 "netloc": "costar.com",\ 19 "hostname": "www.costar.com",\ 20 "favicon": "https://imgs.search.brave.com/qKaDutjw31L2t0y0EZpwK8bCGuuuKW62BuPTjoc4EeI/rs:fit:32:32:1:0/g:ce/aHR0cDovL2Zhdmlj/b25zLnNlYXJjaC5i/cmF2ZS5jb20vaWNv/bnMvYjMyNmE3ZWY4/YjgyNzlkM2M1ZThh/MjU0YzI3ZGUyNzBi/MDUwNDUxMjUzNGEx/ZjM1Y2FmNmIzZjc3/NjU4YTg0NC93d3cu/Y29zdGFyLmNvbS8",\ 21 "path": "› article › 376440806 › munich-tops-td100-ranking-for-office-and-retail-rents"\ 22 },\ 23 "thumbnail": {\ 24 "src": "https://imgs.search.brave.com/hZsGpoIMHbKbPOWe7zKSlocTJV9rkjPdlf_slgPUovQ/rs:fit:200:200:1:0/g:ce/aHR0cHM6Ly9jb3N0/YXIuYnJpZ2h0c3Bv/dGNkbi5jb20vZGlt/czQvZGVmYXVsdC9h/Y2FmOWViLzIxNDc0/ODM2NDcvc3RyaXAv/dHJ1ZS9jcm9wLzIw/NDh4MTM2NiswKzAv/cmVzaXplLzIwNDh4/MTM2NiEvcXVhbGl0/eS8xMDAvP3VybD1o/dHRwJTNBJTJGJTJG/Y29zdGFyLWJyaWdo/dHNwb3QuczMudXMt/ZWFzdC0xLmFtYXpv/bmF3cy5jb20lMkZH/ZXR0eUltYWdlcy0x/MTczNDg0MTE4Lmpw/Zw"\ 25 }\ 26 }\ 27 ]\ 28}\ \ Python cURL JavaScript GO\ \ 1#!/usr/bin/env python\ 2\ 3import requests\ 4\ 5print(\ 6 requests.get(\ 7 "https://api.search.brave.com/res/v1/suggest/search",\ 8 headers={\ 9 "X-Subscription-Token": "",\ 10 },\ 11 params={\ 12 "q": "hello",\ 13 "count": 5,\ 14 "country": "us",\ 15 },\ 16 ).json()\ 17)\ \ 1curl -s --compressed "https://api.search.brave.com/res/v1/suggest/search?q=hello&country=US&count=5" \\ 2 -H "Accept: application/json" \\ 3 -H "Accept-Encoding: gzip" \\ 4 -H "X-Subscription-Token: "\ \ 1#!/usr/bin/env node\ 2\ 3fetch(\ 4 `https://api.search.brave.com/res/v1/suggest/search?${new URLSearchParams({\ 5 q: "hello",\ 6 count: 5,\ 7 country: "us",\ 8 })}`,\ 9 {\ 10 headers: {\ 11 "X-Subscription-Token": "",\ 12 },\ 13 },\ 14)\ 15 .then((response) => response.json())\ 16 .then((data) => console.log(data));\ \ 1package main\ 2\ 3import (\ 4 "fmt"\ 5 "io"\ 6 "net/http"\ 7)\ 8\ 9func main() {\ 10 client := &http.Client{}\ 11 req, err := http.NewRequest("GET", "https://api.search.brave.com/res/v1/suggest/search?q=hello&country=US&count=5", nil)\ 12 if err != nil {\ 13 panic(err)\ 14 }\ 15\ 16 req.Header.Add("Accept", "application/json")\ 17 req.Header.Add("Accept-Encoding", "gzip")\ 18 req.Header.Add("X-Subscription-Token", "")\ 19\ 20 resp, err := client.Do(req)\ 21 if err != nil {\ 22 panic(err)\ 23 }\ 24 defer resp.Body.Close()\ 25\ 26 body, err := io.ReadAll(resp.Body)\ 27 if err != nil {\ 28 panic(err)\ 29 }\ 30\ 31 fmt.Println(string(body))\ 32}\ \ JSON\ \ 1{\ 2 "type": "suggest",\ 3 "query": {\ 4 "original": "hello"\ 5 },\ 6 "results": [\ 7 {\ 8 "query": "hello"\ 9 },\ 10 {\ 11 "query": "hello chat gpt"\ 12 },\ 13 {\ 14 "query": "hellofresh"\ 15 },\ 16 {\ 17 "query": "hello kitty island adventure"\ 18 },\ 19 {\ 20 "query": "hello kitty"\ 21 }\ 22 ]\ 23}\ \ Python cURL JavaScript GO\ \ 1#!/usr/bin/env python\ 2\ 3import requests\ 4\ 5print(\ 6 requests.get(\ 7 "https://api.search.brave.com/res/v1/spellcheck/search",\ 8 headers={\ 9 "X-Subscription-Token": "",\ 10 },\ 11 params={\ 12 "q": "hellop",\ 13 "country": "us",\ 14 },\ 15 ).json()\ 16)\ \ 1curl -s --compressed "https://api.search.brave.com/res/v1/spellcheck/search?q=hellop&country=US" \\ 2 -H "Accept: application/json" \\ 3 -H "Accept-Encoding: gzip" \\ 4 -H "X-Subscription-Token: "\ \ 1#!/usr/bin/env node\ 2\ 3fetch(\ 4 `https://api.search.brave.com/res/v1/spellcheck/search?${new URLSearchParams({\ 5 q: "hellop",\ 6 country: "us",\ 7 })}`,\ 8 {\ 9 headers: {\ 10 "X-Subscription-Token": "",\ 11 },\ 12 },\ 13)\ 14 .then((response) => response.json())\ 15 .then((data) => console.log(data));\ \ 1package main\ 2\ 3import (\ 4 "fmt"\ 5 "io"\ 6 "net/http"\ 7)\ 8\ 9func main() {\ 10 client := &http.Client{}\ 11 req, err := http.NewRequest("GET", "https://api.search.brave.com/res/v1/spellcheck/search?q=hellop&country=US", nil)\ 12 if err != nil {\ 13 panic(err)\ 14 }\ 15\ 16 req.Header.Set("Accept", "application/json")\ 17 req.Header.Set("Accept-Encoding", "gzip")\ 18 req.Header.Set("X-Subscription-Token", "")\ 19\ 20 resp, err := client.Do(req)\ 21 if err != nil {\ 22 panic(err)\ 23 }\ 24 defer resp.Body.Close()\ 25\ 26 body, _ := io.ReadAll(resp.Body)\ 27 fmt.Println(string(body))\ 28}\ \ JSON\ \ 1{\ 2 "type": "spellcheck",\ 3 "query": {\ 4 "original": "hellop"\ 5 },\ 6 "results": [\ 7 {\ 8 "query": "hello"\ 9 }\ 10 ]\ 11}\ \ [![AWS Marketplace](https://api-dashboard.search.brave.com/static-assets/images/optimized/search/api/images/aws-marketplace.png)](https://aws.amazon.com/marketplace/seller-profile?id=seller-mmvimitjqzsyu)\ \ Enterprise ready\ ----------------\ \ * ### SOC 2 attested\ \ The Brave Search API is SOC 2 Type II attested, with its strict security and privacy controls independently verified by a third-party auditor. [Visit our Trust Center to learn more.](https://trust.brave.app/)\ \ * ### Zero Data Retention\ \ The only search API built with privacy at its core is also the only search API that can offer true Zero Data Retention. With ZDR, companies can meet ever-growing compliance obligations and gain a competitive advantage. [Learn more about ZDR.](https://api-dashboard.search.brave.com/blog/search-api-zero-data-retention/)\ \ * ### High capacity, low latency\ \ Engineered for large-scale deployments, the Brave Search API can handle the capacity needs of even the largest global enterprises. Market-leading low latencies support individual use cases and workflows.\ \ \ FAQ\ ---\ \ What is the Brave Search API?\ \ The Brave Search API is a developer tool for building applications with data from the Web. It’s powered by Brave’s independent Web index, the same index that powers [Brave Search](https://search.brave.com/)\ . It’s commonly used in traditional search engine products, AI search engines, AI training, and agentic (autonomous AI) search.\ \ Why is a credit card required to subscribe to a free plan?\ \ The credit card requirement serves as an anti-fraud measure to protect Brave from bad actors who want to abuse our API. For free plans, the card is only used to confirm your identity and will not be charged.\ \ What other web search API options can the Brave Search API compliment or replace?\ \ The Brave Search API can replace several competing options that may have smaller indexes (Tavily or Exa), higher latencies (SerpAPI or Serper), or more limited access (Google and Bing). It can also serve as a complement to localized API options like Baidu, Naver, Yahoo, and Yandex. The Brave Search API is powered by Brave Search, a completely independent index of the Web, which is tuned to reduce SEO spam and increase quality and recency of results.\ \ Where does the data come from?\ \ Every search engine that has its own index necessarily has its own Web crawler. The Brave Search crawler does not advertise a differentiated user-agent because we must avoid discrimination from websites that allow only Google to crawl them. However, if a domain or page is not crawlable by any search engine (e.g. because it has a noindex tag), or if it is not crawlable by googlebot, then Brave Search’s bot will not crawl it either.\ \ Brave Search is also built on more than just Web crawlers: its privacy-preserving [Web Discovery Project](https://support.brave.app/hc/en-us/articles/4409406835469-What-is-the-Web-Discovery-Project)\ (WDP) allows Brave browser users to opt in and contribute data about searches and webpage visits. This level of voluntary human contribution to an index is unique in the world of API search and training data. WDP uses several privacy safeguards to prevent Brave from knowing who is contributing what, and the code is [open-source](https://github.com/brave/web-discovery-project)\ for auditing by anyone.\ \ What are the key benefits of the Brave Search API?\ \ The Brave Search API offers world-class search engine capabilities at a significantly lower cost to other Search and AI Search APIs. The data is fresh, high-quality, and scales with small to large businesses. The Brave Search API is provisioned to manage thousands of requests per second (and growing) and offers customers the speed and reliability necessary for applications with millions of users around the world.\ \ Importantly, the Brave Search API is not a scraper that simply uses bots to query Google or Bing and repackage their results. Instead, it’s our own independent index of the Web packaged with our own ranking models.\ \ Does the Brave Search API surface recent events?\ \ Yes. Brave Search fetches millions of webpages every day, offering extensive coverage of recent events around the world.\ \ Can I store results retrieved from the Brave Search API?\ \ If you would like to store the API results in part or whole (for example, to train or tune an LLM), you will need to subscribe to a plan that explicitly grants storage rights. Plans with storage rights grant special permissions which are not covered in our general [Terms of Service](https://api-dashboard.search.brave.com/app/documentation/general/terms-of-service)\ .\ \ What about copyright?\ \ Brave Search API offers a ranked list of webpages that are publicly available; this list also includes information to support why the webpage is relevant to the query (for instance, via query-dependent snippets based on the content of the webpage).\ \ The Brave Search API does not grant any rights to third-party content such as webpages. Customers who access URLs displayed in the Brave Search API must ensure their access to those webpages complies with the copyright terms of the page publishers.\ \ Does the Brave Search API follow security and privacy best practices?\ \ Yes. For more info, please check out our help page about [API privacy and security](https://api-dashboard.search.brave.com/app/documentation/general/security)\ .\ \ [![Google Play Store button](https://api-dashboard.search.brave.com/static-assets/images/optimized/playstore.en.png)](https://laptop-updates.brave.com/download/android/BRV002)\ \ [![Apple App Store button](https://api-dashboard.search.brave.com/static-assets/images/optimized/app-store-badge.en.png)](https://laptop-updates.brave.com/download/ios/BRV002)\ \ [Get Brave](https://laptop-updates.brave.com/download/android/BRV002)\ \ ![close](https://api-dashboard.search.brave.com/static-assets/icons/close-icon.svg)\ \ ![Brave logo](https://api-dashboard.search.brave.com/static-assets/images/brave-logo-sans-text.svg)\ \ ### Almost there…\ \ #### Please continue the installation of Brave in the [Google Play app](https://laptop-updates.brave.com/download/android/BRV002)\ .\ \ #### Please continue the installation of Brave in the [App Store](https://laptop-updates.brave.com/download/ios/BRV002)\ .\ \ #### You’re just 60 seconds away from the best privacy online\ \ 1. ##### Download Brave\ \ 2. ##### Run the installer\ \ 3. ##### Import settings\ \ \ 1. step 1\ \ ##### Download Brave\ \ Open the installer from Chrome's downloads (it should be in the upper right corner of this window).\ \ ![](https://api-dashboard.search.brave.com/static-assets/images/optimized/interstitial-step-1.png)\ 2. step 2\ \ ##### Run the installer\ \ If you're prompted to, click “Yes” in the User Access Control dialog.\ \ ![](https://api-dashboard.search.brave.com/static-assets/images/optimized/interstitial-step-2.png)\ 3. step 3\ \ ##### Import settings\ \ Wait for the installation to finish, then import your browser settings from Chrome.\ \ ![](https://api-dashboard.search.brave.com/static-assets/images/optimized/interstitial-step-3.png)\ \ If your download didn’t start automatically, click [here](https://laptop-updates.brave.com/download/android/BRV002)\ .\ \ [Need help?](https://support.brave.app/hc/articles/360025390311)\ \ ![Download QR code](https://api-dashboard.search.brave.com/static-assets/images/interstitial-download-qr.png) Scan to get the app --- # Brave Search - API Basics How API versioning works and what changes to expect between versions The Brave Search API is evolving rapidly, with new iterations released all the time. However, we know that changing an existing API can be disruptive, and that API developers can quickly lose flexibility to make changes as users start consuming their API. A common way to mitigate this is to add some form of versioning to the published API so users can fully rely on the API’s behavior. When you’re ready for an API change, you’ll then have an easy upgrade path forward provided by the API developers. With Brave Search, you can expect two types of versioning schemes. 1\. Versioning in Request URL ----------------------------- The first is a major version number (e.g. `v1`) included in the API URL. An example URL will look something like this `/v1/web/search`. As a user, you can expect this version to be rarely changed, but we reserve the right to do so. These will only be used when there is a major API redesign, which should happen only rarely, and naturally would warrant a major upgrade. 2\. Versioning in Request Header -------------------------------- Backwards incompatible changes, which require an upgrade path and are dated with the format `YYYY-MM-DD`. Without a version header, API requests default to the latest version. The API behavior can be locked to a specific version by providing a version header named `Api-Version` as part of the request. An example version header will look something like `Api-Version: 2023-01-01`. curl "https://api.search.brave.com/res/v1/web/search?q=brave+search" \ -H "X-Subscription-Token: YOUR_API_KEY" \ -H "Api-Version: 2023-01-01" Changes made to the API can be backwards compatible or incompatible. To learn more about which changes are considered backwards compatible or incompatible, read below. API requests default to latest version if no `Api-Version` header is specified. Backwards compatible changes ---------------------------- Brave Search considers the following changes to be backwards compatible, and they will not require action from the API user: * Adding new optional request parameters or headers to APIs that already exist. * Adding new properties to an existing API response. * Adding new API resources. * Changing the order of properties in an existing API response. * Changing the length and format of string values. e.g. object IDs, urls, display strings. Backwards incompatible changes ------------------------------ Brave Search considers the following changes to be backwards incompatible, and they will require action from the API user (provided the API user has updated to the new API version): * Removing an existing request parameter or header from the API request. * Removing properties from an existing API response. * Renaming properties in an existing API response. * Changing the value type of properties in an existing API response. --- # Brave Search - API Basics Understand how rate limiting works and best practices for staying within your quota Overview -------- The API implements rate limiting to ensure fair usage and system stability. Rate limits are enforced using a **1-second sliding window** to count requests per subscription. This means your request count is evaluated in real-time over the most recent second. When you exceed your rate limit, the API will return a **429 status code** and your request will fail. Monitor the rate limit headers to avoid hitting these limits. Rate Limit Response Headers --------------------------- Every API response includes headers that help you track and manage your rate limits. Use these headers to implement proper rate limiting logic in your application. | Header | Description | Example | | --- | --- | --- | | `X-RateLimit-Limit` | Rate limits associated with your plan | `1, 15000` (1 request/second, 15000 requests/month) | | `X-RateLimit-Policy` | Rate limit policies with window sizes in seconds | `1;w=1, 15000;w=2592000` (1 req per 1s window, 15000 req per month window) | | `X-RateLimit-Remaining` | Remaining quota for each limit window | `1, 1000` (1 request left this second, 1000 left this month) | | `X-RateLimit-Reset` | Seconds until each quota resets | `1, 1419704` (resets in 1 second and 1419704 seconds) | Understanding the Headers ------------------------- ### X-RateLimit-Limit Shows the maximum number of requests allowed for each time window in your plan. **Example**: `X-RateLimit-Limit: 1, 15000` * **1 request per second** - Burst rate limit * **15,000 requests per month** - Monthly quota (**0** for unlimited) ### X-RateLimit-Policy Provides the complete policy specification including window sizes. Windows are always expressed in seconds. **Example**: `X-RateLimit-Policy: 1;w=1, 15000;w=2592000` * `1;w=1` - Limit of 1 request over a 1-second window * `15000;w=2592000` - Limit of 15,000 requests over a 2,592,000-second window (30 days) ### X-RateLimit-Remaining Indicates how many requests you can still make within each time window before hitting the limit. **Example**: `X-RateLimit-Remaining: 1, 1000` * **1 request** available in the current second * **1,000 requests** remaining in the current month **Important**: Only successful requests (non-error responses) are counted against your quota and billed. ### X-RateLimit-Reset Shows when each quota window will reset, expressed in seconds from now. **Example**: `X-RateLimit-Reset: 1, 1419704` * **1 second** until you can make another request (per-second limit resets) * **1,419,704 seconds** until your monthly quota fully resets (≈16.4 days) Best Practices -------------- Implement Retry Logic When you receive a 429 status code, check the `X-RateLimit-Reset` header to determine how long to wait before retrying. Implement exponential backoff for additional resilience. import time import requests def make_request_with_retry(url, headers, max_retries=3): for attempt in range(max_retries + 1): response = requests.get(url, headers=headers) if response.status_code != 429 or attempt == max_retries: return response wait_time = 2 ** attempt # 1s, 2s, 4s... time.sleep(wait_time) return response Monitor Remaining Quota Check `X-RateLimit-Remaining` before making subsequent requests. This helps you avoid hitting limits unexpectedly. const remaining = response.headers.get('X-RateLimit-Remaining'); const [perSecond, perMonth] = remaining .split(',') .map(n => parseInt(n.trim())); if (perSecond < 1) { // Wait before next request await new Promise(resolve => setTimeout(resolve, 1000)); } Distribute Requests Evenly Instead of bursting all requests at once, distribute them evenly throughout your time window to maximize throughput and avoid hitting the per-second limit. Handle Multiple Windows Your plan may have multiple limit windows (per-second, quota). Track all to ensure you don’t exceed either limit. Key Insights ------------ * **Real-time tracking**: The 1-second window slides continuously, so your request count is always calculated for the most recent second. * **Counted on arrival**: The request count is increased when request is received. The processing time does not affect the rate-limit. * **Multiple limits**: Most plans have both burst limits (per-second) and quota limits (per-month) that must be respected simultaneously * **Successful requests only**: Failed requests don’t count against your quota, so you’re only charged for successful API calls * **Predictable resets**: Use the `X-RateLimit-Reset` header to calculate exactly when you can safely retry Example Response Headers ------------------------ Here’s what you might see in a typical API response: HTTP/1.1 200 OK X-RateLimit-Limit: 1, 15000 X-RateLimit-Policy: 1;w=1, 15000;w=2592000 X-RateLimit-Remaining: 0, 14523 X-RateLimit-Reset: 1, 1234567 **Interpretation**: * You’ve used your 1 request for this second (`Remaining: 0`) * You have 14,523 requests left this month (`Remaining: 14523`) * You can make another request in 1 second * Your monthly quota resets in 1,234,567 seconds (≈14.3 days) --- # Brave Search - API Resources Information about Brave Search API incidents [Live status\ -----------\ \ See live service status information at our status page](https://status.brave.com/) ### March 27 2025 * Duration: 10:44 - 11:00 UTC (16 minutes of downtime) * Event: All api-keys were temporally disabled during a database migration. The issue has been fixed. ### February 16 2025 * Duration: 08:49 - 08:55 UTC (6 minutes of downtime) * Event: Subsystem failure, which cascaded to produce a full short interruption of the whole API. ### January 4 2025 * Duration: 13:49 - 16:35 UTC (166 minutes of degradation, first 15 minutes downtime) * Event: Large global targeted DDoS attack. ### November 27 2024 * Duration: 16:57 - 17:12 UTC (15 minutes of downtime) * Event: Failed deployment reduced available throughput. ### May 23 2023 * Brave Search API launched. --- # Brave Search - API Resources Security at Brave Brave takes our customers’ security and privacy very seriously. As an API provider for some of the biggest names in tech, we’ve passed numerous vendor audits and are always happy to answer security questions from potential customers. Internal process ---------------- Internally, we require security and privacy reviews from our dedicated security and privacy teams, both during the design phase and implementation phase of new features, as well as for new vendor requests and certain bug fixes. A member of the security and privacy teams must sign off on any changes or specs that warrant review. [github.com/brave/brave-browser/wiki/Security-reviews](https://github.com/brave/brave-browser/wiki/Security-reviews) outlines the types of changes which explicitly require security sign-off. In addition, we often require threat modeling as part of specification design, usually as a “Security and Privacy Considerations” section in the spec. Bug bounty program ------------------ Brave highly prioritizes responsiveness to external security reports. We have an extremely active bug bounty program at [hackerone.com/brave](https://hackerone.com/brave) ; as of October 2024, our average time to triage is about 10 hours and average time to resolution is about 4 days. We also solicit security reports at [security@brave.com](mailto:security@brave.com) . We contracted an external penetration test of Brave Search (prior to development of the API) via a [HackerOne Challenge](https://www.hackerone.com/product/challenge) in May 2021; 2 high severity and 1 medium severity were reported and fixed promptly. In addition, Brave Search API’s last external penetration test was completed in April 2025, and we are in the process of being certified for SOC 2 (proof can be provided upon request to customers). Compliance ---------- Our Data Protection Officer (DPO) advises on our compliance with data protection and privacy laws such as the EU’s General Data Protection Regulation (GDPR) and ePrivacy Directive, and the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA). They also participate in security and privacy reviews, handle [Right to Be Forgotten](https://search.brave.com/help/brave-search-index-right-to-be-forgotten) (RTFB) requests, and ensure our [privacy policy](https://api-dashboard.search.brave.com/documentation/resources/privacy-notice) is up to date. Brave adopts a baseline standard to data protection based on common data protection principles but we adapt our approach where necessary and appropriate for specific jurisdictions and rules. Compliance, as with all organizations subject to data protection law, is an ongoing process and considered within the security and privacy review process established within Brave. ISO standards such as 27001 and 27701 provide guidance for establishing, implementing, maintaining and continuously improving our approach to information security and privacy information management. Malicious content ----------------- Brave takes the utmost care in preventing malicious content from persisting in the search index and addresses [feedback](https://search.brave.com/help/feedback) in a timely manner. For example: * Not all URLs we know about (`>100B`) make it into the index (20B+). We only index pages visited by real people (determined via [privacy preserving techniques](https://support.brave.app/hc/en-us/articles/4409406835469-What-is-the-Web-Discovery-Project) ), linked from multiple pages in the index (reputation transfer), and from curated RSS feeds. * We use real-time blacklists for phishing and malware, similar to [Safe Browsing](https://safebrowsing.google.com/) * We do active scans for child sexual abuse material (CSAM), both internally and using a paid 3rd party ([ActiveFence](https://www.activefence.com/) ) and block such content. * We acknowledge and consider RTBF requests from individuals wherever they are located (not just from the EU) after our DPO’s internal assessment for justification. Resources --------- We have a business continuity plan available upon request and regularly perform backups. Brave grants access to resources under the principle of least privilege. Access requests are subject to security/privacy reviews and promptly revoked upon termination. Note that all Brave staff and contractors are bound by a confidentiality policy. We enable SSO and non-SMS MFA when possible for our employees. The Brave Search API dashboard also supports login via non-SMS MFA. Our production deployment and access control policies are available upon request. Third-party services and dependencies are subject to security and privacy review upon initialization. We use a combination of Dependabot and Socket.dev for automated third party dependency security scanning whenever a dependency changes or a new vulnerability is released. Our security incident handling policy is available upon request. Security events in Search products are monitored by the Search SecOps team. We will promptly notify affected customers and the relevant regulatory authorities if we experience a data breach according to our obligations and risks to individuals. For more info, please contact [privacy@brave.com](mailto:privacy@brave.com) for privacy and data protection inquiries or [security@brave.com](mailto:security@brave.com) for security inquiries. --- # Brave Search - API Resources Learn what search operators are and how to use them to refine and control your search results Overview -------- Search operators are special commands that you can add to your search queries to filter and refine results. They help you find exactly what you’re looking for by limiting and focusing your search with precision. You can place them anywhere in your query string to gain better control over the returned results. Whether you’re building a specialized search application, filtering results by file type, or narrowing down results to specific websites, search operators give you the power to create more targeted searches. Key Features ------------ Precise Filtering ----------------- Narrow down results by file type, location, language, and more Flexible Placement ------------------ Add operators anywhere in your query for natural query construction Content Targeting ----------------- Search within specific parts of web pages (title, body, or both) Logical Combinations -------------------- Combine multiple operators with AND, OR, NOT for complex queries Use Cases --------- Search operators are perfect for: * **Research Applications**: Filter academic papers, PDFs, and documents by file type * **Competitive Analysis**: Monitor specific domains while excluding others * **Multilingual Search**: Target content in specific languages and regions * **Content Discovery**: Find exact phrases and specific keyword placements * **Advanced Filtering**: Build complex search logic with operator combinations Basic Search Operators ---------------------- ### File Extension and Type #### `ext` Returns web pages with a specific file extension. **Example**: To find the Honda GX120 Owner’s manual in PDF format: Honda GX120 owners manual ext:pdf #### `filetype` Returns web pages created in the specified file type. **Example**: To find documentation about cognitive changes in PDF format: evaluation of age cognitive changes filetype:pdf ### Content Location #### `intitle` Returns web pages containing the specified term in the page title. **Example**: To find SEO conference pages with “2023” in the title: seo conference intitle:2023 #### `inbody` Returns web pages containing the specified term in the body of the page. **Example**: To find information about the Nvidia GeForce GTX 1080 Ti with “founders edition” in the body: nvidia 1080 ti inbody:"founders edition" #### `inpage` Returns web pages containing the specified term either in the title or in the body. **Example**: To find pages about the 2024 Oscars with “best costume design” anywhere on the page: oscars 2024 inpage:"best costume design" ### Language and Location #### `lang` or `language` Returns web pages written in the specified language. The language code must be in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) two-letter format. **Example**: To find information about visas only in Spanish: visas lang:es **Common language codes**: * `en` - English * `es` - Spanish * `fr` - French * `de` - German * `ja` - Japanese * `zh` - Chinese #### `loc` or `location` Returns web pages from a specific country or region. The country code must be in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. **Example**: To find Canadian web pages about Niagara Falls: niagara falls loc:ca **Common country codes**: * `us` - United States * `gb` - United Kingdom * `ca` - Canada * `au` - Australia * `de` - Germany * `fr` - France ### Domain Filtering #### `site` Returns web pages from only a specific website or domain. **Example**: To find information about Goggles only on Brave pages: goggles site:brave.com You can also use subdomains (e.g., `site:blog.example.com`) or partial domains (e.g., `site:example.com` will include all subdomains). Advanced Search Operators ------------------------- ### Inclusion and Exclusion #### `+` (Plus) Forces the inclusion of a term in the title or body of the page. Ensures that the specified keyword appears in results. **Example**: To find information about FreeSync GPU technology, ensuring “FreeSync” appears: gpu +freesync #### `-` (Minus) Excludes web pages containing the specified term from results. **Example**: To search for office-related content while excluding Microsoft: office -microsoft The minus operator is particularly useful for filtering out common but unwanted terms from your search results. ### Exact Matching #### `""` (Quotation Marks) Returns web pages containing exact matches to your query in the specified order. **Example**: To find pages about Harry Potter with the exact phrase “order of the phoenix”: harry potter "order of the phoenix" Logical Operators ----------------- Logical operators allow you to combine and refine search operators for complex queries. These operators enable advanced search logic and must be written in uppercase. ### `AND` Returns only web pages meeting all specified conditions. All criteria must be satisfied. **Example**: To search for visa information in English from UK websites: visa loc:gb AND lang:en ### `OR` Returns web pages meeting any of the conditions. At least one criterion must be satisfied. **Example**: To search for travel requirements for either Australia or New Zealand: travel requirements inpage:australia OR inpage:"new zealand" ### `NOT` Returns web pages that do not meet the specified condition(s). Excludes results matching the criteria. **Example**: To search for information about Brave Search while excluding [brave.com](http://brave.com/) : brave search NOT site:brave.com Logical operators can be combined to create sophisticated search queries. For example: `coffee OR tea recipe NOT starbucks` Using Search Operators with the API ----------------------------------- Search operators work seamlessly with the Brave Search API. Simply include them in your query parameter: curl "https://api.search.brave.com/res/v1/web/search?q=machine+learning+filetype:pdf+lang:en" \ -H "X-Subscription-Token: YOUR_API_KEY" import requests url = "https://api.search.brave.com/res/v1/web/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } params = { "q": "machine learning filetype:pdf lang:en" } response = requests.get(url, headers=headers, params=params) results = response.json() const url = new URL("https://api.search.brave.com/res/v1/web/search"); url.searchParams.append("q", "machine learning filetype:pdf lang:en"); const response = await fetch(url, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, }); const results = await response.json(); console.log(results); Practical Examples ------------------ Here are some real-world examples combining multiple operators: ### Academic Research Find recent academic papers about climate change in PDF format from educational institutions: climate change filetype:pdf site:edu intitle:2024 ### Multilingual Content Discovery Search for cooking recipes in French from Canadian websites: recettes cuisine loc:ca lang:fr ### Competitive Analysis Find information about AI startups while excluding major tech companies: AI startup -google -microsoft -amazon -meta ### Technical Documentation Search for Python documentation on specific topics with exact terms: python "asyncio" intitle:documentation site:docs.python.org ### News Research Find news articles about electric vehicles from multiple specific sources: electric vehicles site:reuters.com OR site:bloomberg.com 2025 Best Practices -------------- Combine Operators Effectively Use multiple operators together to create highly targeted searches. Start with broader operators like `site` or `lang`, then narrow down with content operators like `intitle` or `inbody`. Use Quotes for Exact Phrases When searching for specific terminology, product names, or phrases, wrap them in quotation marks to ensure exact matching. This is particularly useful for technical terms and proper nouns. Test Operator Combinations Experiment with different operator combinations to find the optimal query for your use case. Some operators work better together than others depending on your search goal. URL Encode Special Characters When using operators in API calls, ensure special characters are properly URL encoded. Most HTTP libraries handle this automatically. Start Simple, Then Refine Begin with basic queries and gradually add operators to refine results. This iterative approach helps you understand which operators provide the most value for your specific use case. Operator Reference Table ------------------------ | Operator | Purpose | Example | | --- | --- | --- | | `ext:` | File extension filter | `manual ext:pdf` | | `filetype:` | File type filter | `report filetype:pdf` | | `intitle:` | Search in page title | `intitle:guide` | | `inbody:` | Search in page body | `inbody:"exact phrase"` | | `inpage:` | Search in title or body | `inpage:keyword` | | `lang:` | Language filter (ISO 639-1) | `lang:es` | | `loc:` | Location filter (ISO 3166-1) | `loc:ca` | | `site:` | Domain filter | `site:example.com` | | `+` | Force inclusion | `+required` | | `-` | Exclude term | `-unwanted` | | `""` | Exact phrase match | `"exact phrase"` | | `AND` | Logical AND | `term1 AND term2` | | `OR` | Logical OR | `term1 OR term2` | | `NOT` | Logical NOT | `term NOT excluded` | Limitations and Notes --------------------- Search operators are experimental and in the early stages of development. Behavior and availability may change as we continue to improve the feature. Keep in mind: * Not all queries may return results when operators are used, especially with very restrictive combinations * Operator behavior may vary depending on the complexity of the query * Some operators may have overlapping functionality (like `ext` and `filetype`) * Logical operators must be written in uppercase (AND, OR, NOT) Related Resources ----------------- [Web Search API\ --------------\ \ Learn about the Web Search API and how to integrate it](https://api-dashboard.search.brave.com/documentation/services/web-search) [Goggles\ -------\ \ Create custom search experiences with Goggles](https://api-dashboard.search.brave.com/documentation/resources/goggles) [API Reference\ -------------\ \ Complete API documentation and parameters](https://api-dashboard.search.brave.com/api-reference/web/search/get) [Quickstart Guide\ ----------------\ \ Get started with your first search query](https://api-dashboard.search.brave.com/documentation/quickstart) --- # Brave Search - API Resources Customize search rankings with Goggles to create personalized search experiences Overview -------- Goggles are a powerful feature that allows you to customize how search results are ranked. Using a simple domain-specific language, you can create instructions to boost, downrank, or completely filter results based on URL patterns, domains, and other criteria. This enables you to build personalized search experiences tailored to specific use cases or audiences. Goggles work with both **Web Search** and **News Search** APIs, giving you fine-grained control over result ranking across different content types. Key Features ------------ Custom Ranking -------------- Boost, downrank, or completely discard results based on your criteria URL Pattern Matching -------------------- Target specific domains, paths, or URL patterns with flexible matching rules Multiple Sources ---------------- Combine multiple hosted Goggles or use inline definitions for flexibility Open & Shareable ---------------- Host Goggles on GitLab, GitHub repositories, or Gists and share them with others Use Cases --------- Goggles are perfect for: * **Specialized Search Engines**: Create vertical search experiences (e.g., tech blogs, academic sources only) * **Content Curation**: Boost trusted sources and demote undesired content * **Brand Monitoring**: Focus on specific news outlets or exclude competitors * **Research Applications**: Filter scholarly sources or specific geographic regions * **Community Tools**: Build search experiences tailored to specific communities or interests Using Goggles with the API -------------------------- Both Web Search and News Search APIs accept the `goggles` query parameter. You can provide Goggles in three ways: * **Hosted Goggles URL**: A link to a Goggles file hosted on GitHub, GitLab, or Gist * **Inline Specification**: Include Goggles rules directly in the request * **Mixed**: Combine multiple hosted Goggles and inline rules by passing multiple URLs and inline rules Goggles must be submitted to Brave Search before they can be used with the API. Visit [search.brave.com/goggles/create](https://search.brave.com/goggles/create) to register your Goggle. ### Using a Hosted Goggles Hosted Goggles are ideal for complex rule sets as they avoid URL length limitations. Simply pass the URL of your hosted Goggles file: curl "https://api.search.brave.com/res/v1/web/search" \ --url-query "q=programming tutorials" \ --url-query "goggles=https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/tech_blogs.goggle" \ -H "X-Subscription-Token: YOUR_API_KEY" import requests url = "https://api.search.brave.com/res/v1/web/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } params = { "q": "programming tutorials", "goggles": "https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/tech_blogs.goggle" } response = requests.get(url, headers=headers, params=params) results = response.json() const url = new URL("https://api.search.brave.com/res/v1/web/search"); url.searchParams.append("q", "programming tutorials"); url.searchParams.append( "goggles", "https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/tech_blogs.goggle" ); const response = await fetch(url, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, }); const results = await response.json(); console.log(results); ### Using Multiple Goggles You can combine multiple hosted Goggles by passing multiple `goggles` parameters: curl "https://api.search.brave.com/res/v1/web/search?q=rust+programming&goggles=https%3A%2F%2Fexample.com%2Fgoggle1.goggle&goggles=https%3A%2F%2Fexample.com%2Fgoggle2.goggle" \ -H "X-Subscription-Token: YOUR_API_KEY" import requests url = "https://api.search.brave.com/res/v1/web/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } # Pass multiple goggles as a list params = [\ ("q", "rust programming"),\ ("goggles", "https://example.com/goggle1.goggle"),\ ("goggles", "https://example.com/goggle2.goggle")\ ] response = requests.get(url, headers=headers, params=params) results = response.json() const url = new URL("https://api.search.brave.com/res/v1/web/search"); url.searchParams.append("q", "rust programming"); // Append multiple goggles parameters url.searchParams.append("goggles", "https://example.com/goggle1.goggle"); url.searchParams.append("goggles", "https://example.com/goggle2.goggle"); const response = await fetch(url, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, }); const results = await response.json(); console.log(results); ### Using Inline Goggles Specifications For simple use cases, you can pass Goggles rules directly in the query parameter. This is useful for quick experiments or simple filtering rules: curl "https://api.search.brave.com/res/v1/web/search?q=rust+programming&goggles=https%3A%2F%2Fexample.com%2Fgoggle1.goggle&goggles=https%3A%2F%2Fexample.com%2Fgoggle2.goggle" \ -H "X-Subscription-Token: YOUR_API_KEY" import requests from urllib.parse import quote url = "https://api.search.brave.com/res/v1/web/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } # Inline Goggles to boost dev.to results goggle_rules = "$boost=3,site=dev.to" params = { "q": "web development", "goggles": goggle_rules } response = requests.get(url, headers=headers, params=params) results = response.json() const url = new URL("https://api.search.brave.com/res/v1/web/search"); url.searchParams.append("q", "web development"); // Inline Goggles to boost dev.to results const gogglesRules = "$boost=3,site=dev.to"; url.searchParams.append("goggles", gogglesRules); const response = await fetch(url, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, }); const results = await response.json(); console.log(results); Delimit the rules with `\n` (encoded to `%0A`) to include multiple inline rules in one `goggles` parameter. For complex Goggles with many rules, use hosted files instead of inline specifications. URL length limits can restrict the number of rules you can include inline. Using Goggles with News Search ------------------------------ Goggles work the same way with the News Search API. This allows you to customize news result rankings based on your preferred sources: curl "https://api.search.brave.com/res/v1/news/search?q=technology&goggles=https%3A%2F%2Fexample.com%2Fmy-news-sources.goggle" \ -H "X-Subscription-Token: YOUR_API_KEY" Goggles Syntax Overview ----------------------- Goggles use a simple domain-specific language (DSL) to express ranking instructions. Each instruction targets URLs and specifies how matching results should be treated. ### Basic Actions | Action | Description | Example | | --- | --- | --- | | `$boost` | Increase ranking of matching results | `$boost,site=example.com` | | `$boost=N` | Boost with specific strength (1-10) | `$boost=5,site=example.com` | | `$downrank` | Decrease ranking of matching results | `$downrank,site=example.com` | | `$downrank=N` | Downrank with specific strength (1-10) | `$downrank=3,site=example.com` | | `$discard` | Completely remove matching results | `$discard,site=example.com` | ### URL Targeting | Pattern | Description | Example | | --- | --- | --- | | `site=` | Match specific domain | `$boost,site=dev.to` | | Path patterns | Match URL paths | `/blog/$boost` | | Wildcards (`*`) | Match any characters | `*/api/*$boost` | ### Example Goggles File ! name: Tech Blogs ! description: Boost results from popular tech blogs ! public: true ! author: Your Name ! Boost popular tech blogs $boost=3,site=dev.to $boost=3,site=medium.com $boost=3,site=hashnode.dev $boost=2,site=css-tricks.com ! Downrank content farms $downrank=5,site=w3schools.com ! Discard specific domains entirely $discard,site=spam-example.com ### Conflict Resolution When multiple instructions match the same URL, Goggles follow this precedence: 1. `$discard` takes highest priority (unless generic) 2. `$boost` takes precedence over `$downrank` 3. Higher strength values take precedence over lower ones For example, if one rule says `$downrank=3,site=example.com` and another says `$boost=2,site=example.com`, the boost rule wins. Creating and Hosting Goggles ---------------------------- To use a hosted Goggles with the API, you need to: 1. **Create a Goggles file** — Write your rules in a plain text file (`.goggle` extension recommended) 2. **Add metadata** — Include required metadata at the top of your file 3. **Host the file** — Upload to one of the supported platforms: * [GitHub Gist](https://gist.github.com/) (public or secret) * [GitHub](https://github.com/) (public repositories) * [GitLab](https://gitlab.com/) (public files or snippets) 4. **Submit for validation** — Register your Goggles at [search.brave.com/goggles/create](https://search.brave.com/goggles/create) ### Required Metadata Every Goggles file must include these metadata fields at the top: ! name: My Custom Goggles ! description: Brief description of what this Goggles does ! public: false ! author: Your Name ### Optional Metadata Optional metadata can be added to your Goggles file to provide additional information about the Goggles. ! homepage: https://example.com ! issues: https://github.com/user/repo/issues ! avatar: #FF5733 ! license: MIT Goggles must be submitted to Brave Search before they can be used with the API. Visit [search.brave.com/goggles/create](https://search.brave.com/goggles/create) to register your Goggle. Limitations ----------- Keep these limitations in mind when creating Goggles: * **File size**: Maximum 2MB per Goggles file * **Instruction count**: Maximum 100,000 instructions per file * **Instruction length**: Maximum 500 characters per instruction * **Wildcards**: Maximum 2 `*` characters per instruction * **Carets**: Maximum 2 `^` characters per instruction These limits are designed to ensure good performance while still allowing complex re-ranking logic. Most use cases fit well within these constraints. Best Practices -------------- Start Simple and Iterate Begin with a few key rules and test their effect on search results. Gradually add more rules as you understand how they interact. Use Hosted Goggles for Complex Rules Inline Goggles specifications are convenient for simple cases, but URL length limits restrict their complexity. For production applications with many rules, always use hosted Goggles files. Test with Diverse Queries A Goggles that works well for one query might behave unexpectedly for others. Test your Goggles with a variety of queries to ensure consistent behavior across different use cases. Version Control Your Goggles Since Brave Search doesn’t maintain version history, use Git to track changes to your Goggles files. This allows you to roll back changes if needed and understand how your rules have evolved. Example Goggles --------------- Brave provides several example Goggles for learning purposes: | Goggles | Description | | --- | --- | | [Tech Blogs](https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/tech_blogs.goggle) | Boosts content from popular tech blogs | | [Hacker News](https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/hacker_news.goggle) | Prioritizes domains popular with the HN community | | [No Pinterest](https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/no_pinterest.goggle) | Removes Pinterest results | | [1K Short](https://raw.githubusercontent.com/brave/goggles-quickstart/main/goggles/1k_short.goggle) | Removes top 1,000 most-viewed websites | Browse more community-created Goggles on the [Goggles Discovery page](https://search.brave.com/goggles/discover) . Related Resources ----------------- [Goggles Quickstart Guide\ ------------------------\ \ Complete guide to creating Goggles with syntax reference and examples](https://github.com/brave/goggles-quickstart) [Web Search API\ --------------\ \ Learn about the Web Search API and all available parameters](https://api-dashboard.search.brave.com/documentation/services/web-search) [News Search API\ ---------------\ \ Learn about the News Search API and filtering options](https://api-dashboard.search.brave.com/documentation/services/news-search) [Search Operators\ ----------------\ \ Combine Goggles with search operators for even more control](https://api-dashboard.search.brave.com/documentation/resources/search-operators) --- # Brave Search - API Service APIs Dedicated search for videos, with advanced filtering and freshness options Overview -------- Video Search lets you send queries and receive relevant video results from a dedicated index spanning various platforms and sources across the web. With continuous indexing, your applications can retrieve tutorials, entertainment, news clips, and more—all through a simple search. Key Features ------------ Video-Specific Index -------------------- Search across a curated index of video content from multiple platforms and sources Freshness Filtering ------------------- Filter results by discovery date - from last 24 hours to custom date ranges Country & Language Options -------------------------- Target videos from specific countries and in preferred languages Safe Search Filtering --------------------- Control adult content filtering with flexible options API Reference ------------- [Video Search API Documentation\ ------------------------------\ \ View the complete API reference, including endpoints, parameters, and example requests](https://api-dashboard.search.brave.com/api-reference/videos/video_search/get) Use Cases --------- Video Search is perfect for: * **Video Platforms**: Build video discovery and recommendation features * **Educational Applications**: Find tutorials, lectures, and instructional content * **Content Aggregation**: Gather video content from across the web * **Entertainment Apps**: Discover movies, shows, and entertainment content * **Media Monitoring**: Track video mentions and brand coverage across platforms Freshness Filtering ------------------- Video Search offers powerful date-based filtering to help you find the most relevant content: * **Last 24 Hours** (`pd`): Get the latest uploaded videos * **Last 7 Days** (`pw`): Track weekly video content * **Last 31 Days** (`pm`): Monitor monthly uploads * **Last Year** (`py`): Search annual video coverage * **Custom Date Range**: Specify exact timeframes (e.g., `2022-04-01to2022-07-30`) Example request filtering for videos from the past week: curl "https://api.search.brave.com/res/v1/videos/search?q=machine+learning+tutorial&freshness=pw" \ -H "X-Subscription-Token: " Country and Language Targeting ------------------------------ Customize your video search results by specifying: * **Country**: Target videos from specific countries using 2-character country codes * **Search Language**: Filter results by content language * **UI Language**: Set the preferred language for response metadata Example request for Spanish videos from Spain: curl "https://api.search.brave.com/res/v1/videos/search?q=recetas+de+cocina&country=ES&search_lang=es" \ -H "X-Subscription-Token: " Search Operators ---------------- Video Search supports [search operators](https://search.brave.com/help/operators) to refine your queries: * Use quotes for exact phrase matching: `"python programming"` * Exclude terms with minus: `cooking -vegan` * Site-specific searches: `site:youtube.com fitness workout` Pagination ---------- Efficiently paginate through video results: * **count**: Number of results per page (max 50, default 20) * **offset**: Page number to retrieve (0-based, max 9) Example request for page 2 with 20 results per page: curl "https://api.search.brave.com/res/v1/videos/search?q=travel+vlog&count=20&offset=1" \ -H "X-Subscription-Token: " Safe Search ----------- Control adult content filtering with the `safesearch` parameter: * **off**: No filtering * **moderate**: Filter explicit content (default) * **strict**: Filter explicit and suggestive content This is particularly important for applications targeting family-friendly or educational audiences. Spellcheck ---------- Video Search includes automatic spellcheck functionality to improve search accuracy: * Enabled by default * Automatically corrects common misspellings * The modified query is used for search and available in the response To disable spellcheck: curl "https://api.search.brave.com/res/v1/videos/search?q=tutorial&spellcheck=false" \ -H "X-Subscription-Token: " Example: Complete Search Request -------------------------------- Here’s a comprehensive example combining multiple parameters: curl "https://api.search.brave.com/res/v1/videos/search?q=photography+tips&country=US&search_lang=en&count=25&freshness=pm&safesearch=strict" \ -H "X-Subscription-Token: " This request: * Searches for “photography tips” * Targets US content * Returns English language results * Retrieves 25 results * Filters to videos from the past month * Applies strict safe search filtering Changelog --------- This changelog outlines all significant changes to the Brave Video Search API in chronological order. * **2023-06-20** Add Brave Video Search API resource. * **2024-02-15** Add freshness filtering with custom date ranges. * **2024-11-05** Improve search operators support. --- # Brave Search - API Service APIs Search from a comprehensive index of images across the web with advanced filtering options Overview -------- Image Search provides access to a vast index of images from across the internet. Our service continuously crawls and indexes images from various sources, enabling you to retrieve relevant visual content for your applications with powerful filtering and customization options. Key Features ------------ Extensive Image Index --------------------- Search across billions of indexed images from diverse sources worldwide High Volume Results ------------------- Retrieve up to 200 images per request for comprehensive coverage Country & Language Options -------------------------- Target images from specific countries and in preferred languages Strict Safe Search ------------------ Default strict filtering ensures family-friendly results API Reference ------------- [Image Search API Documentation\ ------------------------------\ \ View the complete API reference, including endpoints, parameters, and example requests](https://api-dashboard.search.brave.com/api-reference/images/image_search) Use Cases --------- Image Search is perfect for: * **Visual Content Discovery**: Build image galleries and discovery features * **E-commerce Applications**: Find product images and visual inspiration * **Creative Tools**: Source images for design and creative projects * **Content Management**: Discover and aggregate visual content * **Research and Analysis**: Gather visual data for analysis and research Basic Search ------------ Get started with a simple image search request: curl "https://api.search.brave.com/res/v1/images/search?q=mountain+landscape" \ -H "X-Subscription-Token: " Country and Language Targeting ------------------------------ Customize your image search results by specifying: * **Country**: Prefer images from specific countries using country codes (or `ALL` for worldwide) * **Search Language**: Prefer results by content language Example request for images from Japan in Japanese: curl "https://api.search.brave.com/res/v1/images/search?q=桜&country=JP&search_lang=ja" \ -H "X-Subscription-Token: " Result Count Control -------------------- Image Search supports retrieving large batches of results: * **Default**: 50 images per request * **Maximum**: 200 images per request * Higher limits than other search types for comprehensive visual content discovery Example request for 100 images: curl "https://api.search.brave.com/res/v1/images/search?q=wildlife+photography&count=100" \ -H "X-Subscription-Token: " The actual number of images returned may be less than requested based on available results for the query. Safe Search ----------- Image Search prioritizes safe content with strict filtering by default: * **strict**: Drops all adult content from search results (default) * **off**: No filtering applied (except for illegal content) This default setting ensures that image results are appropriate for all audiences out of the box. Example request with safe search disabled: curl "https://api.search.brave.com/res/v1/images/search?q=art&safesearch=off" \ -H "X-Subscription-Token: " Disabling safe search may return adult or inappropriate content. Use with caution and only when appropriate for your use case. Spellcheck ---------- Image Search includes automatic spellcheck functionality to improve search accuracy: * Enabled by default * Automatically corrects common misspellings * The modified query is used for search and available in the response * Particularly useful for visual searches where terminology matters To disable spellcheck: curl "https://api.search.brave.com/res/v1/images/search?q=architecure&spellcheck=false" \ -H "X-Subscription-Token: " Example: Complete Search Request -------------------------------- Here’s a comprehensive example combining multiple parameters: curl "https://api.search.brave.com/res/v1/images/search?q=modern+architecture&country=US&search_lang=en&count=150&safesearch=strict" \ -H "X-Subscription-Token: " This request: * Searches for “modern architecture” * Targets US content * Returns English language results * Retrieves up to 150 images * Applies strict safe search filtering Response Format --------------- Each image result typically includes: * Image URL and thumbnail * Source page URL * Image dimensions * Title and description * Publisher information See the [API Reference](https://api-dashboard.search.brave.com/api-reference/images/image_search) for complete response schema details. Image Proxy and Thumbnails -------------------------- Each image result includes a thumbnail URL that is served through the Brave Search image proxy. The thumbnail is resized to have a width of **500 pixels** while maintaining the original aspect ratio. ### Why Brave Uses Proxied Image URLs Brave Search uses proxied image URLs for two important reasons: 1. **Reduced load on source servers**: By caching and serving images through our proxy, we reduce the number of requests to the original image hosts. 2. **User privacy protection**: Proxied URLs prevent image source servers from tracking end users, as all requests originate from Brave’s infrastructure rather than user devices. ### Properties Field The `properties` field in each image result contains additional URL information: * **url**: The original image URL from the source website * **placeholder**: A small placeholder URL, also served through the Brave Search image proxy * Properties often include `width` and `height` values, though these are not always available This allows you to choose between the standard 500px thumbnail in the main response or access the original source URL when needed. Best Practices -------------- ### Query Optimization * Use descriptive, specific terms for better results * Combine multiple keywords to narrow down results * Consider language and regional variations in terminology ### Performance * Request only the number of images you need * Use appropriate country and language filters to reduce noise * Implement caching on your end to minimize API calls ### Content Safety * Keep strict safe search enabled for public-facing applications * Implement additional content moderation if needed for your specific use case * Be aware of copyright and licensing when using discovered images Changelog --------- This changelog outlines all significant changes to the Brave Image Search API in chronological order. * **2023-05-10** Add Brave Image Search API resource. * **2024-01-20** Increase maximum result count to 200 images. * **2024-08-15** Improve spellcheck accuracy for visual search terms. --- # Brave Search - API Service APIs Real-time query autocompletion and suggestions to enhance search experiences Overview -------- Brave Search Suggest API provides intelligent query autocompletion and search suggestions as users type, helping them formulate better queries and discover relevant content faster. The API returns contextually relevant suggestions based on the partial query input, with optional enrichment data for enhanced user experiences. The suggestions provided are resilient to typos made by the user. Key Features ------------ Real-time Suggestions --------------------- Get instant query completions as users type their search queries Contextual Results ------------------ Suggestions adapt based on country and language preferences Rich Enrichments ---------------- Enhanced suggestions with titles, descriptions, and images **(Paid Plan)** Entity Detection ---------------- Identify when suggestions represent specific entities Rich suggestions with enhanced metadata require a **paid subscription**. [View pricing](https://api-dashboard.search.brave.com/documentation/pricing) to unlock these advanced features. API Reference ------------- [Suggest API Documentation\ -------------------------\ \ View the complete API reference, including endpoints, parameters, and example requests](https://api-dashboard.search.brave.com/api-reference/other/suggestions) Use Cases --------- Suggest API is perfect for: * **Search Boxes**: Power autocomplete in search interfaces * **User Experience**: Help users formulate better queries faster * **Query Refinement**: Guide users toward popular or relevant searches * **Content Discovery**: Surface trending or related topics as users type * **Mobile Applications**: Provide touch-friendly query suggestions Endpoint -------- Brave Suggest API is available at the following endpoint: https://api.search.brave.com/res/v1/suggest/search Getting Started --------------- Get started immediately with a simple cURL request: curl "https://api.search.brave.com/res/v1/suggest/search?q=hello&country=US&count=5" \ -H "X-Subscription-Token: " ### Example Response { "type": "suggest", "query": { "original": "hello" }, "results": [\ {\ "query": "hello world"\ },\ {\ "query": "hello kitty"\ },\ {\ "query": "hello neighbor"\ },\ {\ "query": "hello fresh"\ },\ {\ "query": "hello sunshine"\ }\ ] } Rich Suggestions ---------------- With a paid subscription and the `rich=true` parameter, suggestions are enhanced with additional metadata: curl "https://api.search.brave.com/res/v1/suggest/search?q=einstein&country=US&count=3&rich=true" \ -H "X-Subscription-Token: " ### Enhanced Response Example { "type": "suggest", "query": { "original": "einstein" }, "results": [\ {\ "query": "albert einstein",\ "is_entity": true,\ "title": "Albert Einstein",\ "description": "Theoretical physicist who developed the theory of relativity",\ "img": "https://example.com/einstein.jpg"\ },\ {\ "query": "einstein theory",\ "is_entity": false\ },\ {\ "query": "einstein quotes"\ }\ ] } Integration Examples -------------------- async function getSuggestions(query) { const params = new URLSearchParams({ q: query, country: "US", count: "10", rich: "true", }); const response = await fetch( `https://api.search.brave.com/res/v1/suggest/search?${params}`, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, } ); return await response.json(); } // Usage const suggestions = await getSuggestions("brave search"); console.log(suggestions.results); import requests def get_suggestions(query: str, count: int = 5, rich: bool = False): url = "https://api.search.brave.com/res/v1/suggest/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } params = { "q": query, "country": "US", "count": count, "rich": rich } response = requests.get(url, headers=headers, params=params) return response.json() # Usage suggestions = get_suggestions("brave search", count=10, rich=True) for result in suggestions["results"]: print(result["query"]) Best Practices -------------- ### Performance Optimization * **Debounce Requests**: Implement debouncing (e.g., 150-300ms) to avoid excessive API calls as users type * **Progressive Enhancement**: Load suggestions asynchronously without blocking the UI ### Rate Limiting * Only make requests after users pause typing (debouncing) * Implement client-side caching for repeated queries * Consider your subscription plan’s rate limits when designing your integration Changelog --------- This changelog outlines all significant changes to the Brave Search Suggest API in chronological order. * **2023-05-01** Add search suggestions endpoint --- # Brave Search - API Service APIs Intelligent spell checking to improve query quality and help users find what they're looking for Overview -------- Brave Search Spell Check API provides advanced spell checking capabilities for search queries. It analyzes queries to detect spelling errors and suggests corrected alternatives, helping users get better search results even when they make typos or spelling mistakes. Key Features ------------ Query Correction ---------------- Automatically detect and correct spelling errors in search queries Contextual Suggestions ---------------------- Intelligent corrections based on query context and search patterns Fast Response ------------- Low-latency spell checking for real-time query processing Language Support ---------------- Multi-language spell checking with country-specific corrections API Reference ------------- [Spell Check API Documentation\ -----------------------------\ \ View the complete API reference, including endpoints, parameters, and example requests](https://api-dashboard.search.brave.com/api-reference/other/spell_check) Use Cases --------- Spell Check API is perfect for: * **Search Applications**: Improve user experience by correcting typos before searching * **Query Suggestions**: Offer spelling corrections in search interfaces * **Data Quality**: Clean and normalize user-generated queries * **Autocorrect**: Implement “Did you mean?” functionality * **Query Analysis**: Identify and track common misspellings Endpoint -------- Brave Spell Check API is available at the following endpoint: https://api.search.brave.com/res/v1/spellcheck/search To try the API on a Free plan, you’ll still need to subscribe — you simply won’t be charged. Once subscribed, you can get an API key in the [API Keys](https://api-dashboard.search.brave.com/app/keys) section. Getting Started --------------- Get started immediately with a simple cURL request: curl "https://api.search.brave.com/res/v1/spellcheck/search?q=helo&country=US" \ -H "X-Subscription-Token: " ### Example Response { "type": "spellcheck", "query": { "original": "helo" }, "corrected": { "query": "hello", "altered": true } } Common Examples --------------- ### No Correction Needed When the query is already spelled correctly: curl "https://api.search.brave.com/res/v1/spellcheck/search?q=hello&country=US" \ -H "X-Subscription-Token: " Response: { "type": "spellcheck", "query": { "original": "hello" }, "corrected": { "query": "hello", "altered": false } } ### Multi-word Correction The API handles corrections in multi-word queries: curl "https://api.search.brave.com/res/v1/spellcheck/search?q=articifial+inteligence&country=US" \ -H "X-Subscription-Token: " Response: { "type": "spellcheck", "query": { "original": "articifial inteligence" }, "corrected": { "query": "artificial intelligence", "altered": true } } Integration Examples -------------------- async function checkSpelling(query, country = "US") { const params = new URLSearchParams({ q: query, country: country, }); const response = await fetch( `https://api.search.brave.com/res/v1/spellcheck/search?${params}`, { headers: { Accept: "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY", }, } ); return await response.json(); } // Usage const result = await checkSpelling("helo world"); if (result.corrected.altered) { console.log(`Did you mean: ${result.corrected.query}?`); } import requests def check_spelling(query: str, country: str = "US"): url = "https://api.search.brave.com/res/v1/spellcheck/search" headers = { "Accept": "application/json", "Accept-Encoding": "gzip", "X-Subscription-Token": "YOUR_API_KEY" } params = { "q": query, "country": country } response = requests.get(url, headers=headers, params=params) return response.json() # Usage result = check_spelling("helo world") if result["corrected"]["altered"]: print(f"Did you mean: {result['corrected']['query']}?") Best Practices -------------- ### User Experience * **Show Suggestions Gracefully**: Display “Did you mean?” suggestions without forcing corrections * **Preserve User Intent**: Allow users to search for their original query if desired * **Highlight Differences**: Visually indicate which parts of the query were corrected ### Performance Optimization * **Debounce Requests**: Implement debouncing (e.g., 200-300ms) to avoid excessive API calls * **Cache Results**: Cache spell check results for frequently typed queries * **Async Loading**: Check spelling asynchronously without blocking user input ### Integration Patterns // Debounced spell check implementation function debounce(func, wait) { let timeout; return function executedFunction(...args) { const later = () => { clearTimeout(timeout); func(...args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); }; } const debouncedSpellcheck = debounce(async (query) => { const result = await checkSpelling(query); if (result.corrected.altered) { // Show correction suggestion showSuggestion(result.corrected.query); } }, 300); // Call on input change inputElement.addEventListener("input", (e) => { debouncedSpellcheck(e.target.value); }); ### Rate Limiting * Implement client-side throttling to avoid hitting API rate limits * Consider combining spell check with other search operations * Monitor your API usage and adjust debounce timings accordingly Changelog --------- This changelog outlines all significant changes to the Brave Search Spell Check API in chronological order. * **2023-05-01** Initial launch of Brave Search Spell Check API --- # Brave Search - API 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](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=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](https://api-dashboard.search.brave.com/api-reference/summarizer/summarizer_search) 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_info **Looking for the OpenAI-compatible endpoint?** Check out [AI Grounding](https://api-dashboard.search.brave.com/documentation/services/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: " #### 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=&entity_info=1" \ -H "X-Subscription-Token: " 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=&inline_references=true" \ -H "Accept: application/json" \ -H "X-Subscription-Token: " 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=&entity_info=1" \ -H "Accept: application/json" \ -H "X-Subscription-Token: " 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 (`complete` or `failed`) * **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.key` exists in web search response * Handle `failed` status 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.](https://api-dashboard.search.brave.com/documentation/services/summarizer) [AI Grounding\ ------------\ \ **Direct AI answers** using OpenAI-compatible endpoint. Best for building chat interfaces and applications that need instant, grounded AI responses.](https://api-dashboard.search.brave.com/documentation/services/grounding) **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](https://api-dashboard.search.brave.com/documentation/services/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=true` query parameter * Available on `/res/v1/summarizer/search` and `/res/v1/summarizer/summary` endpoints ### 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) --- # Brave Search - API Service APIs Dedicated search for news, with advanced filtering and freshness options Overview -------- News Search lets you send queries and receive relevant news from a specialized index of articles sourced from trusted outlets worldwide. With continuous crawling and indexing, you get access to breaking news, historical articles, and comprehensive coverage for your applications. Key Features ------------ News-Specific Index ------------------- Search across a curated index of news articles from reputable news outlets worldwide Freshness Filtering ------------------- Filter results by discovery date - from last 24 hours to custom date ranges Country & Language Options -------------------------- Target news from specific countries and in preferred languages Extra Snippets -------------- Get up to 5 additional alternative excerpts per result **(AI/Data Plans)** Extra snippets feature is available on **Free AI**, **Base AI**, **Pro AI**, **Base Data**, **Pro Data** and **Custom plans**. [View pricing](https://api-dashboard.search.brave.com/pricing) for more details. API Reference ------------- [News Search API Documentation\ -----------------------------\ \ View the complete API reference, including endpoints, parameters, and example requests](https://api-dashboard.search.brave.com/api-reference/news/news_search/get) Use Cases --------- News Search is perfect for: * **News Aggregation**: Build news applications and aggregators with real-time content * **Media Monitoring**: Track news mentions, brand coverage, and industry trends * **Current Events Analysis**: Monitor breaking news and emerging stories * **Content Discovery**: Find news articles for research and content curation * **Historical News Research**: Access archived news articles with date filtering Freshness Filtering ------------------- News Search offers powerful date-based filtering to help you find the most relevant content: * **Last 24 Hours** (`pd`): Get breaking news and latest updates * **Last 7 Days** (`pw`): Track weekly news trends * **Last 31 Days** (`pm`): Monitor monthly developments * **Last Year** (`py`): Search annual news coverage * **Custom Date Range**: Specify exact timeframes (e.g., `2022-04-01to2022-07-30`) Example request filtering for news from the past week: curl "https://api.search.brave.com/res/v1/news/search?q=climate+summit&freshness=pw" \ -H "X-Subscription-Token: " Country and Language Targeting ------------------------------ Customize your news search results by specifying: * **Country**: Target news from specific countries using 2-character country codes * **Search Language**: Filter results by content language * **UI Language**: Set the preferred language for response metadata Example request for French news from France: curl "https://api.search.brave.com/res/v1/news/search?q=élections&country=FR&search_lang=fr" \ -H "X-Subscription-Token: " Extra Snippets -------------- The extra snippets feature provides up to 5 additional excerpts per search result, giving you more context and alternative perspectives from each article. This is particularly useful for: * Comprehensive content preview * Better relevance assessment * Enhanced user experience in news applications To enable extra snippets: curl "https://api.search.brave.com/res/v1/news/search?q=artificial+intelligence&extra_snippets=true" \ -H "X-Subscription-Token: " Goggles Support --------------- News Search supports [Goggles](https://api-dashboard.search.brave.com/documentation/resources/goggles) , which allow you to apply custom re-ranking on top of search results. You can: * Boost or demote specific news sources * Filter by custom criteria * Create personalized news ranking algorithms Goggles can be provided as a URL or inline definition, and multiple goggles can be combined. Search Operators ---------------- News Search supports [search operators](https://api-dashboard.search.brave.com/documentation/resources/search-operators) to refine your queries: * Use quotes for exact phrase matching: `"climate change"` * Exclude terms with minus: `technology -cryptocurrency` * Site-specific searches: `site:reuters.com elections` Pagination ---------- Efficiently paginate through news results: * **count**: Number of results per page (max 50, default 20) * **offset**: Page number to retrieve (0-based, max 9) Example request for page 2 with 20 results per page: curl "https://api.search.brave.com/res/v1/news/search?q=sports&count=20&offset=1" \ -H "X-Subscription-Token: " Safe Search ----------- Control adult content filtering with the `safesearch` parameter: * **off**: No filtering * **moderate**: Filter explicit content (default) * **strict**: Filter explicit and suggestive content Changelog --------- This changelog outlines all significant changes to the Brave News Search API in chronological order. * **2023-08-15** Add Brave News Search API resource. * **2024-03-20** Add freshness filtering with custom date ranges. * **2024-09-10** Add extra snippets feature for AI and Data plans. * **2025-01-15** Add Goggles support for custom re-ranking. --- # Brave Search - API Resources Privacy notice for Brave Search API customers Updated 4 December 2025 The Brave Search API is provided by Brave Software Inc located in the U.S. ### FOR API CUSTOMERS You must create an account and subscribe to a plan to gain access to the Brave Search API. Data types marked with \* indicate mandatory fields. You will need to provide payment details, and your postal address and billing details. Payment information is processed and held by [Stripe](https://stripe.com/privacy) and is subject to Stripe’s [privacy policy](https://stripe.com/privacy) . Brave does not have access to the personal data processed by Stripe. All subscription plans require payment information, even if you choose a Free plan (this is to help us safeguard against misuse of the service). A record of search queries submitted to the Brave Search API via a customer’s Search API account is retained for a maximum of 90 days for the purpose of billing Search API account holders and for troubleshooting subject to Brave’s legal obligations. As per Section 3b of the [Terms Of Service](https://api-dashboard.search.brave.com/terms-of-service) the Brave Search API customer (Licensee) is solely responsible for complying with applicable data protection law including the posting of any privacy notice with regard to queries submitted by end users via the customer’s API access. Brave does not collect any identifiers that can link a search query to an individual or their devices. You can contact our data protection officer at [privacy@brave.com](mailto:privacy@brave.com) should you have any privacy enquiries about the use of account related data, and to the extent that a search query involves the processing of personal data. ### Brave Search API and Personal Data Brave takes the position that query data sent to Brave Search API is not personal data under laws like the General Data Protection Regulation (GDPR). Brave Search API acts as a conduit – we act on data requests made by our customer’s systems and services, and return search results from our index. It’s no different than conducting a search on [https://search.brave.com](https://search.brave.com/) , except that instead of a person doing the search, a computer is doing it via a programmatic call (the Brave Search API). For our customers, search queries may be personal data, because they may have other information or means that allow them to link back or identify a particular user or query. But Brave has no way to identify which “end user” made any specific query, only that a customer’s account is making an API call. We have no idea who actually made the query, or whether a given query was even about an identifiable individual. This is why we specifically exclude Search Query Data in our Data Processing Addendum. | Purpose of processing | Categories of personal data processed | Legal basis of processing | Duration of storage | | --- | --- | --- | --- | | To create and manage account access | Email address, full name and account UID (assigned by Brave), API Key | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests

Compliance with legal obligations | 12 months from when an account is deleted. | | To provide customer support | User ID, user email, IP address, other information provided by account holder | Necessary for the performance of a contract | Maximum 6 years. | | To process payments | Hashed Stripe identifier, Last 4 credit, expiration date | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests | 12 months from when an account is deleted. | | Invoicing | Account information, client contact information, billing details. | Necessary for the performance of a contract | Returned after contract termination. | | To resolve billing queries and troubleshooting | IP address, authentication token | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests | Search Query Logs: 90 days.

Option for Zero Data Retention (Enterprise clients), subject to Brave’s legal obligations.

**Other Data:** 12 months from when an account is deleted. | | To prevent abuse of the Search API | IP address, authentication token | Legitimate interests. | **Search Query Logs:** 90 days.

Option for Zero Data Retention (Enterprise clients), subject to Brave’s legal obligations.

**Other Data:** 12 months from when an account is deleted. | | Compliance with Brave’s legal obligations | IP address, authentication token, account information | Compliance with legal obligations | To the extent required by law. | * * * List of sub-processors can be found in Annex IV of the data processing addendum. [See our data processing addendum here.](https://cdn.search.brave.com/search-api/web/v1/client/_app/immutable/assets/brave-search-api-dpa-latest.DRXCoye6.pdf) --- # Brave Search - API Service APIs API for AI-generated answers backed by real-time web search and verifiable sources Overview -------- Brave AI Grounding API provides state-of-the-art AI-generated answers backed by verifiable sources from the web. This technology improves the accuracy, relevance, and trustworthiness of AI responses by grounding them in real-time search results. Under the hood, this same service powers Brave’s [Ask Brave](https://brave.com/blog/ask-brave/) feature, which serves millions of answers every day. Brave’s grounded answers demonstrate strong performance across a wide range of queries, from simple trivia questions to complex research inquiries. Notably, Brave achieves **state-of-the-art (SOTA) performance on the SimpleQA benchmark** without being specifically optimized for it—the performance emerges naturally from the system’s design. Access to AI Grounding is available through the **AI Grounding plan**. [Subscribe to AI Grounding](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=grounding) to unlock these capabilities. Key Features ------------ Web-Grounded Answers -------------------- AI responses backed by real-time web search with verifiable citations OpenAI SDK Compatible --------------------- Use the familiar OpenAI SDK for seamless integration SOTA Performance ---------------- State-of-the-art results on SimpleQA benchmark Streaming Support ----------------- Stream answers in real-time with progressive citations Research Mode ------------- Enable multi-search for thorough, research-grade answers Rich Response Data ------------------ Get entities, citations, and structured data with answers API Reference ------------- [AI Grounding API Documentation\ ------------------------------\ \ View the complete API reference, including parameters and response schemas](https://api-dashboard.search.brave.com/api-reference/summarizer/chat_completion) Use Cases --------- AI Grounding is perfect for: * **AI Assistants & Chatbots**: Build intelligent conversational interfaces with factual, cited responses * **Research Applications**: Conduct thorough research with multi-search capabilities * **Question Answering Systems**: Provide accurate answers with source attribution * **Knowledge Applications**: Create tools that need up-to-date, verifiable information * **Content Generation**: Generate well-researched content with citations Endpoint -------- AI Grounding uses a single, OpenAI-compatible endpoint: https://api.search.brave.com/res/v1/chat/completions Quick Start ----------- ### Basic Example with OpenAI SDK from openai import OpenAI client = OpenAI( api_key="YOUR_BRAVE_SEARCH_API_KEY", base_url="https://api.search.brave.com/res/v1", ) completions = client.chat.completions.create( messages=[\ {\ "role": "user",\ "content": "What are the best things to do in Paris with kids?",\ }\ ], model="brave", stream=False, ) print(completions.choices[0].message.content) ### Streaming Example For real-time responses, enable streaming with `AsyncOpenAI`: from openai import AsyncOpenAI import asyncio client = AsyncOpenAI( api_key="YOUR_BRAVE_SEARCH_API_KEY", base_url="https://api.search.brave.com/res/v1", ) async def stream_answer(): async for chunk in await client.chat.completions.create( messages=[\ {\ "role": "user",\ "content": "Explain quantum computing",\ }\ ], model="brave", stream=True, ): if chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True) asyncio.run(stream_answer()) ### Using cURL While the OpenAI SDK is recommended, you can also use cURL: curl -X POST "https://api.search.brave.com/res/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{"stream": false, "messages": [{"role": "user", "content": "What is the second highest mountain?"}]}' \ -H "x-subscription-token: " Single vs Multiple Searches --------------------------- The decision between single-search and multi-search significantly influences both cost efficiency and response time. ### Single Search (Default) * **Speed**: Answers typically stream in under 4.5 seconds on average * **Cost**: Lower cost with minimal computational overhead * **Use Case**: Ideal for real-time applications and most queries * **Performance**: Median SimpleQA benchmark question answered with single search ### Multiple Searches (Research Mode) * **Thoroughness**: Model iteratively refines strategy with sequential searches * **Cost**: Higher due to multiple API calls and larger context processing * **Time**: Response times can extend to minutes * **Use Case**: Best for background tasks prioritizing thoroughness over speed Enable research mode by adding `enable_research: true`: completions = client.chat.completions.create( messages=[{"role": "user", "content": "History of quantum mechanics"}], model="brave", stream=True, extra_body={ "enable_research": True, } ) **Performance note**: On the SimpleQA benchmark, p99 questions required 53 queries analyzing 1000 pages over ~300 seconds. However, reasonable limits are in place based on real-world use cases. Advanced Parameters ------------------- When using the OpenAI SDK, pass additional parameters via `extra_body`: completions = client.chat.completions.create( messages=[{"role": "user", "content": "History of Rome"}], model="brave", stream=True, extra_body={ "country": "IT", "language": "it", "enable_entities": True, "enable_citations": True, "enable_research": False, } ) All advanced parameters: entities, citations and research mode require streaming mode to be `true`. ### Available Parameters * **country** (string): Target country for search results (default: `us`) * **language** (string): Response language (default: `en`) * **enable\_entities** (bool): Include entity information in responses (default: `false`) * **enable\_citations** (bool): Include inline citations (default: `false`) * **enable\_research** (bool): Enable multi-search research mode (default: `false`) Response Format --------------- Because AI Grounding uses custom messages with richer data than standard OpenAI responses, messages are stringified with special tags. When streaming, you’ll receive: ### Standard Text Regular answer content streamed as text. ### Citations {"start_index": 0, "end_index": 10, "number": 1, "url": "https://...", "favicon": "...", "snippet": "..."} ### Entity Items {"uuid": "...", "name": "...", "href": "...", "original_tokens": "...", "citations": [...]} ### Usage Metadata { "X-Request-Requests": 1, "X-Request-Queries": 2, "X-Request-Tokens-In": 1234, "X-Request-Tokens-Out": 300, "X-Request-Requests-Cost": 0, "X-Request-Queries-Cost": 0.008, "X-Request-Tokens-In-Cost": 0.00617, "X-Request-Tokens-Out-Cost": 0.0015, "X-Request-Total-Cost": 0.01567 } Complete Streaming Example -------------------------- Here’s a full example that handles all message types: #!/usr/bin/env python import asyncio import json from openai import AsyncOpenAI client = AsyncOpenAI( api_key="YOUR_BRAVE_SEARCH_API_KEY", base_url="https://api.search.brave.com/res/v1", ) async def main(): async for data in await client.chat.completions.create( messages=[\ {\ "role": "user",\ "content": "albums from lady gaga",\ }\ ], model="brave", stream=True, extra_body={ "country": "us", "language": "en", "enable_citations": True, "enable_research": False, }, ): if choices := data.choices: if delta := choices[0].delta.content: if delta.startswith("") and delta.endswith(""): # Parse citation citation = json.loads( delta.removeprefix("").removesuffix("") ) print(f"[{citation['number']}]({citation['url']})", end="", flush=True) elif delta.startswith("") and delta.endswith(""): # Parse entity item item = json.loads( delta.removeprefix("").removesuffix("") ) print("*", item["original_tokens"], end="", flush=True) elif delta.startswith("") and delta.endswith(""): # Parse usage metadata usage = json.loads( delta.removeprefix("").removesuffix("") ) print("\n\nUsage:", usage) else: # Regular text content print(delta, end="", flush=True) if __name__ == "__main__": asyncio.run(main()) Pricing & Spending Limits ------------------------- AI Grounding uses a usage-based pricing model: **Cost Calculation:** cost = (searches × $4/1000) + (input_tokens × $5/1000000) + (output_tokens × $5/1000000) **Example:** * 2 searches * 1,234 input tokens * 300 output tokens Cost = 2 × (4/1000) + (5/1000000) × 1234 + (5/1000000) × 300 = $0.01567 ### Usage Metadata With each answer, you’ll receive metadata on resource usage: { "X-Request-Requests": 1, "X-Request-Queries": 2, "X-Request-Tokens-In": 1234, "X-Request-Tokens-Out": 300, "X-Request-Requests-Cost": 0, "X-Request-Queries-Cost": 0.008, "X-Request-Tokens-In-Cost": 0.00617, "X-Request-Tokens-Out-Cost": 0.0015, "X-Request-Total-Cost": 0.01567 } When streaming, this metadata comes as the last message. For synchronous requests, the keys above are included in response headers. ### Setting Limits Control your spending by setting monthly credit limits in your [account](https://api-dashboard.search.brave.com/app/subscriptions/usage-limits) . **Limit behavior**: Limits are checked before answering. If limits aren’t exceeded when a question starts, it will be answered in full even if it exceeds limits during processing. You’ll only be charged up to your imposed limit. ### Rate Limits * **Default**: 2 requests per second * **Need more?** Contact [searchapi-support@brave.com](mailto:searchapi-support@brave.com) AI Grounding vs Summarizer Search --------------------------------- Brave offers two complementary approaches for AI-powered search: [AI Grounding\ ------------\ \ **Direct AI answers** using OpenAI-compatible endpoint. Best for building chat interfaces and applications that need instant, grounded AI responses.](https://api-dashboard.search.brave.com/documentation/services/grounding) [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.](https://api-dashboard.search.brave.com/documentation/services/summarizer) **When to use AI Grounding:** * Building conversational AI applications * Need OpenAI SDK compatibility * Want simple, single-endpoint integration * Require research mode for exhaustive answers **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 Learn more about [Summarizer Search](https://api-dashboard.search.brave.com/documentation/services/summarizer) . Best Practices -------------- ### Message Handling * Always handle special message tags (``, ``, ``) * Parse JSON content within tags to extract structured data * Display citations inline for better user trust ### Streaming * Use `AsyncOpenAI` for streaming responses * Display content progressively for better UX * Handle usage metadata at the end of the stream ### Research Mode * Enable only when thoroughness is more important than speed * Best for background processing or complex research queries * Monitor usage as it can incur higher costs ### Error Handling * Implement retry logic for transient failures * Check spending limits before critical operations * Handle rate limit errors gracefully ### Performance * Use single-search mode (default) for most queries * Cache responses when appropriate to minimize API calls * Monitor usage metadata to optimize costs Changelog --------- This changelog outlines all significant changes to the Brave AI Grounding API in chronological order. ### 2025-08-05 * Launch Brave AI Grounding API resource * OpenAI SDK compatibility * Support for single and multi-search modes * SOTA performance on SimpleQA benchmark --- # Brave Search - API Service APIs Search from a large index of web pages with optional local and rich data enrichments Overview -------- Web Search provides access to our comprehensive index of web pages, enabling you to retrieve relevant results from across the internet. Our service crawls and indexes billions of web pages, ensuring fresh and accurate search results for your applications. Key Features ------------ Comprehensive Index ------------------- Search across billions of indexed web pages with fast, reliable results Fresh Results ------------- Regularly updated index ensures you get the most current information Local Enrichments ----------------- Enhanced results with local business data and geographic context **(Pro)** Rich Data Enrichments --------------------- 3rd party data integration for rich real-time results **(Pro)** Local enrichments and rich 3rd party data enrichments require a **Pro level subscription**. [Subscribe to Pro](https://api-dashboard.search.brave.com/app/subscriptions/subscribe) to unlock these advanced features. API Reference ------------- [Web Search API Documentation\ ----------------------------\ \ View the complete API reference, including endpoints, parameters, and example requests](https://api-dashboard.search.brave.com/api-reference/web/search/get) Use Cases --------- Web Search is perfect for: * **Search Applications**: Build custom search experiences for your users * **Content Aggregation**: Gather information from multiple web sources * **Market Research**: Track mentions, trends, and competitor activity * **Data Enrichment**: Supplement your data with web-sourced information Freshness Filtering ------------------- Web Search offers powerful date-based filtering to help you find the most relevant content: * **Last 24 Hours** (`pd`): Get the latest updates and recent content * **Last 7 Days** (`pw`): Track weekly trends and recent discussions * **Last 31 Days** (`pm`): Monitor monthly developments * **Last Year** (`py`): Search content from the past year * **Custom Date Range**: Specify exact timeframes (e.g., `2022-04-01to2022-07-30`) Example request filtering for web pages from the past week: curl "https://api.search.brave.com/res/v1/web/search?q=machine+learning+tutorials&freshness=pw" \ -H "X-Subscription-Token: " Country and Language Targeting ------------------------------ Customize your web search results by specifying: * **Country**: Target results from specific countries using 2-character country codes * **Search Language**: Filter results by content language * **UI Language**: Set the preferred language for response metadata Example request for German content from Germany: curl "https://api.search.brave.com/res/v1/web/search?q=nachhaltige+energie&country=DE&search_lang=de" \ -H "X-Subscription-Token: " Extra Snippets -------------- The extra snippets feature provides up to 5 additional excerpts per search result, giving you more context from each web page. This is particularly useful for: * Comprehensive content preview before clicking through * Better relevance assessment for search applications * Enhanced user experience with richer result cards To enable extra snippets, add the `extra_snippets` query parameter set to `true`: curl "https://api.search.brave.com/res/v1/web/search?q=python+web+frameworks&extra_snippets=true" \ -H "X-Subscription-Token: " When enabled, each result in the `web.results` array will include an additional `extra_snippets` property containing an array of alternative excerpts: { "web": { "results": [\ {\ "title": "Python Web Frameworks",\ "url": "https://example.com/python-frameworks",\ "description": "Main snippet text...",\ "extra_snippets": [\ "First additional excerpt from the page...",\ "Second additional excerpt from the page...",\ "Third additional excerpt from the page..."\ ]\ }\ ] } } Goggles Support --------------- Web Search supports [Goggles](https://api-dashboard.search.brave.com/documentation/resources/goggles) , which allow you to apply custom re-ranking on top of search results. You can: * Boost or demote specific websites and domains * Filter by custom criteria * Create personalized ranking algorithms Goggles can be provided as a URL or inline definition, and multiple goggles can be combined. Search Operators ---------------- Web Search supports [search operators](https://api-dashboard.search.brave.com/documentation/resources/search-operators) to refine your queries. These operators are included directly within the `q` query parameter itself, not as separate API parameters: * Use quotes for exact phrase matching: `"climate change solutions"` * Exclude terms with minus: `javascript -jquery` * Site-specific searches: `site:github.com rust tutorials` * File type searches: `filetype:pdf machine learning` For example, to search for PDF files about machine learning: curl "https://api.search.brave.com/res/v1/web/search?q=machine+learning+filetype:pdf" \ -H "X-Subscription-Token: " Pagination ---------- Efficiently paginate through web search results: * **count**: Maximum number of results per page (max 20, default 20). The actual number of results returned may be less than `count`. * **offset**: Starting position for results (0-based, max 9) Example request for page 2 with up to 20 results per page: curl "https://api.search.brave.com/res/v1/web/search?q=open+source+projects&count=20&offset=1" \ -H "X-Subscription-Token: " ### Best Practice: Check `more_results_available` Rather than blindly iterating with increasing offset values, check the `more_results_available` field in the response to determine if additional pages exist. This field is located in the `query` object of the response: { "query": { "original": "open source projects", "more_results_available": true } } Only request the next page if `more_results_available` is `true`. This prevents unnecessary API calls when no more results are available. Safe Search ----------- Control adult content filtering with the `safesearch` parameter: * **off**: No filtering * **moderate**: Filter explicit content (default) * **strict**: Filter explicit and suggestive content Local enrichments ----------------- Local enrichments provide extra information about places of interest (POI), such as images and the websites where the POI is mentioned. The Local Search API is a **separate endpoint** from Web Search, requiring a two-step process (similar to the Summarizer API). ### Step 1: Query Web Search for Locations First, make a request to the web search endpoint with a location-based query: curl "https://api.search.brave.com/res/v1/web/search?q=greek+restaurants+in+san+francisco" \ -H "X-Subscription-Token: " If the query returns a list of locations, each location result includes an `id` field — a temporary identifier that can be used to retrieve extra information: { "locations": { "results": [\ {\ "id": "1520066f3f39496780c5931d9f7b26a6",\ "title": "Pangea Banquet Mediterranean Food",\ ...\ },\ {\ "id": "d00b153c719a427ea515f9eacf4853a2",\ "title": "Park Mediterranean Grill",\ ...\ },\ {\ "id": "4b943b378725432aa29f019def0f0154",\ "title": "The Halal Mediterranean Co.",\ ...\ }\ ] } } ### Step 2: Fetch Local POI Details Use the `id` values to fetch detailed POI information from the Local Search API endpoints. The `ids` query parameter accepts up to 20 location IDs: curl "https://api.search.brave.com/res/v1/local/pois?ids=1520066f3f39496780c5931d9f7b26a6&ids=d00b153c719a427ea515f9eacf4853a2" \ -H "X-Subscription-Token: " To fetch AI-generated descriptions for locations: curl "https://api.search.brave.com/res/v1/local/descriptions?ids=1520066f3f39496780c5931d9f7b26a6&ids=d00b153c719a427ea515f9eacf4853a2" \ -H "X-Subscription-Token: " ### Local Search API Parameters The Local POIs and Descriptions endpoints support the following parameters: | Parameter | Type | Description | | --- | --- | --- | | `ids` (required) | array | Location IDs from the web search response (max 20) | | `search_lang` | string | Search language preference (ISO 639-1, default: `en`) | | `ui_lang` | string | UI language for response (e.g., `en-US`) | | `units` | string | Measurement units: `metric` or `imperial` | Additionally, you can provide location hints via headers: * `x-loc-lat`: Client latitude (-90.0 to +90.0) * `x-loc-long`: Client longitude (-180.0 to +180.0) For complete API documentation, see the [Local POIs API Reference](https://api-dashboard.search.brave.com/api-reference/local/pois) and [Local Descriptions API Reference](https://api-dashboard.search.brave.com/api-reference/local/descriptions) . Note that the `id` fields of POIs are ephemeral and will expire after approximately 8 hours. Do not store them for later use. Rich Data Enrichments --------------------- Rich Search API responses provide accurate, real-time information about the intent of the query. This data is sourced from 3rd-party API providers and includes verticals such as sports, stocks, and weather. A request must be made to the web search endpoint with the query parameter `enable_rich_callback=1`. An example cURL request for the query `weather in munich` is given below. curl "https://api.search.brave.com/res/v1/web/search?q=weather+in+munich&enable_rich_callback=1" \ -H "X-Subscription-Token: " The Web Search API response contains a `rich` field if the query is expected to return rich results. An example of the `rich` field is given below. { "rich": { "type": "rich", "hint": { "vertical": "weather", "callback_key": "86d06abffc884e9ea281a40f62e0a5a6" } } } The `rich` field of Web Search API response contains a `callback_key` field which can be used to fetch the rich results. An example cURL request to fetch the rich results is given below. curl "https://api.search.brave.com/res/v1/web/rich?callback_key=86d06abffc884e9ea281a40f62e0a5a6" \ -H "X-Subscription-Token: " ### Supported Rich Result Types The Rich Search API provides detailed information across multiple verticals, matching the query intent. Each result includes a `type` field (always set to `rich`) and a `subtype` field indicating the specific vertical. Some of these providers will require attribution for showing this data. #### Calculator Calculator results for mathematical expressions. Use this for queries involving arithmetic operations, complex calculations, and mathematical expressions. #### Definitions Word definitions and meanings. Data provided by [Wordnik](https://wordnik.com/) . #### Unit Conversion Unit conversion calculations and results. Convert between different measurement units (length, weight, volume, temperature, etc.). #### Unix Timestamp Unix timestamp conversion results. Convert between Unix timestamps and human-readable date/time formats. #### Package Tracker Package tracking information. Track shipments and delivery status from various carriers. #### Stock Stock market information and price data. Access real-time stock quotes and intraday changes. Data provided by [FMP](https://financialmodelingprep.com/) . #### Currency Currency conversion results. Provides exchange rates and conversion between different currencies. Data provided by [Fixer](https://fixer.io/) . #### Cryptocurrency Cryptocurrency information and pricing data. Get real-time prices, market data, and trends for digital currencies. Data provided by [CoinGecko](https://coingecko.com/) . #### Weather Weather forecast and current conditions. Get detailed weather information including temperature, precipitation, wind, and extended forecasts. Data provided by [OpenWeatherMap](https://openweathermap.org/) . #### American Football American football scores, schedules, and statistics. **Supported Leagues:** * NFL (USA) * CFB (USA) Data provided by [Stats Perform](https://stats.com/) . #### Baseball Baseball scores, schedules, and statistics. **Supported Leagues:** * MLB (USA) Data provided by [API Sports](https://api-sports.io/) . #### Basketball Basketball scores, schedules, and statistics. **Supported Leagues:** * ABA League (Europe) * BBL: Basket Bundesliga (Germany) * NBA: National Basketball Association (US & Canada) * Liga ACB (Spain) * Eurobasket (Europe) * Euroleague (Europe) * NBL (Australia) * LNB (France) * WNBA (USA) * NBA-G (USA) * Korisliiga (Finland) * Basket League (Greece) * Lega A (Italy) * LKL (Lithuania) * LNBP (Mexico) * LEB Oro (Spain) * LEB Plata (Spain) * Super Ligi (Turkey) * BBL (United Kingdom) Data provided by [API Sports](https://api-sports.io/) . #### Cricket Cricket scores, schedules, and statistics. **Supported Leagues:** * IPL (India) * PSL (Pakistan) Data provided by [Stats Perform](https://stats.com/) . #### Football (Soccer) Football scores, schedules, and statistics. **Supported Leagues:** * Major League Soccer (USA) * English Premier League (UK) * Bundesliga (Germany) * La Liga (Spain) * Serie A (Italy) * UEFA Champions League (International) * UEFA Europa League (International) * UEFA European Championship (International) * FIFA World Cup (International) * FIFA Women’s World Cup (International) * CONMEBOL Copa America (International) * CONMEBOL Libertadores (International) * Ligue 1 (France) * Serie A (Brazil) * Serie B (Brazil) * Copa do Brasil (Brazil) * Primeira Liga (Portugal) * Primera Division (Argentina) * Tipp3 Bundesliga (Austria) * Primera A (Colombia) * NWSL (USA) * Liga MX (Mexico) * Primera Division (Chile) * Primera Division (Peru) * Saudi Arabia Pro League (Saudi Arabia) * Indian Super League (India) * Premier Division (Ireland) * Premier League (Malta) * Campeonato Paulista (Brazil) * Campeonato Paranaense (Brazil) * Campeonato Carioca (Brazil) * Campeonato Mineiro (Brazil) * Eredivisie (Netherlands) Data provided by [API Sports](https://api-sports.io/) . #### Ice Hockey Ice hockey scores, schedules, and statistics. **Supported Leagues:** * NHL: National Hockey League (US & Canada) * Liiga (Finland) Data provided by [API Sports](https://api-sports.io/) . Changelog --------- This changelog outlines all significant changes to the Brave Web Search API in chronological order. * **2023-01-01** Add Brave Web Search API resource. * **2023-04-14** Change `SearchResult` restaurant property to `location`. * **2023-10-11** Add `spellcheck` flag. * **2024-06-11** Add Brave Local Search API resource. * **2025-02-20** Add Brave Rich Search API resource. --- # Brave Search - API Resources Find answers to common questions and get support for the Brave Search API Feedback -------- We want to hear from you! Please answer a few short questions about your experience using the Brave Search API. Your input directly shapes the future of our product and helps us provide the best experience possible. [Take Survey\ -----------\ \ Share your feedback and help us improve](https://survey.brave.com/DI0r8C6LSWW.lGs7YLPwcQ?v=o) FAQ --- ### Subscriptions Which API plan is right for me? Before subscribing to a paid plan, we encourage you to test our API using a free plan. To make sure you pick the right plan, identify your core needs and goals. For general search, i.e. simply querying an index to find relevant results, pick any of the **Data for Search** plans. If you’re looking to use the results for your AI, i.e. feed results to AI models for inference, choose a **Data for AI** plan. If you want to retain the results and/or train your AI models, make sure you subscribe to a **Data with storage rights** plan. Please note the plans don’t come with a storage system - it is up to you how you store the data, as long as you have rights to do so. If your company needs a bespoke, large-data solution, please contact [searchapi-support@brave.com](mailto:searchapi-support@brave.com) . Why is a credit card required to subscribe to a free plan? The credit card serves as an anti-fraud measure to protect Brave from bad actors who want to abuse the free offering (e.g. by combining multiple accounts). Please rest assured your card would never be billed for usage of the free plan, it is used merely to confirm your identity. Do I need a key for every plan I am subscribed to? Yes. After you’ve subscribed to a plan, you will need to generate a new key in the API Keys section - this applies to all plans. You may have up to 3 keys per subscription. What happens if I reach my plan's request limit? If you are subscribed to a plan that has a request limit (Free or Base) and reach this cap, you will get an error message with limits visible as response headers. To avoid this from happening, you can monitor your usage in the dashboard. If you need to run more requests than a plan allows, you’ll need to subscribe to a new (higher tier) plan, after which you’ll need to generate a new key to start using it. What data can be retained? **Data for Search** and **Data for AI** plans do not grant permission to retain any part of the API’s output. You can only retain data received via the API if you are subscribed to a **Data with storage rights** plan. This plan allows you to store the entire output of the API, i.e. the JSON response to a query. For more details, please refer to our [Terms of Service](https://api-dashboard.search.brave.com/resources/terms-of-service) . ### Account How can I change my payment method? Navigate to the [Billing section](https://api-dashboard.search.brave.com/app/settings/billing?tab=payment-method) under Settings and click “Update Payment Method”. You’ll be redirected to a Stripe page where you can enter your new payment details. How can I delete my account? Send us an email from the email address associated with the Brave Search API account you’d like to delete. ### Search Index What powers the Brave Search API? The Brave Search API is powered by Brave Search, a fully independent search engine serving tens of millions of queries per day. Try Brave Search at [search.brave.com](https://search.brave.com/) . Does Brave Search have its own Web crawler? Yes, every search engine that has its own index necessarily has its own Web crawler. The Brave Search crawler does not advertise a differentiated user-agent because we must avoid discrimination from websites that allow only Google to crawl them. However, if a domain or page is not crawlable by any search engine (it has a noindex tag), or if it is not crawlable by googlebot, then Brave Search’s bot will not crawl it either. Brave Search’s crawler is partially powered by information provided by users enrolled in the Web Discovery Project (WDP) option in Brave browser’s search settings, which is an off-by-default (aka opt-in), privacy-preserving system. WDP has multiple mechanisms to prevent Brave from knowing who is contributing what (WDP is also [open-source](https://github.com/brave/web-discovery-project) for auditing and inspection by anyone). Does the Brave Search API surface recent events? Yes. Brave Search fetches millions of web pages every day, offering extensive coverage of recent events around the world. What about copyright? Brave Search API offers a ranked list of web pages that are publicly available; this list also includes information to support why the web page is relevant to the query (for instance via query-dependent snippets based on the content of the web page). The Brave Search API does not grant any rights to third-party content such as web pages. Customers who access URLs displayed in the Brave Search API must ensure their access to those web pages complies with the copyright terms of the page publishers. I don't like the results I'm getting. What am I doing wrong? If you are getting unexpected or suboptimal results via the API and would like to share some feedback, please include the following details in your email: * List of HTTP request parameters sent * List of HTTP headers sent, if any * Plan name used for request If you are comparing results with [Brave Search](https://search.brave.com/) and see a difference, please also include: * From drop down setting in Brave Search: * Search country * Safesearch * Time filter * Local result * From page settings in Brave Search: * Search language * Fallback mixing * Discussions * Summarizer **Please avoid sending any tokens.** Contact ------- For all general inquiries and support, please contact us at [searchapi-support@brave.com](mailto:searchapi-support@brave.com) . --- # Brave Search - API BRAVE SEARCH API TERMS OF USE AGREEMENT ======================================= Last Modified: June 27, 2023 This Brave Search API Terms of Use Agreement (this “**Agreement**”) is by and between Brave Software Inc. (“**Licensor**”) and you (“**you**,” “**your**” and “**Licensee**”). Licensor and Licensee may be referred to herein collectively as the “Parties” or individually as a “Party.” By using or accessing the Services (defined below), completing the online registration and/or payment flow for the Services provided by the Licensor on Licensor’s website, or clicking on a button to accept the terms of this Agreement, you agree to, and to be bound by, the terms and conditions of this Agreement. Subscriptions will automatically renew unless and until cancelled, as particularly described in these terms and conditions. This Agreement is a binding legal agreement between you and Licensor and governs your access to and use of the Services. If you do not understand this Agreement or any of its terms, or do not accept any part of them, you may not use or access the Services. You may not use the Services if you are not of legal age to form a binding contract with Licensor, or if you are barred from using or receiving the Services by applicable law. To purchase and use a Service you must be at least eighteen (18) years old or the age of majority as determined by the laws of the jurisdiction in which you live. If you are accepting this Agreement or using the Services on behalf of a company, organization, government, or other legal entity, you represent and warrant that Licensee has the authority to bind such company, organization, government, or entity to this Agreement, in which case the words “you” and “your” and “Licensee” as used herein shall refer to such entity. If you do not agree to the terms of this Agreement, you may not (and you may not allow any of your personnel to) access or use the Services. 1. Definitions. “**API**” means the Brave Search API application programming interface, any API Documentation and other API Materials made available to Licensee by Licensor, including, without limitation, through [https://api-dashboard.search.brave.com/app/documentation/web-search/get-started](https://api-dashboard.search.brave.com/app/documentation/web-search/get-started) , including any Updates. “**API Documentation**” means the API documentation made available to Licensee by Licensor from time to time, including, without limitation, through [https://api-dashboard.search.brave.com/app/documentation](https://api-dashboard.search.brave.com/app/documentation) . “**API Key**” means the security key Licensor makes available for Licensee to access the API. “**API Materials**” means any information or data made available to you through the API or by any other means authorized by Licensor and any copied and derivative works thereof, including any Content. “**Applications**” means any applications developed by Licensee to interact with the API. “**Content**” means any search results, images, data, third party content, or other content that Licensor makes available to Licensee via the Licensor Offering. “**Licensor Marks**” means Licensor’s proprietary trademarks, trade names, branding, or logos made available for use in connection with the API pursuant to this Agreement. “**Licensor Offering**” means Licensor’s software described on the Website. “**Services**” means the API made available that provide access to the Content, the Licensor Offering, and any API Materials and API Documentation. “**Updates**” means any updates, bug fixes, patches, or other error corrections to the API that Licensor generally makes available free of charge to all licensees of the API. “**Website**” means the Licensor’s website at [https://brave.com/search/api](https://brave.com/search/api) and any subdomains thereof. 2. License. 1. _License Grants_. Subject to and conditioned on Licensee’s payment of Fees and compliance with all terms and conditions set forth in this Agreement, Licensor hereby grants Licensee a limited, revocable, non-exclusive, non-transferable, non-sublicensable license during the term of the Agreement to use the Services to do the following: (i) use the API solely for the purposes of internally developing the Applications that will communicate and interoperate with the Licensor Offering; and (ii) subject to the express prior permission of Licensor, display certain Licensor Marks in compliance with usage guidelines that Licensor may specify from time to time solely in connection with the use of the API and the Applications and not in connection with the advertising, promotion, distribution, or sale of any other products or services. 2. _Use Restrictions_. Licensee shall not use the Services, the API or any Licensor Mark for any purposes beyond the scope of the license granted in this Agreement. Without limiting the foregoing and except as expressly set forth in this Agreement (or in any written modification by Licensor of this Agreement, including modifications that may apply to certain tiers of service), Licensee shall not at any time, and shall not permit others to: 1. store the results of the API or any derivative works from the results of the API (which reference includes, for avoidance of doubt, any API Materials and Content), in whole or in part; 2. rent, lease, lend, sell, sublicense, assign, distribute, publish, transfer, or otherwise make available the API, in whole or in part; 3. reverse engineer, disassemble, decompile, decode, adapt, or otherwise attempt to derive or gain access to any software component of the API, in whole or in part; 4. circumvent or bypass rate limits or service limits through any method, including by creating multiple accounts; 5. remove any proprietary notices from the API; 6. use the API in any manner or for any purpose that infringes, misappropriates, or otherwise violates any intellectual property right or other right of any person, or that violates any applicable law; 7. enter into a licensing agreement that conflicts with this Agreement; 8. use the API in any manner that harms the Licensor, including without limitation, Licensor’s products, services, infrastructure, brand, or goodwill; 9. combine or integrate the API with any software, technology, services, or materials not authorized by Licensor; 10. design or permit the Applications to disable, override, or otherwise interfere with any Licensor-implemented communications to end users, consent screens, user settings, alerts, warning, or the like; 11. use the API in any of the Applications to replicate or attempt to replace the user experience of the Licensor Offering; 12. attempt to cloak or conceal Licensee’s identity or the identity of the Applications when requesting authorization to use the API; 13. copy, store, archive, cache, or create a database of the Content, in whole or in part; 14. redistribute, resell, or sublicense the Content; 15. use the Content as part of any machine learning or similar algorithmic activity, except as expressly permitted by Licensor; 16. use the Content to create, train, evaluate, or improve new or existing services that the Licensee or third parties might offer, except as expressly permitted by Licensor; or 17. upon termination, cancellation, expiration, or other conclusion of this Agreement, retain, or fail to destroy, any and all API Materials in Licensee’s possession and control. 3. _Enterprise Access_. Licensor may in writing vary these terms for enterprise users (“**Enterprise Clients**”). 4. _Reservation of Rights_. Licensor reserves all rights not expressly granted to Licensee in this Agreement, including the right to change rate limits, the size and structure of request responses, and how much Content is provided in the response. Except for the limited rights and licenses expressly granted under this Agreement, nothing in this Agreement grants to Licensee or any third party, by implication, waiver, estoppel, or otherwise, any intellectual property rights or other right, title, or interest in or to the API. 3. Licensee Responsibilities. 1. Licensee is responsible and liable for all uses of the API resulting from access provided by Licensee, directly or indirectly, whether such access or use is permitted by or in violation of this Agreement. Without limiting the generality of the foregoing, Licensee is responsible for all acts and omissions of Licensee’s end users in connection with the Application and their use of the API, if any. Any act or omission by Licensee’s end user that would constitute a breach of this Agreement if taken by Licensee will be deemed a breach of this Agreement by Licensee. Licensee shall make reasonable efforts to make all of Licensee’s end users aware of this Agreement’s provisions applicable to such end user’s use of the API and shall cause end users to comply with such provisions. 2. Licensee must obtain an API Key through the registration process to use and access the API. Registration for an API Key is available at [https://api-dashboard.search.brave.com/app/keys](https://api-dashboard.search.brave.com/app/keys) . Upon registration, Licensee must provide their name, address, and contact details. Licensee may not share the API Key with any third party, must keep the API Key and all log-in information secure, and must use the API Key as Licensee’s sole means of accessing the API. The API Key may be revoked at any time by Licensor. In the event of an unauthorized use of the API Key by a third party, Licensee must inform the Licensee through the method of Notice set forth in this Agreement. 3. Licensee shall comply with all terms and conditions of this Agreement, all applicable laws, rules, and regulations, and all guidelines, standards, and requirements that Licensor may post on this Website, in any documentation and elsewhere from time to time. Licensee shall monitor the use of the Applications for any activity that violates applicable laws, rules, and regulations or any terms and conditions of this Agreement, including any fraudulent, inappropriate, or potentially harmful behavior, and promptly restrict any offending users of the Applications from further use of the Applications. Licensee is solely responsible for posting any privacy notices and obtaining any consents from Licensee’s end users required under applicable laws, rules, and regulations for their use of the Applications. 4. Licensee shall not use the API in connection with or to promote any products, services, or materials that constitute, promote, or are used primarily for the purpose of dealing in spyware, adware, or other malicious programs or code, counterfeit goods, items subject to US embargo, unsolicited mass distribution of email, multi-level marketing proposals, hate materials, hacking, surveillance, interception, or descrambling equipment, libelous, defamatory, obscene, abusive, or otherwise offensive content, stolen products, and items used for theft, hazardous material, or any illegal activities. 5. Licensee will use commercially reasonable efforts to safeguard the API, which reference incudes (for avoidance of doubt) any API Materials and Content (including, in each case, all copies thereof) from infringement, misappropriation, theft, misuse, disclosure, copying, or unauthorized access. Licensee will promptly notify Licensor if Licensee becomes aware of any infringement of any intellectual property rights in the API and will fully cooperate with Licensor in any legal action taken by Licensor to enforce Licensor’s intellectual property rights. 6. Licensee may, in any end product utilizing the API, use the language “POWERED BY BRAVE” to describe the technology utilized by Licensee’s product. Licensor reserves the right to require Licensee to control any use of Licensor Marks on Licensee’s site including, for example, by requiring Licensee to display the Licensor Marks, change the manner of display of Licensor Marks, or by revoking permission to display Licensor Marks, or by directing Licensee to comply with any usage guidelines Licensor may specify from time to time. Licensee agrees that Licensee’s use of the Licensor Marks in connection with this Agreement will not create any right, title, or interest in or to the Licensor Marks in favor of Licensee and all goodwill associated with the use of the Licensor Marks will inure to the benefit of Licensor. Licensee shall not make any statement regarding use of the API or use the Licensor Marks in any way that would suggest partnership with, sponsorship by, or endorsement by Licensor without Licensor’s prior written consent, which may be granted or withheld in Licensor’s sole discretion. Unless we agree otherwise, you agree that we may use your company or product name, screenshots of your Application, or other content or depictions in the course of marketing, promoting, or demonstrating the API. 4. Updates. During the Term, Licensor may provide Licensee Updates, each of which are a part of the API and are subject to the terms and conditions of this Agreement. Licensee acknowledges that Licensor may require Licensee to obtain and use the most recent version of the API. Updates may adversely affect how the Applications communicate with the Licensor Offering. Licensee is required to make any changes to the Applications that are required for integration as a result of such Updates at Licensee’s sole cost and expense. Licensor will make commercially reasonable efforts to provide Licensor with advance notice of material changes or Updates. However, Licensee’s continued use of the API following the Update constitutes binding acceptance of the Update. 5. Fees and Payment. 1. _Fees_. Licensee shall pay Licensor the fees (“**Fees**”) set forth at the Website. Licensee shall make all payments hereunder in US dollars on or before the due date. Licensor may offer a range of payment options that vary by Service, device, operating system, geographic location, or other factors, which may be updated from time to time. These payment options may include web payments using a third-party payment processor (“**Payment Processor**”). When Licensee accesses the API, Licensor Offering, Content, or Services, Licensee agrees (i) to pay the price listed for such items, along with any additional amounts relating to applicable taxes, credit card fees, bank fees, foreign transaction fees, foreign exchange fees, and currency fluctuations, on a recurring basis during the applicable subscription period; and (ii) to abide by any applicable terms of service, privacy policies, or other legal agreements or restrictions (including additional age restrictions) imposed by such Payment Processor in connection with Licensee’s use of a given payment method. The Fees will be automatically applied at the start of the renewal period for the applicable subscription period unless Licensee cancels on the Website. It is Licensee’s responsibility to make sure Licensee’s banking, credit card, debit card, and/or other payment information is up to date, complete and accurate at all times. All payments are non-refundable except as otherwise expressly provided in this Agreement or as required by law. If Licensee fails to pay the Fees as and when due, Licensor may charge interest on the past due amount at the rate of one and one-half percent (1.5%) per month, calculated daily and compounded monthly, or if lower, the highest rate permitted under applicable law, Licensee shall reimburse Licensor for all costs incurred by Licensor in collecting any late payments or interest, including attorneys’ fees, court costs, and collection agency fees, and/or Licensor may in its discretion prohibit or suspend access to the API, Licensor Offering, Content, and any other Services until all past due amounts and interest thereon have been paid, without incurring any obligation or liability to Licensee or any other person by reason of such suspension or prohibition of access to the API, Licensor Offering, Content, and any other Services, or may take any other action permitted by this Agreement, up to and including termination. 2. _Taxes_. All Fees and other amounts payable by Licensee under this Agreement are exclusive of taxes and similar assessments. Licensee is responsible for all sales, use, and excise taxes, and any other similar taxes, duties, and charges of any kind imposed by any federal, state, or local governmental or regulatory authority on any amounts payable by Licensee hereunder, other than any taxes imposed on Licensor’s income. If any taxes are to be withheld on payments Licensee makes to Licensor, Licensee may deduct such taxes from the amount owed to Licensor and pay them to the appropriate taxing authority; provided, however, that Licensee promptly secure and deliver and official receipt for those withholdings and other documents Licensor reasonably requests to claim a foreign tax credit or refund. Licensee must ensure that any taxes withheld are minimized to the extent possible under applicable law. 6. Collection and Use of Information. Licensor may collect certain information through the API or the Licensor Offering about Licensee or any of Licensee’s employees, contractors, or agents. By accessing, using, and providing information to or through the API or the Licensor Offering, Licensee consents to all actions taken by Licensor with respect to Licensee’s information in compliance with the then-current version of Licensor’s privacy policy and data protection requirements, available at [https://api-dashboard.search.brave.com/app/documentation/general/privacy-policy](https://api-dashboard.search.brave.com/app/documentation/general/privacy-policy) . 7. Intellectual Property Ownership. Licensee acknowledges that, as between Licensee and Licensor, Licensor owns all right, title, and interest, including all intellectual property rights, in and to the API (including API Documentation, API Materials and any Content), the Licensor Offering, and the Licensor Marks. 8. Feedback. If Licensee or any of Licensee’s employees, contractors, and agents sends or transmits any communications or materials to Licensor by mail, email, telephone, or otherwise, suggesting or recommending changes to the API, the Licensor Offering, or the Licensor Marks, including without limitation, new features or functionality relating thereto, or any comments, questions, suggestions, or the like (“**Feedback**”), all such Feedback is and will be treated as non-confidential and Licensee hereby assigns to Licensor on Licensee’s behalf, and on behalf of Licensee’s employees, contractors, and agents, all right, title, and interest in, and Licensor is free to use, without any attribution or compensation to Licensee or any third party, any ideas, know-how, concepts, techniques, or other intellectual property rights contained in the Feedback, for any purpose whatsoever, although Licensor is not required to use any Feedback. 9. Disclaimer of Warranties. THE SERVICES ARE PROVIDED “AS IS,” “WHERE IS,” “AS AVAILABLE,” WITH ALL FAULTS, AND LICENSOR SPECIFICALLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, AND ALL WARRANTIES ARISING FROM COURSE OF DEALING, USAGE, OR TRADE PRACTICE. LICENSOR MAKES NO WARRANTY OF ANY KIND THAT THE API, CONTENT, LICENSOR OFFERINGS, OR LICENSOR MARKS, OR ANY PRODUCTS OR RESULTS OF THE USE THEREOF, WILL MEET LICENSEE’S OR ANY OTHER PERSON’S REQUIREMENTS, OPERATE WITHOUT INTERRUPTION, ACHIEVE ANY INTENDED RESULT, BE COMPATIBLE OR WORK WITH ANY OF LICENSEE’S OR ANY THIRD PARTY’S SOFTWARE, SYSTEM, OR OTHER SERVICES, OR BE SECURE, ACCURATE, COMPLETE, FREE OF HARMFUL CODE, OR ERROR-FREE, OR THAT ANY ERRORS OR DEFECTS CAN OR WILL BE CORRECTED. 10. Indemnification. Licensee agrees to indemnify, defend, and hold harmless Licensor and its officers, directors, employees, agents, affiliates, successors, and assigns from and against any and all losses, damages, liabilities, deficiencies, claims, actions, judgments, settlements, interest, awards, penalties, fines, costs, or expenses of whatever kind, including attorneys’ fees, arising from or relating to (a) Licensee’s use or misuse of the API, Licensor Offering, Content, or Licensor Marks; (b) Licensee’s breach of this Agreement; and (c) the Applications, including any end user’s use thereof. In the event Licensor seeks indemnification or defense from Licensee under this provision, Licensor will promptly notify Licensee in writing of the claim(s) brought against Licensor for which Licensor seeks indemnification or defense. Licensor reserves the right, at Licensor’s option and in Licensor’s sole discretion, to assume full control of the defense of claims with legal counsel of Licensor’s choice. Licensee may not enter into any third-party agreement that would, in any manner whatsoever, constitute an admission of fault by Licensor or bind Licensor in any manner, without Licensor’s prior written consent. In the event Licensor assumes control of the defense of such claim, Licensor will not settle any such claim requiring payment from Licensee without Licensee’s prior written approval. 11. Limitations of Liability. TO THE FULLEST EXTENT PERMITTED UNDER APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO LICENSEE OR TO ANY THIRD PARTY UNDER ANY TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY, OR OTHER LEGAL OR EQUITABLE THEORY FOR (a) ANY LOST PROFITS, LOST OR CORRUPTED DATA, COMPUTER FAILURE OR MALFUNCTION, INTERRUPTION OF BUSINESS, OR OTHER SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING OUT OF THE USE OR INABILITY TO USE THE API; OR (b) ANY DAMAGES, IN THE AGGREGATE, IN EXCESS OF THE AMOUNT OF FEES PAID BY LICENSEE TO THE LICENSOR IN THE 12 MONTHS PRECEDING THE DATE OF THE CLAIM EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES AND WHETHER OR NOT SUCH LOSS OR DAMAGES ARE FORESEEABLE OR LICENSOR WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ANY CLAIM LICENSEE MAY HAVE ARISING OUT OF OR RELATING TO THIS AGREEMENT MUST BE BROUGHT WITHIN THREE MONTHS AFTER THE OCCURRENCE OF THE EVENT GIVING RISE TO SUCH CLAIM. 12. Term and Termination. 1. _Term_. The term of this Agreement begins upon Licensee’s acceptance until termination. 2. _Suspension_. Licensor may suspend Licensee’s use of and access to the API, Content, Licensor Offering, or other Services immediately without notice, (i) if Licensor reasonably believes that (A) Licensee’s use would cause damage to, or represent an inordinate burden on, Licensor; (B) Licensee has violated any term of this Agreement; (C) Licensee creates risk or possible legal exposure for Licensor, in Licensor’s sole discretion; (D) the provision of the API, Licensor Offering or Services are no longer commercially viable, in Licensor’s sole discretion; (ii) for prolonged inactivity; (iii) if Licensor is requested or directed to do so by any competent court of law or government authority; or (iv) for failure to pay for the Services. Licensor shall have no liability for damages of any sort arising out of or resulting from any suspension for the reasons set out in this Section 12(b). 3. _Termination_. Subscriptions will automatically renew on a monthly or annual basis unless earlier terminated or otherwise provided in written agreement of the Licensee and Licensor. Licensor reserves the right to terminate any subscription at any time with or without notice, for any reason or no reason, in its sole and absolute discretion. Except where such early termination by Licensor is the result of Licensee’s breach of this Agreement, such early termination will be effective at the end of the then-current subscription period. Licensee may cancel Licensee’s subscription at any time via the Website and Licensee will no longer have access to the API, Licensor Offering, Content, or Services (or any features or functionality thereof) at the end of your then-current subscription term. Any such cancellation must be submitted at least twenty-four (24) hours before the end of the current subscription period. There are no refunds or credits for any partial subscription periods, including in situations where certain features, benefits, and/or services are modified and/or discontinued, except as required by law. SUBSCRIPTION PLANS ARE PRE-PAID, NON-REFUNDABLE (EXCEPT WHERE REQUIRED BY LAW) AND AUTOMATICALLY RENEW AT THE END OF EACH SUBSCRIPTION PERIOD UNLESS EARLIER CANCELED FOLLOWING THE CANCELLATION PROCEDURES BELOW. All payments for Services are final and not refundable or exchangeable, except as required by applicable law. Licensor makes no guarantee as to the nature, quality, or value of the Services or the availability or supply thereof. ALL TRANSACTIONS ARE FINAL, unless Licensee has a right to withdraw pursuant to law. 4. _Effect of Expiration or Termination_. Upon expiration or termination of this Agreement for any reason all licenses and rights granted to Licensee under this Agreement will also terminate and Licensee must cease using, destroy, and permanently erase all copies of the API and Licensor Marks from all devices and systems Licensee directly or indirectly controls. All outstanding payments, if any, will be automatically become due and payable. 5. _Survival_. Any terms that by their nature are intended to continue beyond the termination or expiration of this Agreement, including without limitation Sections 2(b), 2(d), 3(a), 3(c), 3(d), 3(e), 5, 7, 9, 10, 11, 12(b), 12(d), 12(e), 13(b), 13(e), 13(g), and 13(h), will survive termination. 13. Miscellaneous. 1. _Entire Agreement_. This Agreement, together with any other documents incorporated herein by reference, constitutes the sole and entire agreement of the Parties with respect to the subject matter of this Agreement and supersedes all prior and contemporaneous understandings, agreements, and representations and warranties, both written and oral, with respect to such subject matter. In the event of any inconsistency between the statements made in the body of this Agreement and any other documents incorporated herein by reference, this Agreement presides over any other documents incorporated herein by reference. 2. _Damages Not an Adequate Remedy_. The parties declare that it is impossible to measure in money the damages which will accrue to Licensor by reason of a failure by Licensee to perform any of the obligations under this Agreement and therefore injunctive relief is appropriate. Any breach or threatened breach of this Agreement, and, in particular, of Section 2 and Section 3, may, in some cases, give rise to irreparable harm to Licensor, for which monetary damages would not be an adequate remedy. As such, the Licensee agrees that Licensor shall, in addition to its other rights and remedies, at law or in equity, that may be available in respect of such breach, be entitled to equitable relief, including a temporary restraining order, injunction, specific performance, or any other relief that may be available from a court of competent jurisdiction. If Licensor shall institute any action or proceeding to enforce the provisions hereof, Licensee hereby agrees that Licensor shall be entitled to apply for any available remedy and irrevocably waives the claim or defense that such party has an adequate remedy at law, and Licensee shall not urge in any such action or proceeding the claim or defense that such party has an adequate remedy at law. 3. _Force Majeure_. Licensor will not be in default if performance is delayed or prevented for reasons beyond its control, so long as it resumes performance as soon as is practical. 4. _No Joint Venture_. Licensor and Licensee are acting as independent contractors, and nothing in this Agreement will be construed as creating a partnership, franchise, joint venture, employer-employee or agency relationship. 5. _Notices_. All notices, requests, consents, claims, demands, waivers, and other communications hereunder (each, a “**Notice**”) from the Licensee to the Licensor must be delivered to licensor at 580 Howard St., Unit 402, San Francisco, CA 94105, by registered mail, return receipt requested. All Notices from the Licensor to the Licensee will be electronically delivered to the email address associated with the Licensee’s Brave Search API account. If Licensee does not consent to receive Notices electronically, the Licensee must stop using the Licensor Offering. Except as otherwise provided in this Agreement, a Notice is effective only: (i) upon receipt by the receiving Party and (ii) if the Party giving the Notice has complied with the requirements of this Section. 6. _Amendment and Modification; Waiver_. Licensee acknowledges and agrees that Licensor has the right, in its sole discretion, to modify this Agreement from time to time. All changes are effective immediately when we post them and apply to all access to, and use of, the Services thereafter. Licensor will notify Licensee of the modifications through such means as it deems appropriate, including but not limited to email, notifications, or posts on the Website, but receipt of such notification shall not limit enforceability of such modification or amendment. Your continued use of the Services following the posting of a revised Agreement means you accept and agree to the changes. Except as otherwise set forth in this Agreement, (i) no failure to exercise, or delay in exercising, any rights, remedy, power, or privilege arising from this Agreement will operate or be construed as a waiver thereof and (ii) no single or partial exercise of any right, remedy, power, or privilege hereunder will preclude any other or further exercise thereof or the exercise of any other right, remedy, power, or privilege. 7. _Severability_. If any provision of this Agreement is invalid, illegal, or unenforceable in any jurisdiction, such invalidity, illegality, or unenforceability will not affect any other term or provision of this Agreement or invalidate or render unenforceable such term or provision in any other jurisdiction. Upon such determination that any term or other provision is invalid, illegal, or unenforceable, the Parties shall negotiate in good faith to modify this Agreement so as to affect the original intent of the Parties as closely as possible in a mutually acceptable manner in order that the transactions contemplated hereby be consummated as originally contemplated to the greatest extent possible. 8. _Governing Law and Jurisdiction_. This agreement is governed by and construed in accordance with the internal laws of the State of California without giving effect to any choice or conflict of law provision or rule that would require or permit the application of the laws of any jurisdiction other than those of the State of California. Any legal suit, action, or proceeding arising out of or related to this agreement or the licenses granted hereunder will be instituted exclusively in the federal courts of the United States or the courts of the State of California, in each case located in the city and County of San Francisco, and each party irrevocably submits to the exclusive jurisdiction of such courts in any such suit, action, or proceeding. 9. _Assignment_. Licensee may not assign or transfer any of its rights or delegate any of its obligations hereunder, in each case whether voluntarily, involuntarily, by operation of law, or otherwise, without the prior written consent of Licensor, which consent shall not be unreasonably withheld, conditioned, or delayed. Any purported assignment, transfer, or delegation in violation of this Section is null and void. The Licensor may assign or transfer all rights and obligations hereunder fully or partially without notice to the Licensee. --- # Brave Search - API Create a new account to get started with Brave Search API. ### Account details Email Password Verify password ### Account holder details Full name Company name Where did you hear about Brave Search API? A friend or colleagueSocial media (e.g. LinkedIn or X)Chatbot / answer engine (e.g. ChatGPT)Search engine (e.g. Google)An event or hackathonMCP documentationA Research PaperDiscovered by using Brave browser or Brave SearchOther (please specify) Registration is subject to our Search API [privacy notice](https://api-dashboard.search.brave.com/privacy-policy) and [terms of service](https://api-dashboard.search.brave.com/terms-of-service) . We encourage you to read them. Register Verifying you're a human being... Already have an account? [Login](https://api-dashboard.search.brave.com/login) --- # Brave Search - API Enter your email address to reset your password. Email Request reset Verifying you're a human being... [Back to login.](https://api-dashboard.search.brave.com/login) --- # Brave Search - API Service APIs Search from a large index of web pages with optional local and rich data enrichments Overview -------- Web Search provides access to our comprehensive index of web pages, enabling you to retrieve relevant results from across the internet. Our service crawls and indexes billions of web pages, ensuring fresh and accurate search results for your applications. Key Features ------------ Comprehensive Index ------------------- Search across billions of indexed web pages with fast, reliable results Fresh Results ------------- Regularly updated index ensures you get the most current information Local Enrichments ----------------- Enhanced results with local business data and geographic context **(Pro)** Rich Data Enrichments --------------------- 3rd party data integration for rich real-time results **(Pro)** Local enrichments and rich 3rd party data enrichments require a **Pro level subscription**. [Subscribe to Pro](https://api-dashboard.search.brave.com/app/subscriptions/subscribe) to unlock these advanced features. API Reference ------------- [Web Search API Documentation\ ----------------------------\ \ View the complete API reference, including endpoints, parameters, and example requests](https://api-dashboard.search.brave.com/api-reference/web/search/get) Use Cases --------- Web Search is perfect for: * **Search Applications**: Build custom search experiences for your users * **Content Aggregation**: Gather information from multiple web sources * **Market Research**: Track mentions, trends, and competitor activity * **Data Enrichment**: Supplement your data with web-sourced information Freshness Filtering ------------------- Web Search offers powerful date-based filtering to help you find the most relevant content: * **Last 24 Hours** (`pd`): Get the latest updates and recent content * **Last 7 Days** (`pw`): Track weekly trends and recent discussions * **Last 31 Days** (`pm`): Monitor monthly developments * **Last Year** (`py`): Search content from the past year * **Custom Date Range**: Specify exact timeframes (e.g., `2022-04-01to2022-07-30`) Example request filtering for web pages from the past week: curl "https://api.search.brave.com/res/v1/web/search?q=machine+learning+tutorials&freshness=pw" \ -H "X-Subscription-Token: " Country and Language Targeting ------------------------------ Customize your web search results by specifying: * **Country**: Target results from specific countries using 2-character country codes * **Search Language**: Filter results by content language * **UI Language**: Set the preferred language for response metadata Example request for German content from Germany: curl "https://api.search.brave.com/res/v1/web/search?q=nachhaltige+energie&country=DE&search_lang=de" \ -H "X-Subscription-Token: " Extra Snippets -------------- The extra snippets feature provides up to 5 additional excerpts per search result, giving you more context from each web page. This is particularly useful for: * Comprehensive content preview before clicking through * Better relevance assessment for search applications * Enhanced user experience with richer result cards To enable extra snippets, add the `extra_snippets` query parameter set to `true`: curl "https://api.search.brave.com/res/v1/web/search?q=python+web+frameworks&extra_snippets=true" \ -H "X-Subscription-Token: " When enabled, each result in the `web.results` array will include an additional `extra_snippets` property containing an array of alternative excerpts: { "web": { "results": [\ {\ "title": "Python Web Frameworks",\ "url": "https://example.com/python-frameworks",\ "description": "Main snippet text...",\ "extra_snippets": [\ "First additional excerpt from the page...",\ "Second additional excerpt from the page...",\ "Third additional excerpt from the page..."\ ]\ }\ ] } } Goggles Support --------------- Web Search supports [Goggles](https://api-dashboard.search.brave.com/documentation/resources/goggles) , which allow you to apply custom re-ranking on top of search results. You can: * Boost or demote specific websites and domains * Filter by custom criteria * Create personalized ranking algorithms Goggles can be provided as a URL or inline definition, and multiple goggles can be combined. Search Operators ---------------- Web Search supports [search operators](https://api-dashboard.search.brave.com/documentation/resources/search-operators) to refine your queries. These operators are included directly within the `q` query parameter itself, not as separate API parameters: * Use quotes for exact phrase matching: `"climate change solutions"` * Exclude terms with minus: `javascript -jquery` * Site-specific searches: `site:github.com rust tutorials` * File type searches: `filetype:pdf machine learning` For example, to search for PDF files about machine learning: curl "https://api.search.brave.com/res/v1/web/search?q=machine+learning+filetype:pdf" \ -H "X-Subscription-Token: " Pagination ---------- Efficiently paginate through web search results: * **count**: Maximum number of results per page (max 20, default 20). The actual number of results returned may be less than `count`. * **offset**: Starting position for results (0-based, max 9) Example request for page 2 with up to 20 results per page: curl "https://api.search.brave.com/res/v1/web/search?q=open+source+projects&count=20&offset=1" \ -H "X-Subscription-Token: " ### Best Practice: Check `more_results_available` Rather than blindly iterating with increasing offset values, check the `more_results_available` field in the response to determine if additional pages exist. This field is located in the `query` object of the response: { "query": { "original": "open source projects", "more_results_available": true } } Only request the next page if `more_results_available` is `true`. This prevents unnecessary API calls when no more results are available. Safe Search ----------- Control adult content filtering with the `safesearch` parameter: * **off**: No filtering * **moderate**: Filter explicit content (default) * **strict**: Filter explicit and suggestive content Local enrichments ----------------- Local enrichments provide extra information about places of interest (POI), such as images and the websites where the POI is mentioned. The Local Search API is a **separate endpoint** from Web Search, requiring a two-step process (similar to the Summarizer API). ### Step 1: Query Web Search for Locations First, make a request to the web search endpoint with a location-based query: curl "https://api.search.brave.com/res/v1/web/search?q=greek+restaurants+in+san+francisco" \ -H "X-Subscription-Token: " If the query returns a list of locations, each location result includes an `id` field — a temporary identifier that can be used to retrieve extra information: { "locations": { "results": [\ {\ "id": "1520066f3f39496780c5931d9f7b26a6",\ "title": "Pangea Banquet Mediterranean Food",\ ...\ },\ {\ "id": "d00b153c719a427ea515f9eacf4853a2",\ "title": "Park Mediterranean Grill",\ ...\ },\ {\ "id": "4b943b378725432aa29f019def0f0154",\ "title": "The Halal Mediterranean Co.",\ ...\ }\ ] } } ### Step 2: Fetch Local POI Details Use the `id` values to fetch detailed POI information from the Local Search API endpoints. The `ids` query parameter accepts up to 20 location IDs: curl "https://api.search.brave.com/res/v1/local/pois?ids=1520066f3f39496780c5931d9f7b26a6&ids=d00b153c719a427ea515f9eacf4853a2" \ -H "X-Subscription-Token: " To fetch AI-generated descriptions for locations: curl "https://api.search.brave.com/res/v1/local/descriptions?ids=1520066f3f39496780c5931d9f7b26a6&ids=d00b153c719a427ea515f9eacf4853a2" \ -H "X-Subscription-Token: " ### Local Search API Parameters The Local POIs and Descriptions endpoints support the following parameters: | Parameter | Type | Description | | --- | --- | --- | | `ids` (required) | array | Location IDs from the web search response (max 20) | | `search_lang` | string | Search language preference (ISO 639-1, default: `en`) | | `ui_lang` | string | UI language for response (e.g., `en-US`) | | `units` | string | Measurement units: `metric` or `imperial` | Additionally, you can provide location hints via headers: * `x-loc-lat`: Client latitude (-90.0 to +90.0) * `x-loc-long`: Client longitude (-180.0 to +180.0) For complete API documentation, see the [Local POIs API Reference](https://api-dashboard.search.brave.com/api-reference/local/pois) and [Local Descriptions API Reference](https://api-dashboard.search.brave.com/api-reference/local/descriptions) . Note that the `id` fields of POIs are ephemeral and will expire after approximately 8 hours. Do not store them for later use. Rich Data Enrichments --------------------- Rich Search API responses provide accurate, real-time information about the intent of the query. This data is sourced from 3rd-party API providers and includes verticals such as sports, stocks, and weather. A request must be made to the web search endpoint with the query parameter `enable_rich_callback=1`. An example cURL request for the query `weather in munich` is given below. curl "https://api.search.brave.com/res/v1/web/search?q=weather+in+munich&enable_rich_callback=1" \ -H "X-Subscription-Token: " The Web Search API response contains a `rich` field if the query is expected to return rich results. An example of the `rich` field is given below. { "rich": { "type": "rich", "hint": { "vertical": "weather", "callback_key": "86d06abffc884e9ea281a40f62e0a5a6" } } } The `rich` field of Web Search API response contains a `callback_key` field which can be used to fetch the rich results. An example cURL request to fetch the rich results is given below. curl "https://api.search.brave.com/res/v1/web/rich?callback_key=86d06abffc884e9ea281a40f62e0a5a6" \ -H "X-Subscription-Token: " ### Supported Rich Result Types The Rich Search API provides detailed information across multiple verticals, matching the query intent. Each result includes a `type` field (always set to `rich`) and a `subtype` field indicating the specific vertical. Some of these providers will require attribution for showing this data. #### Calculator Calculator results for mathematical expressions. Use this for queries involving arithmetic operations, complex calculations, and mathematical expressions. #### Definitions Word definitions and meanings. Data provided by [Wordnik](https://wordnik.com/) . #### Unit Conversion Unit conversion calculations and results. Convert between different measurement units (length, weight, volume, temperature, etc.). #### Unix Timestamp Unix timestamp conversion results. Convert between Unix timestamps and human-readable date/time formats. #### Package Tracker Package tracking information. Track shipments and delivery status from various carriers. #### Stock Stock market information and price data. Access real-time stock quotes and intraday changes. Data provided by [FMP](https://financialmodelingprep.com/) . #### Currency Currency conversion results. Provides exchange rates and conversion between different currencies. Data provided by [Fixer](https://fixer.io/) . #### Cryptocurrency Cryptocurrency information and pricing data. Get real-time prices, market data, and trends for digital currencies. Data provided by [CoinGecko](https://coingecko.com/) . #### Weather Weather forecast and current conditions. Get detailed weather information including temperature, precipitation, wind, and extended forecasts. Data provided by [OpenWeatherMap](https://openweathermap.org/) . #### American Football American football scores, schedules, and statistics. **Supported Leagues:** * NFL (USA) * CFB (USA) Data provided by [Stats Perform](https://stats.com/) . #### Baseball Baseball scores, schedules, and statistics. **Supported Leagues:** * MLB (USA) Data provided by [API Sports](https://api-sports.io/) . #### Basketball Basketball scores, schedules, and statistics. **Supported Leagues:** * ABA League (Europe) * BBL: Basket Bundesliga (Germany) * NBA: National Basketball Association (US & Canada) * Liga ACB (Spain) * Eurobasket (Europe) * Euroleague (Europe) * NBL (Australia) * LNB (France) * WNBA (USA) * NBA-G (USA) * Korisliiga (Finland) * Basket League (Greece) * Lega A (Italy) * LKL (Lithuania) * LNBP (Mexico) * LEB Oro (Spain) * LEB Plata (Spain) * Super Ligi (Turkey) * BBL (United Kingdom) Data provided by [API Sports](https://api-sports.io/) . #### Cricket Cricket scores, schedules, and statistics. **Supported Leagues:** * IPL (India) * PSL (Pakistan) Data provided by [Stats Perform](https://stats.com/) . #### Football (Soccer) Football scores, schedules, and statistics. **Supported Leagues:** * Major League Soccer (USA) * English Premier League (UK) * Bundesliga (Germany) * La Liga (Spain) * Serie A (Italy) * UEFA Champions League (International) * UEFA Europa League (International) * UEFA European Championship (International) * FIFA World Cup (International) * FIFA Women’s World Cup (International) * CONMEBOL Copa America (International) * CONMEBOL Libertadores (International) * Ligue 1 (France) * Serie A (Brazil) * Serie B (Brazil) * Copa do Brasil (Brazil) * Primeira Liga (Portugal) * Primera Division (Argentina) * Tipp3 Bundesliga (Austria) * Primera A (Colombia) * NWSL (USA) * Liga MX (Mexico) * Primera Division (Chile) * Primera Division (Peru) * Saudi Arabia Pro League (Saudi Arabia) * Indian Super League (India) * Premier Division (Ireland) * Premier League (Malta) * Campeonato Paulista (Brazil) * Campeonato Paranaense (Brazil) * Campeonato Carioca (Brazil) * Campeonato Mineiro (Brazil) * Eredivisie (Netherlands) Data provided by [API Sports](https://api-sports.io/) . #### Ice Hockey Ice hockey scores, schedules, and statistics. **Supported Leagues:** * NHL: National Hockey League (US & Canada) * Liiga (Finland) Data provided by [API Sports](https://api-sports.io/) . Changelog --------- This changelog outlines all significant changes to the Brave Web Search API in chronological order. * **2023-01-01** Add Brave Web Search API resource. * **2023-04-14** Change `SearchResult` restaurant property to `location`. * **2023-10-11** Add `spellcheck` flag. * **2024-06-11** Add Brave Local Search API resource. * **2025-02-20** Add Brave Rich Search API resource. --- # Brave Search - API Overview Privacy-first search infrastructure for developers The Brave Search API gives you access to the same powerful, independent search index that powers Brave Search - the privacy-first search engine trusted by millions. Built from the ground up without relying on Google or Bing, our API delivers unbiased, high-quality search results for your applications. With comprehensive coverage across web search, news, images, videos, and advanced AI capabilities, the Brave Search API provides everything you need to build privacy-respecting search experiences. [Get started\ -----------\ \ Get your API key and make your first request in minutes.](https://api-dashboard.search.brave.com/documentation/quickstart) Search APIs ----------- Choose the right search API for your use case. [Web Search\ ----------\ \ Access billions of web pages with our core search API. Includes local results and rich content enhancements.](https://api-dashboard.search.brave.com/documentation/services/web-search) [News Search\ -----------\ \ Get real-time news articles from thousands of trusted sources worldwide.](https://api-dashboard.search.brave.com/documentation/services/news-search) [Image Search\ ------------\ \ Search through billions of images with advanced filtering and SafeSearch options.](https://api-dashboard.search.brave.com/documentation/services/image-search) [Videos Search\ -------------\ \ Find video content from across the web with metadata and thumbnails.](https://api-dashboard.search.brave.com/documentation/services/video-search) AI-Powered Features ------------------- Enhance your applications with advanced AI capabilities. [AI Summarizer\ -------------\ \ Get AI-generated summaries of search results to provide quick insights to your users.](https://api-dashboard.search.brave.com/documentation/services/summarizer) [Grounding\ ---------\ \ Ground your AI applications with real-time, accurate search data to reduce hallucinations.](https://api-dashboard.search.brave.com/documentation/services/grounding) Why Brave Search API? --------------------- Independent Index ----------------- Our own search index means no dependence on Big Tech and no hidden biases. Privacy-First ------------- Built with privacy at the core. No user tracking or profiling. High Quality ------------ Comprehensive coverage with billions of pages indexed and updated in real-time. Rich Results ------------ Enhanced results with local information, knowledge graphs, and structured data. Flexible Plans -------------- Scalable pricing from free tier to enterprise solutions. Fast & Reliable --------------- Best-in-class latencies and 99.9% uptime. Ready to get started? --------------------- [API Reference\ -------------\ \ Explore our complete API reference with interactive examples.](https://api-dashboard.search.brave.com/api-reference/web/search/get) --- # Brave Search - API Getting started Explore the Brave Search API pricing plans and features $ 0.00 credit card required via Stripe * 1 request per second * 2,000 requests per month [Sign up](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=normal) * Web search * Goggles * News cluster * Videos cluster * Videos * News * Images * Schema-enriched Web results * Infobox * FAQ * Discussions * Locations * Extra alternate snippets for AI * Rights to use data for AI inference * Rights to store data $ 3.00 per 1,000 requests * 20 requests per second * 20,000,000 requests per month [Sign up](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=normal) * Web search * Goggles * News cluster * Videos cluster * Videos * News * Images * Schema-enriched Web results * Infobox * FAQ * Discussions * Locations * Extra alternate snippets for AI * Rights to use data for AI inference * Rights to store data $ 5.00 per 1,000 requests * 50 requests per second * Unlimited requests [Sign up](https://api-dashboard.search.brave.com/app/subscriptions/subscribe?tab=normal) * Web search * Goggles * News cluster * Videos cluster * Videos * News * Images * Schema-enriched Web results * Infobox * FAQ * Discussions * Locations * Extra alternate snippets for AI * Rights to use data for AI inference * Rights to store data [Looking for a custom plan?\ --------------------------\ \ Get a tailor-made solution by reaching out to us directly.](mailto:searchapi-support@brave.com) --- # Brave Search - API Resources Privacy notice for Brave Search API customers Updated 4 December 2025 The Brave Search API is provided by Brave Software Inc located in the U.S. ### FOR API CUSTOMERS You must create an account and subscribe to a plan to gain access to the Brave Search API. Data types marked with \* indicate mandatory fields. You will need to provide payment details, and your postal address and billing details. Payment information is processed and held by [Stripe](https://stripe.com/privacy) and is subject to Stripe’s [privacy policy](https://stripe.com/privacy) . Brave does not have access to the personal data processed by Stripe. All subscription plans require payment information, even if you choose a Free plan (this is to help us safeguard against misuse of the service). A record of search queries submitted to the Brave Search API via a customer’s Search API account is retained for a maximum of 90 days for the purpose of billing Search API account holders and for troubleshooting subject to Brave’s legal obligations. As per Section 3b of the [Terms Of Service](https://api-dashboard.search.brave.com/terms-of-service) the Brave Search API customer (Licensee) is solely responsible for complying with applicable data protection law including the posting of any privacy notice with regard to queries submitted by end users via the customer’s API access. Brave does not collect any identifiers that can link a search query to an individual or their devices. You can contact our data protection officer at [privacy@brave.com](mailto:privacy@brave.com) should you have any privacy enquiries about the use of account related data, and to the extent that a search query involves the processing of personal data. ### Brave Search API and Personal Data Brave takes the position that query data sent to Brave Search API is not personal data under laws like the General Data Protection Regulation (GDPR). Brave Search API acts as a conduit – we act on data requests made by our customer’s systems and services, and return search results from our index. It’s no different than conducting a search on [https://search.brave.com](https://search.brave.com/) , except that instead of a person doing the search, a computer is doing it via a programmatic call (the Brave Search API). For our customers, search queries may be personal data, because they may have other information or means that allow them to link back or identify a particular user or query. But Brave has no way to identify which “end user” made any specific query, only that a customer’s account is making an API call. We have no idea who actually made the query, or whether a given query was even about an identifiable individual. This is why we specifically exclude Search Query Data in our Data Processing Addendum. | Purpose of processing | Categories of personal data processed | Legal basis of processing | Duration of storage | | --- | --- | --- | --- | | To create and manage account access | Email address, full name and account UID (assigned by Brave), API Key | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests

Compliance with legal obligations | 12 months from when an account is deleted. | | To provide customer support | User ID, user email, IP address, other information provided by account holder | Necessary for the performance of a contract | Maximum 6 years. | | To process payments | Hashed Stripe identifier, Last 4 credit, expiration date | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests | 12 months from when an account is deleted. | | Invoicing | Account information, client contact information, billing details. | Necessary for the performance of a contract | Returned after contract termination. | | To resolve billing queries and troubleshooting | IP address, authentication token | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests | Search Query Logs: 90 days.

Option for Zero Data Retention (Enterprise clients), subject to Brave’s legal obligations.

**Other Data:** 12 months from when an account is deleted. | | To prevent abuse of the Search API | IP address, authentication token | Legitimate interests. | **Search Query Logs:** 90 days.

Option for Zero Data Retention (Enterprise clients), subject to Brave’s legal obligations.

**Other Data:** 12 months from when an account is deleted. | | Compliance with Brave’s legal obligations | IP address, authentication token, account information | Compliance with legal obligations | To the extent required by law. | * * * List of sub-processors can be found in Annex IV of the data processing addendum. [See our data processing addendum here.](https://cdn.search.brave.com/search-api/web/v1/client/_app/immutable/assets/brave-search-api-dpa-latest.DRXCoye6.pdf) --- # Brave Search - API BRAVE SEARCH API TERMS OF USE AGREEMENT ======================================= Last Modified: June 27, 2023 This Brave Search API Terms of Use Agreement (this “**Agreement**”) is by and between Brave Software Inc. (“**Licensor**”) and you (“**you**,” “**your**” and “**Licensee**”). Licensor and Licensee may be referred to herein collectively as the “Parties” or individually as a “Party.” By using or accessing the Services (defined below), completing the online registration and/or payment flow for the Services provided by the Licensor on Licensor’s website, or clicking on a button to accept the terms of this Agreement, you agree to, and to be bound by, the terms and conditions of this Agreement. Subscriptions will automatically renew unless and until cancelled, as particularly described in these terms and conditions. This Agreement is a binding legal agreement between you and Licensor and governs your access to and use of the Services. If you do not understand this Agreement or any of its terms, or do not accept any part of them, you may not use or access the Services. You may not use the Services if you are not of legal age to form a binding contract with Licensor, or if you are barred from using or receiving the Services by applicable law. To purchase and use a Service you must be at least eighteen (18) years old or the age of majority as determined by the laws of the jurisdiction in which you live. If you are accepting this Agreement or using the Services on behalf of a company, organization, government, or other legal entity, you represent and warrant that Licensee has the authority to bind such company, organization, government, or entity to this Agreement, in which case the words “you” and “your” and “Licensee” as used herein shall refer to such entity. If you do not agree to the terms of this Agreement, you may not (and you may not allow any of your personnel to) access or use the Services. 1. Definitions. “**API**” means the Brave Search API application programming interface, any API Documentation and other API Materials made available to Licensee by Licensor, including, without limitation, through [https://api-dashboard.search.brave.com/app/documentation/web-search/get-started](https://api-dashboard.search.brave.com/app/documentation/web-search/get-started) , including any Updates. “**API Documentation**” means the API documentation made available to Licensee by Licensor from time to time, including, without limitation, through [https://api-dashboard.search.brave.com/app/documentation](https://api-dashboard.search.brave.com/app/documentation) . “**API Key**” means the security key Licensor makes available for Licensee to access the API. “**API Materials**” means any information or data made available to you through the API or by any other means authorized by Licensor and any copied and derivative works thereof, including any Content. “**Applications**” means any applications developed by Licensee to interact with the API. “**Content**” means any search results, images, data, third party content, or other content that Licensor makes available to Licensee via the Licensor Offering. “**Licensor Marks**” means Licensor’s proprietary trademarks, trade names, branding, or logos made available for use in connection with the API pursuant to this Agreement. “**Licensor Offering**” means Licensor’s software described on the Website. “**Services**” means the API made available that provide access to the Content, the Licensor Offering, and any API Materials and API Documentation. “**Updates**” means any updates, bug fixes, patches, or other error corrections to the API that Licensor generally makes available free of charge to all licensees of the API. “**Website**” means the Licensor’s website at [https://brave.com/search/api](https://brave.com/search/api) and any subdomains thereof. 2. License. 1. _License Grants_. Subject to and conditioned on Licensee’s payment of Fees and compliance with all terms and conditions set forth in this Agreement, Licensor hereby grants Licensee a limited, revocable, non-exclusive, non-transferable, non-sublicensable license during the term of the Agreement to use the Services to do the following: (i) use the API solely for the purposes of internally developing the Applications that will communicate and interoperate with the Licensor Offering; and (ii) subject to the express prior permission of Licensor, display certain Licensor Marks in compliance with usage guidelines that Licensor may specify from time to time solely in connection with the use of the API and the Applications and not in connection with the advertising, promotion, distribution, or sale of any other products or services. 2. _Use Restrictions_. Licensee shall not use the Services, the API or any Licensor Mark for any purposes beyond the scope of the license granted in this Agreement. Without limiting the foregoing and except as expressly set forth in this Agreement (or in any written modification by Licensor of this Agreement, including modifications that may apply to certain tiers of service), Licensee shall not at any time, and shall not permit others to: 1. store the results of the API or any derivative works from the results of the API (which reference includes, for avoidance of doubt, any API Materials and Content), in whole or in part; 2. rent, lease, lend, sell, sublicense, assign, distribute, publish, transfer, or otherwise make available the API, in whole or in part; 3. reverse engineer, disassemble, decompile, decode, adapt, or otherwise attempt to derive or gain access to any software component of the API, in whole or in part; 4. circumvent or bypass rate limits or service limits through any method, including by creating multiple accounts; 5. remove any proprietary notices from the API; 6. use the API in any manner or for any purpose that infringes, misappropriates, or otherwise violates any intellectual property right or other right of any person, or that violates any applicable law; 7. enter into a licensing agreement that conflicts with this Agreement; 8. use the API in any manner that harms the Licensor, including without limitation, Licensor’s products, services, infrastructure, brand, or goodwill; 9. combine or integrate the API with any software, technology, services, or materials not authorized by Licensor; 10. design or permit the Applications to disable, override, or otherwise interfere with any Licensor-implemented communications to end users, consent screens, user settings, alerts, warning, or the like; 11. use the API in any of the Applications to replicate or attempt to replace the user experience of the Licensor Offering; 12. attempt to cloak or conceal Licensee’s identity or the identity of the Applications when requesting authorization to use the API; 13. copy, store, archive, cache, or create a database of the Content, in whole or in part; 14. redistribute, resell, or sublicense the Content; 15. use the Content as part of any machine learning or similar algorithmic activity, except as expressly permitted by Licensor; 16. use the Content to create, train, evaluate, or improve new or existing services that the Licensee or third parties might offer, except as expressly permitted by Licensor; or 17. upon termination, cancellation, expiration, or other conclusion of this Agreement, retain, or fail to destroy, any and all API Materials in Licensee’s possession and control. 3. _Enterprise Access_. Licensor may in writing vary these terms for enterprise users (“**Enterprise Clients**”). 4. _Reservation of Rights_. Licensor reserves all rights not expressly granted to Licensee in this Agreement, including the right to change rate limits, the size and structure of request responses, and how much Content is provided in the response. Except for the limited rights and licenses expressly granted under this Agreement, nothing in this Agreement grants to Licensee or any third party, by implication, waiver, estoppel, or otherwise, any intellectual property rights or other right, title, or interest in or to the API. 3. Licensee Responsibilities. 1. Licensee is responsible and liable for all uses of the API resulting from access provided by Licensee, directly or indirectly, whether such access or use is permitted by or in violation of this Agreement. Without limiting the generality of the foregoing, Licensee is responsible for all acts and omissions of Licensee’s end users in connection with the Application and their use of the API, if any. Any act or omission by Licensee’s end user that would constitute a breach of this Agreement if taken by Licensee will be deemed a breach of this Agreement by Licensee. Licensee shall make reasonable efforts to make all of Licensee’s end users aware of this Agreement’s provisions applicable to such end user’s use of the API and shall cause end users to comply with such provisions. 2. Licensee must obtain an API Key through the registration process to use and access the API. Registration for an API Key is available at [https://api-dashboard.search.brave.com/app/keys](https://api-dashboard.search.brave.com/app/keys) . Upon registration, Licensee must provide their name, address, and contact details. Licensee may not share the API Key with any third party, must keep the API Key and all log-in information secure, and must use the API Key as Licensee’s sole means of accessing the API. The API Key may be revoked at any time by Licensor. In the event of an unauthorized use of the API Key by a third party, Licensee must inform the Licensee through the method of Notice set forth in this Agreement. 3. Licensee shall comply with all terms and conditions of this Agreement, all applicable laws, rules, and regulations, and all guidelines, standards, and requirements that Licensor may post on this Website, in any documentation and elsewhere from time to time. Licensee shall monitor the use of the Applications for any activity that violates applicable laws, rules, and regulations or any terms and conditions of this Agreement, including any fraudulent, inappropriate, or potentially harmful behavior, and promptly restrict any offending users of the Applications from further use of the Applications. Licensee is solely responsible for posting any privacy notices and obtaining any consents from Licensee’s end users required under applicable laws, rules, and regulations for their use of the Applications. 4. Licensee shall not use the API in connection with or to promote any products, services, or materials that constitute, promote, or are used primarily for the purpose of dealing in spyware, adware, or other malicious programs or code, counterfeit goods, items subject to US embargo, unsolicited mass distribution of email, multi-level marketing proposals, hate materials, hacking, surveillance, interception, or descrambling equipment, libelous, defamatory, obscene, abusive, or otherwise offensive content, stolen products, and items used for theft, hazardous material, or any illegal activities. 5. Licensee will use commercially reasonable efforts to safeguard the API, which reference incudes (for avoidance of doubt) any API Materials and Content (including, in each case, all copies thereof) from infringement, misappropriation, theft, misuse, disclosure, copying, or unauthorized access. Licensee will promptly notify Licensor if Licensee becomes aware of any infringement of any intellectual property rights in the API and will fully cooperate with Licensor in any legal action taken by Licensor to enforce Licensor’s intellectual property rights. 6. Licensee may, in any end product utilizing the API, use the language “POWERED BY BRAVE” to describe the technology utilized by Licensee’s product. Licensor reserves the right to require Licensee to control any use of Licensor Marks on Licensee’s site including, for example, by requiring Licensee to display the Licensor Marks, change the manner of display of Licensor Marks, or by revoking permission to display Licensor Marks, or by directing Licensee to comply with any usage guidelines Licensor may specify from time to time. Licensee agrees that Licensee’s use of the Licensor Marks in connection with this Agreement will not create any right, title, or interest in or to the Licensor Marks in favor of Licensee and all goodwill associated with the use of the Licensor Marks will inure to the benefit of Licensor. Licensee shall not make any statement regarding use of the API or use the Licensor Marks in any way that would suggest partnership with, sponsorship by, or endorsement by Licensor without Licensor’s prior written consent, which may be granted or withheld in Licensor’s sole discretion. Unless we agree otherwise, you agree that we may use your company or product name, screenshots of your Application, or other content or depictions in the course of marketing, promoting, or demonstrating the API. 4. Updates. During the Term, Licensor may provide Licensee Updates, each of which are a part of the API and are subject to the terms and conditions of this Agreement. Licensee acknowledges that Licensor may require Licensee to obtain and use the most recent version of the API. Updates may adversely affect how the Applications communicate with the Licensor Offering. Licensee is required to make any changes to the Applications that are required for integration as a result of such Updates at Licensee’s sole cost and expense. Licensor will make commercially reasonable efforts to provide Licensor with advance notice of material changes or Updates. However, Licensee’s continued use of the API following the Update constitutes binding acceptance of the Update. 5. Fees and Payment. 1. _Fees_. Licensee shall pay Licensor the fees (“**Fees**”) set forth at the Website. Licensee shall make all payments hereunder in US dollars on or before the due date. Licensor may offer a range of payment options that vary by Service, device, operating system, geographic location, or other factors, which may be updated from time to time. These payment options may include web payments using a third-party payment processor (“**Payment Processor**”). When Licensee accesses the API, Licensor Offering, Content, or Services, Licensee agrees (i) to pay the price listed for such items, along with any additional amounts relating to applicable taxes, credit card fees, bank fees, foreign transaction fees, foreign exchange fees, and currency fluctuations, on a recurring basis during the applicable subscription period; and (ii) to abide by any applicable terms of service, privacy policies, or other legal agreements or restrictions (including additional age restrictions) imposed by such Payment Processor in connection with Licensee’s use of a given payment method. The Fees will be automatically applied at the start of the renewal period for the applicable subscription period unless Licensee cancels on the Website. It is Licensee’s responsibility to make sure Licensee’s banking, credit card, debit card, and/or other payment information is up to date, complete and accurate at all times. All payments are non-refundable except as otherwise expressly provided in this Agreement or as required by law. If Licensee fails to pay the Fees as and when due, Licensor may charge interest on the past due amount at the rate of one and one-half percent (1.5%) per month, calculated daily and compounded monthly, or if lower, the highest rate permitted under applicable law, Licensee shall reimburse Licensor for all costs incurred by Licensor in collecting any late payments or interest, including attorneys’ fees, court costs, and collection agency fees, and/or Licensor may in its discretion prohibit or suspend access to the API, Licensor Offering, Content, and any other Services until all past due amounts and interest thereon have been paid, without incurring any obligation or liability to Licensee or any other person by reason of such suspension or prohibition of access to the API, Licensor Offering, Content, and any other Services, or may take any other action permitted by this Agreement, up to and including termination. 2. _Taxes_. All Fees and other amounts payable by Licensee under this Agreement are exclusive of taxes and similar assessments. Licensee is responsible for all sales, use, and excise taxes, and any other similar taxes, duties, and charges of any kind imposed by any federal, state, or local governmental or regulatory authority on any amounts payable by Licensee hereunder, other than any taxes imposed on Licensor’s income. If any taxes are to be withheld on payments Licensee makes to Licensor, Licensee may deduct such taxes from the amount owed to Licensor and pay them to the appropriate taxing authority; provided, however, that Licensee promptly secure and deliver and official receipt for those withholdings and other documents Licensor reasonably requests to claim a foreign tax credit or refund. Licensee must ensure that any taxes withheld are minimized to the extent possible under applicable law. 6. Collection and Use of Information. Licensor may collect certain information through the API or the Licensor Offering about Licensee or any of Licensee’s employees, contractors, or agents. By accessing, using, and providing information to or through the API or the Licensor Offering, Licensee consents to all actions taken by Licensor with respect to Licensee’s information in compliance with the then-current version of Licensor’s privacy policy and data protection requirements, available at [https://api-dashboard.search.brave.com/app/documentation/general/privacy-policy](https://api-dashboard.search.brave.com/app/documentation/general/privacy-policy) . 7. Intellectual Property Ownership. Licensee acknowledges that, as between Licensee and Licensor, Licensor owns all right, title, and interest, including all intellectual property rights, in and to the API (including API Documentation, API Materials and any Content), the Licensor Offering, and the Licensor Marks. 8. Feedback. If Licensee or any of Licensee’s employees, contractors, and agents sends or transmits any communications or materials to Licensor by mail, email, telephone, or otherwise, suggesting or recommending changes to the API, the Licensor Offering, or the Licensor Marks, including without limitation, new features or functionality relating thereto, or any comments, questions, suggestions, or the like (“**Feedback**”), all such Feedback is and will be treated as non-confidential and Licensee hereby assigns to Licensor on Licensee’s behalf, and on behalf of Licensee’s employees, contractors, and agents, all right, title, and interest in, and Licensor is free to use, without any attribution or compensation to Licensee or any third party, any ideas, know-how, concepts, techniques, or other intellectual property rights contained in the Feedback, for any purpose whatsoever, although Licensor is not required to use any Feedback. 9. Disclaimer of Warranties. THE SERVICES ARE PROVIDED “AS IS,” “WHERE IS,” “AS AVAILABLE,” WITH ALL FAULTS, AND LICENSOR SPECIFICALLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, AND ALL WARRANTIES ARISING FROM COURSE OF DEALING, USAGE, OR TRADE PRACTICE. LICENSOR MAKES NO WARRANTY OF ANY KIND THAT THE API, CONTENT, LICENSOR OFFERINGS, OR LICENSOR MARKS, OR ANY PRODUCTS OR RESULTS OF THE USE THEREOF, WILL MEET LICENSEE’S OR ANY OTHER PERSON’S REQUIREMENTS, OPERATE WITHOUT INTERRUPTION, ACHIEVE ANY INTENDED RESULT, BE COMPATIBLE OR WORK WITH ANY OF LICENSEE’S OR ANY THIRD PARTY’S SOFTWARE, SYSTEM, OR OTHER SERVICES, OR BE SECURE, ACCURATE, COMPLETE, FREE OF HARMFUL CODE, OR ERROR-FREE, OR THAT ANY ERRORS OR DEFECTS CAN OR WILL BE CORRECTED. 10. Indemnification. Licensee agrees to indemnify, defend, and hold harmless Licensor and its officers, directors, employees, agents, affiliates, successors, and assigns from and against any and all losses, damages, liabilities, deficiencies, claims, actions, judgments, settlements, interest, awards, penalties, fines, costs, or expenses of whatever kind, including attorneys’ fees, arising from or relating to (a) Licensee’s use or misuse of the API, Licensor Offering, Content, or Licensor Marks; (b) Licensee’s breach of this Agreement; and (c) the Applications, including any end user’s use thereof. In the event Licensor seeks indemnification or defense from Licensee under this provision, Licensor will promptly notify Licensee in writing of the claim(s) brought against Licensor for which Licensor seeks indemnification or defense. Licensor reserves the right, at Licensor’s option and in Licensor’s sole discretion, to assume full control of the defense of claims with legal counsel of Licensor’s choice. Licensee may not enter into any third-party agreement that would, in any manner whatsoever, constitute an admission of fault by Licensor or bind Licensor in any manner, without Licensor’s prior written consent. In the event Licensor assumes control of the defense of such claim, Licensor will not settle any such claim requiring payment from Licensee without Licensee’s prior written approval. 11. Limitations of Liability. TO THE FULLEST EXTENT PERMITTED UNDER APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO LICENSEE OR TO ANY THIRD PARTY UNDER ANY TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY, OR OTHER LEGAL OR EQUITABLE THEORY FOR (a) ANY LOST PROFITS, LOST OR CORRUPTED DATA, COMPUTER FAILURE OR MALFUNCTION, INTERRUPTION OF BUSINESS, OR OTHER SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING OUT OF THE USE OR INABILITY TO USE THE API; OR (b) ANY DAMAGES, IN THE AGGREGATE, IN EXCESS OF THE AMOUNT OF FEES PAID BY LICENSEE TO THE LICENSOR IN THE 12 MONTHS PRECEDING THE DATE OF THE CLAIM EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES AND WHETHER OR NOT SUCH LOSS OR DAMAGES ARE FORESEEABLE OR LICENSOR WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ANY CLAIM LICENSEE MAY HAVE ARISING OUT OF OR RELATING TO THIS AGREEMENT MUST BE BROUGHT WITHIN THREE MONTHS AFTER THE OCCURRENCE OF THE EVENT GIVING RISE TO SUCH CLAIM. 12. Term and Termination. 1. _Term_. The term of this Agreement begins upon Licensee’s acceptance until termination. 2. _Suspension_. Licensor may suspend Licensee’s use of and access to the API, Content, Licensor Offering, or other Services immediately without notice, (i) if Licensor reasonably believes that (A) Licensee’s use would cause damage to, or represent an inordinate burden on, Licensor; (B) Licensee has violated any term of this Agreement; (C) Licensee creates risk or possible legal exposure for Licensor, in Licensor’s sole discretion; (D) the provision of the API, Licensor Offering or Services are no longer commercially viable, in Licensor’s sole discretion; (ii) for prolonged inactivity; (iii) if Licensor is requested or directed to do so by any competent court of law or government authority; or (iv) for failure to pay for the Services. Licensor shall have no liability for damages of any sort arising out of or resulting from any suspension for the reasons set out in this Section 12(b). 3. _Termination_. Subscriptions will automatically renew on a monthly or annual basis unless earlier terminated or otherwise provided in written agreement of the Licensee and Licensor. Licensor reserves the right to terminate any subscription at any time with or without notice, for any reason or no reason, in its sole and absolute discretion. Except where such early termination by Licensor is the result of Licensee’s breach of this Agreement, such early termination will be effective at the end of the then-current subscription period. Licensee may cancel Licensee’s subscription at any time via the Website and Licensee will no longer have access to the API, Licensor Offering, Content, or Services (or any features or functionality thereof) at the end of your then-current subscription term. Any such cancellation must be submitted at least twenty-four (24) hours before the end of the current subscription period. There are no refunds or credits for any partial subscription periods, including in situations where certain features, benefits, and/or services are modified and/or discontinued, except as required by law. SUBSCRIPTION PLANS ARE PRE-PAID, NON-REFUNDABLE (EXCEPT WHERE REQUIRED BY LAW) AND AUTOMATICALLY RENEW AT THE END OF EACH SUBSCRIPTION PERIOD UNLESS EARLIER CANCELED FOLLOWING THE CANCELLATION PROCEDURES BELOW. All payments for Services are final and not refundable or exchangeable, except as required by applicable law. Licensor makes no guarantee as to the nature, quality, or value of the Services or the availability or supply thereof. ALL TRANSACTIONS ARE FINAL, unless Licensee has a right to withdraw pursuant to law. 4. _Effect of Expiration or Termination_. Upon expiration or termination of this Agreement for any reason all licenses and rights granted to Licensee under this Agreement will also terminate and Licensee must cease using, destroy, and permanently erase all copies of the API and Licensor Marks from all devices and systems Licensee directly or indirectly controls. All outstanding payments, if any, will be automatically become due and payable. 5. _Survival_. Any terms that by their nature are intended to continue beyond the termination or expiration of this Agreement, including without limitation Sections 2(b), 2(d), 3(a), 3(c), 3(d), 3(e), 5, 7, 9, 10, 11, 12(b), 12(d), 12(e), 13(b), 13(e), 13(g), and 13(h), will survive termination. 13. Miscellaneous. 1. _Entire Agreement_. This Agreement, together with any other documents incorporated herein by reference, constitutes the sole and entire agreement of the Parties with respect to the subject matter of this Agreement and supersedes all prior and contemporaneous understandings, agreements, and representations and warranties, both written and oral, with respect to such subject matter. In the event of any inconsistency between the statements made in the body of this Agreement and any other documents incorporated herein by reference, this Agreement presides over any other documents incorporated herein by reference. 2. _Damages Not an Adequate Remedy_. The parties declare that it is impossible to measure in money the damages which will accrue to Licensor by reason of a failure by Licensee to perform any of the obligations under this Agreement and therefore injunctive relief is appropriate. Any breach or threatened breach of this Agreement, and, in particular, of Section 2 and Section 3, may, in some cases, give rise to irreparable harm to Licensor, for which monetary damages would not be an adequate remedy. As such, the Licensee agrees that Licensor shall, in addition to its other rights and remedies, at law or in equity, that may be available in respect of such breach, be entitled to equitable relief, including a temporary restraining order, injunction, specific performance, or any other relief that may be available from a court of competent jurisdiction. If Licensor shall institute any action or proceeding to enforce the provisions hereof, Licensee hereby agrees that Licensor shall be entitled to apply for any available remedy and irrevocably waives the claim or defense that such party has an adequate remedy at law, and Licensee shall not urge in any such action or proceeding the claim or defense that such party has an adequate remedy at law. 3. _Force Majeure_. Licensor will not be in default if performance is delayed or prevented for reasons beyond its control, so long as it resumes performance as soon as is practical. 4. _No Joint Venture_. Licensor and Licensee are acting as independent contractors, and nothing in this Agreement will be construed as creating a partnership, franchise, joint venture, employer-employee or agency relationship. 5. _Notices_. All notices, requests, consents, claims, demands, waivers, and other communications hereunder (each, a “**Notice**”) from the Licensee to the Licensor must be delivered to licensor at 580 Howard St., Unit 402, San Francisco, CA 94105, by registered mail, return receipt requested. All Notices from the Licensor to the Licensee will be electronically delivered to the email address associated with the Licensee’s Brave Search API account. If Licensee does not consent to receive Notices electronically, the Licensee must stop using the Licensor Offering. Except as otherwise provided in this Agreement, a Notice is effective only: (i) upon receipt by the receiving Party and (ii) if the Party giving the Notice has complied with the requirements of this Section. 6. _Amendment and Modification; Waiver_. Licensee acknowledges and agrees that Licensor has the right, in its sole discretion, to modify this Agreement from time to time. All changes are effective immediately when we post them and apply to all access to, and use of, the Services thereafter. Licensor will notify Licensee of the modifications through such means as it deems appropriate, including but not limited to email, notifications, or posts on the Website, but receipt of such notification shall not limit enforceability of such modification or amendment. Your continued use of the Services following the posting of a revised Agreement means you accept and agree to the changes. Except as otherwise set forth in this Agreement, (i) no failure to exercise, or delay in exercising, any rights, remedy, power, or privilege arising from this Agreement will operate or be construed as a waiver thereof and (ii) no single or partial exercise of any right, remedy, power, or privilege hereunder will preclude any other or further exercise thereof or the exercise of any other right, remedy, power, or privilege. 7. _Severability_. If any provision of this Agreement is invalid, illegal, or unenforceable in any jurisdiction, such invalidity, illegality, or unenforceability will not affect any other term or provision of this Agreement or invalidate or render unenforceable such term or provision in any other jurisdiction. Upon such determination that any term or other provision is invalid, illegal, or unenforceable, the Parties shall negotiate in good faith to modify this Agreement so as to affect the original intent of the Parties as closely as possible in a mutually acceptable manner in order that the transactions contemplated hereby be consummated as originally contemplated to the greatest extent possible. 8. _Governing Law and Jurisdiction_. This agreement is governed by and construed in accordance with the internal laws of the State of California without giving effect to any choice or conflict of law provision or rule that would require or permit the application of the laws of any jurisdiction other than those of the State of California. Any legal suit, action, or proceeding arising out of or related to this agreement or the licenses granted hereunder will be instituted exclusively in the federal courts of the United States or the courts of the State of California, in each case located in the city and County of San Francisco, and each party irrevocably submits to the exclusive jurisdiction of such courts in any such suit, action, or proceeding. 9. _Assignment_. Licensee may not assign or transfer any of its rights or delegate any of its obligations hereunder, in each case whether voluntarily, involuntarily, by operation of law, or otherwise, without the prior written consent of Licensor, which consent shall not be unreasonably withheld, conditioned, or delayed. Any purported assignment, transfer, or delegation in violation of this Section is null and void. The Licensor may assign or transfer all rights and obligations hereunder fully or partially without notice to the Licensee. --- # Brave Search - API Resources Privacy notice for Brave Search API customers Updated 4 December 2025 The Brave Search API is provided by Brave Software Inc located in the U.S. ### FOR API CUSTOMERS You must create an account and subscribe to a plan to gain access to the Brave Search API. Data types marked with \* indicate mandatory fields. You will need to provide payment details, and your postal address and billing details. Payment information is processed and held by [Stripe](https://stripe.com/privacy) and is subject to Stripe’s [privacy policy](https://stripe.com/privacy) . Brave does not have access to the personal data processed by Stripe. All subscription plans require payment information, even if you choose a Free plan (this is to help us safeguard against misuse of the service). A record of search queries submitted to the Brave Search API via a customer’s Search API account is retained for a maximum of 90 days for the purpose of billing Search API account holders and for troubleshooting subject to Brave’s legal obligations. As per Section 3b of the [Terms Of Service](https://api-dashboard.search.brave.com/terms-of-service) the Brave Search API customer (Licensee) is solely responsible for complying with applicable data protection law including the posting of any privacy notice with regard to queries submitted by end users via the customer’s API access. Brave does not collect any identifiers that can link a search query to an individual or their devices. You can contact our data protection officer at [privacy@brave.com](mailto:privacy@brave.com) should you have any privacy enquiries about the use of account related data, and to the extent that a search query involves the processing of personal data. ### Brave Search API and Personal Data Brave takes the position that query data sent to Brave Search API is not personal data under laws like the General Data Protection Regulation (GDPR). Brave Search API acts as a conduit – we act on data requests made by our customer’s systems and services, and return search results from our index. It’s no different than conducting a search on [https://search.brave.com](https://search.brave.com/) , except that instead of a person doing the search, a computer is doing it via a programmatic call (the Brave Search API). For our customers, search queries may be personal data, because they may have other information or means that allow them to link back or identify a particular user or query. But Brave has no way to identify which “end user” made any specific query, only that a customer’s account is making an API call. We have no idea who actually made the query, or whether a given query was even about an identifiable individual. This is why we specifically exclude Search Query Data in our Data Processing Addendum. | Purpose of processing | Categories of personal data processed | Legal basis of processing | Duration of storage | | --- | --- | --- | --- | | To create and manage account access | Email address, full name and account UID (assigned by Brave), API Key | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests

Compliance with legal obligations | 12 months from when an account is deleted. | | To provide customer support | User ID, user email, IP address, other information provided by account holder | Necessary for the performance of a contract | Maximum 6 years. | | To process payments | Hashed Stripe identifier, Last 4 credit, expiration date | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests | 12 months from when an account is deleted. | | Invoicing | Account information, client contact information, billing details. | Necessary for the performance of a contract | Returned after contract termination. | | To resolve billing queries and troubleshooting | IP address, authentication token | Necessary for the performance of a contract

**For data retained after account closure:** Legitimate interests | Search Query Logs: 90 days.

Option for Zero Data Retention (Enterprise clients), subject to Brave’s legal obligations.

**Other Data:** 12 months from when an account is deleted. | | To prevent abuse of the Search API | IP address, authentication token | Legitimate interests. | **Search Query Logs:** 90 days.

Option for Zero Data Retention (Enterprise clients), subject to Brave’s legal obligations.

**Other Data:** 12 months from when an account is deleted. | | Compliance with Brave’s legal obligations | IP address, authentication token, account information | Compliance with legal obligations | To the extent required by law. | * * * List of sub-processors can be found in Annex IV of the data processing addendum. [See our data processing addendum here.](https://cdn.search.brave.com/search-api/web/v1/client/_app/immutable/assets/brave-search-api-dpa-latest.DRXCoye6.pdf) ---