Brave AI Mode API

Track Brave Search's AI Mode answers for any query: get the AI-generated answer, its cited sources, and the supporting web results as structured JSON. Built for privacy-search intelligence, infosec research, and journalism. Pay per query, MCP-ready.

MEDIAN LAGon demand
PARAMETERS4
TOTAL USERS8
MONTHLY ACTIVE8
TOTAL RUNS22
RUNS SUCCEEDED100.0%
RATING5.0 (1)

Input parameters

PARAMETERTYPEREQDEFAULTDESCRIPTION
query string no Enter a single query to fetch the Brave AI Mode answer for, for example 'what is quantum computing'. Provide this, `queries`, or both.
queries string[] no Provide a list of queries to resolve in one run.
country string no us Set the two-letter country code for the search (e.g. 'us', 'gb', 'de').
language string no en Set the two-letter interface language code (e.g. 'en', 'es', 'de').

Worked examples

Basic — the required input, with the schema's own example values
{
  "query": "what is quantum computing",
  "queries": [
    "example"
  ]
}

Tasks

Saved runs with the inputs already filled in — each one a standalone page and a working configuration example.

Request a task →

Code

curl

curl -X POST "https://api.apify.com/v2/acts/johnvc~brave-ai-mode-api/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "what is quantum computing", "queries": ["example"]}'

Python

from apify_client import ApifyClient

client = ApifyClient("APIFY_TOKEN")
run = client.actor("johnvc/brave-ai-mode-api").call(
    run_input={'query': 'what is quantum computing', 'queries': ['example']}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)