> ## Documentation Index
> Fetch the complete documentation index at: https://test-62a57ffd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Web search

> Search from a large index of web pages with optional local and rich data enrichments

## Overview

Web Search provides access to a 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

<CardGroup cols={2}>
  <Card title="Comprehensive Index" icon="globe">
    Search across billions of indexed web pages with fast, reliable results
  </Card>

  <Card title="Fresh Results" icon="refresh">
    Regularly updated index ensures you get the most current information
  </Card>

  <Card title="Local Enrichments" icon="map-location-dot">
    Enhanced results with local business data and geographic context **(Pro)**
  </Card>

  <Card title="Rich Data Enrichments" icon="sparkles">
    3rd party data integration for rich real-time results **(Pro)**
  </Card>
</CardGroup>

<Note>
  Local enrichments and rich 3rd party data enrichments require a **Pro level
  subscription**. [Upgrade to Pro](/pricing) to unlock these advanced features.
</Note>

## API Reference

<Card title="Web Search API Documentation" icon="code" href="/api-reference/web/search">
  View the complete API reference, including endpoints, parameters, and example
  requests
</Card>

## 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

## Local enrichments

Local enrichments to the Web Search response include extra information about
places of interest (POI), such as images and the websites where the POI is
mentioned.

An initial request has to be made to the web search endpoint with
a given query. An example cURL request is given below.

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/web/search?q=greek+restaurants+in+san+francisco" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

If the query returns a list of locations, as in this case, each location
result has an `id` field
which is a temporary ID that can be used to retrieve extra information about the
location. An example from the locations result is given below.

```json theme={null}
{
  "locations": {
    "results": [
      {
        "id": "1520066f3f39496780c5931d9f7b26a6",
        "title": "Pangea Banquet Mediterranean Food",
        ...
      },
      {
        "id": "d00b153c719a427ea515f9eacf4853a2",
        "title": "Park Mediterranean Grill",
        ...
      },
      {
        "id": "4b943b378725432aa29f019def0f0154",
        "title": "The Halal Mediterranean Co.",
        ...
      }
    ]
  }
}
```

The `id` value can be used to further fetch extra information
about the location. An example request is given below.

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/local/pois?ids=1520066f3f39496780c5931d9f7b26a6&ids=d00b153c719a427ea515f9eacf4853a2" \
  -H "accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "x-subscription-token: <YOUR_API_KEY>"
```

An AI-generated description associated with a location
can be fetched using the example below.

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/local/descriptions?ids=1520066f3f39496780c5931d9f7b26a6&ids=d00b153c719a427ea515f9eacf4853a2" \
  -H "accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "x-subscription-token: <YOUR_API_KEY>"
```

## 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.

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/web/search?q=weather+in+munich&enable_rich_callback=1" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

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.

```json theme={null}
{
  "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.

```bash theme={null}
curl -s --compressed "https://api.search.brave.com/res/v1/web/rich?callback_key=86d06abffc884e9ea281a40f62e0a5a6" \
  -H "Accept: application/json" \
  -H "Accept-Encoding: gzip" \
  -H "X-Subscription-Token: <YOUR_API_KEY>"
```

### 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.

<Warning>
  Some of these providers will require attribution for showing this data.
</Warning>

#### 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.
