Brave AI Mode API

GET   /api/v1/search?engine=brave_ai_mode

The Brave AI Mode API provides real-time access to the answers of Ask Brave, the AI mode of Brave Search. It returns the answer as text blocks and markdown, the pages the answer cites, the web results Brave searched and the follow-up questions Brave suggests.

API Parameters

Search Query

  • Name
    q
    Required
    Required
    Description

    The question to ask Brave. Up to 2048 characters and 7,000 bytes once URL-encoded, which is about 1,160 characters in Cyrillic, Greek or Arabic and about 770 in Chinese, Japanese or Korean. Brave answers in the language of the question.

Localization

  • Name
    country
    Required
    Optional
    Description

    Two-letter country code that sets the region Brave answers for. The default parameter is us. Set it to all for all regions. Check the full list of supported Brave AI Mode countries.

  • Name
    language
    Required
    Optional
    Description

    Two-letter language code. Brave uses it when the question does not show its language, for example a bare name. The default parameter is en. Check the full list of supported Brave AI Mode languages.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines an engine that will be used to retrieve real-time data. It must be set to brave_ai_mode.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

Zero Data Retention

  • Name
    zero_retention
    Enterprise Only
    Enterprise Only
    Required
    Optional
    Description

    Set this parameter to true to disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.

API Examples

Full Response

Full Response
  • text_blocks - The answer as typed blocks: paragraph, header, unordered_list / ordered_list with nested items, table, and code_blocks. Paragraphs and headers carry their text in answer, lists their items, tables a table and code blocks their code.

    A block adds zero-based reference_indexes into reference_links when the answer cites sources in it, so treat that key as optional.
  • markdown - The same answer as a single markdown string.
  • reference_links - The pages the answer cites, once each, in the order the answer first cites them, with index, title, link, source, snippet and favicon. The snippet is the cited passage as plain text, with its line breaks.
  • web_results - The web results Brave searched for the question, in Brave's order, with position, title, link, source, snippet, date and favicon.
  • related_questions - The follow-up questions Brave suggests, each carrying a question.
  • error - Brave finishes some questions with web results and no written answer. Those responses carry error and the web_results instead of the answer.
GET
https://www.searchapi.io/api/v1/search?engine=brave_ai_mode&q=what+is+the+tallest+building+in+the+world
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "brave_ai_mode",
  "q": "what is the tallest building in the world"
}

response = requests.get(url, params=params)
print(response.text)
Response
{
  "search_metadata": {
    "id": "search_VAxENYzjKgR4Pcb3D0M4GJbe",
    "status": "Success",
    "created_at": "2026-10-28T09:08:31Z",
    "request_time_taken": 13.94,
    "parsing_time_taken": 0.04,
    "total_time_taken": 13.97,
    "request_url": "https://search.brave.com/ask?q=what+is+the+tallest+building+in+the+world",
    "html_url": "https://www.searchapi.io/api/v1/searches/search_VAxENYzjKgR4Pcb3D0M4GJbe.html",
    "json_url": "https://www.searchapi.io/api/v1/searches/search_VAxENYzjKgR4Pcb3D0M4GJbe"
  },
  "search_parameters": {
    "engine": "brave_ai_mode",
    "q": "what is the tallest building in the world",
    "country": "us",
    "language": "en"
  },
  "text_blocks": [
    {
      "type": "paragraph",
      "answer": "The Burj Khalifa in Dubai, United Arab Emirates is the tallest building in the world, standing at 828 m (2,717 ft) with 163 floors. It has held the title since its completion in 2010 and is currently the world's tallest structure of any kind.",
      "reference_indexes": [
        0,
        ...
      ]
    },
    ...
  ],
  "markdown": "The **Burj Khalifa** in **Dubai, United Arab Emirates** is the tallest building in the world, standing at **828 m (2,717 ft)** with **163 floors**. It has held the title since its completion in 2010 and is currently the world's tallest structure of any kind.\n\nThe runner-up is **Merdeka 118** in Kuala Lumpur, Malaysia (679 m / 2,227 ft), completed in 2023. A future challenger, the **Jeddah Tower** in Saudi Arabia, is planned at over 1,000 m but remains unfinished, so the Burj Khalifa retains the record.",
  "reference_links": [
    {
      "title": "Tallest Buildings in the World",
      "link": "https://skyscraperatlas.com/world/tallest-buildings/",
      "source": "skyscraperatlas.com",
      "snippet": "Tallest Buildings in the World\nBurj Khalifa\nLocation\nDubai\n\nBurj Khalifa, located in Downtown Dubai, is the tallest building in the world, standing at 828 meters (2,717 feet) with 163 occupied floors above ground. It is named after the former president of the United Arab Emirates…",
      "favicon": "https://imgs.search.brave.com/giptnfiQMbh8lhcRQGaqMk2c3C13l9KHwCeP-IXSWyE/rs:fit:32:32:1:0/g:ce/aHR0cDovL2Zhdmlj/b25zLnNlYXJjaC5i/cmF2ZS5jb20vaWNv/bnMvOTY2ZDc0MzZk/MTQyOGU0MzU2ZDhi/NmQ3N2Y2ZGVmNWE5/ZmJmNzUyNTA0MThk/NTUwZGM4YTRmODhk/ZTAwYzI0NS9za3lz/Y3JhcGVyYXRsYXMu/Y29tLw",
      "index": 0
    },
    ...
  ],
  "web_results": [
    {
      "position": 1,
      "title": "List of tallest buildings - Wikipedia",
      "link": "https://en.wikipedia.org/wiki/List_of_tallest_buildings",
      "source": "en.wikipedia.org",
      "snippet": "This is a list of the tallest buildings. Tall buildings, such as skyscrapers, are intended here as enclosed structures with continuously occupiable floors and a height of at least 350 metres (1,148 ft). Such definition excludes non-building structures, such as radio towers. Historically, the world'...",
      "date": "September 24, 2026",
      "favicon": "https://imgs.search.brave.com/m6XxME4ek8DGIUcEPCqjRoDjf2e54EwL9pQzyzogLYk/rs:fit:32:32:1:0/g:ce/aHR0cDovL2Zhdmlj/b25zLnNlYXJjaC5i/cmF2ZS5jb20vaWNv/bnMvNjQwNGZhZWY0/ZTQ1YWUzYzQ3MDUw/MmMzMGY3NTQ0ZjNj/NDUwMDk5ZTI3MWRk/NWYyNTM4N2UwOTE0/NTI3ZDQzNy9lbi53/aWtpcGVkaWEub3Jn/Lw"
    },
    ...
  ],
  "related_questions": [
    {
      "question": "What materials were used to construct the Burj Khalifa?"
    },
    ...
  ]
}