# Brave AI Mode Scraper (`searchapi/brave-ai-mode-scraper`) Actor

Scrapes Brave Search's AI Mode / Summarizer answers. Extracts the full canonical ai-summary schema: synthesized summary (text + HTML + length + tokens), model/provider, sources, citations, inline references, related & follow-up questions, accompanying organic results, and confidence metadata.

- **URL**: https://apify.com/searchapi/brave-ai-mode-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Categories:** AI, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Brave AI Mode Scraper

Scrapes Brave Search's AI Mode / Summarizer answers. Extracts the full canonical ai-summary schema: synthesized summary (text + HTML + length + tokens), model/provider, sources, citations, inline references, related & follow-up questions, accompanying organic results, and confidence metadata.

### What this Actor collects

Each dataset item represents one Brave AI answer attempt, with the generated summary, cited sources, inline references, related questions, organic results, and extraction metadata that Brave exposes.

- Uses the input limits and filters below to control the crawl.
- Stores source-backed fields defined by the 37-field dataset schema.
- Omits optional fields when the source does not expose a value instead of writing nulls or fabricated placeholders.

### Use cases

- Answer-engine monitoring
- Citation and source research
- Generative-search analysis

### Input

Provide input in JSON. Fields marked required must be supplied; source-specific alternatives and constraints are described in the field text.

| Field | Type | Required | Default | Description |
| --- | --- | :---: | --- | --- |
| `query` | string | No | — | A single search query to get the Brave AI Summarizer response for. |
| `queries` | array | No | — | Optional list of queries to process in batch (overrides 'query' if provided). |
| `maxItems` | integer | No | `10` | Maximum number of queries to process (when using the 'queries' list). |
| `country` | string | No | `"us"` | Brave country code for localized results (e.g. 'us', 'gb', 'in'). |
| `language` | string | No | `"en"` | Brave language code (e.g. 'en', 'de', 'fr'). |
| `waitForSummary` | boolean | No | `true` | Whether to wait extra time for the AI summary to load dynamically. |
| `summaryTimeoutMs` | integer | No | `30000` | Maximum milliseconds to wait for the AI summary block to appear. |
| `navigationTimeoutSecs` | integer | No | `60` | Maximum seconds for Brave page navigation. |
| `headless` | boolean | No | `true` | Run Firefox without a visible window. |
| `proxyConfiguration` | object | No | — | Use Apify Proxy or authorized custom proxy URLs when required. |
| `debug` | boolean | No | `false` | Enable verbose diagnostics without logging query contents or sensitive values. |

#### Example input

```json
{
  "query": "What is artificial intelligence",
  "maxItems": 10,
  "country": "us",
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "waitForSummary": true,
  "summaryTimeoutMs": 30000,
  "navigationTimeoutSecs": 60,
  "headless": true
}
```

### Output

The default dataset contains one item per processed query. The following are the most useful fields; `hasSummary` and the count fields distinguish a returned answer from a source-backed no-summary result.

| Field | Type | Description |
| --- | --- | --- |
| `searchQuery` | string | Search Query |
| `hasSummary` | boolean | Has Summary |
| `aiSummaryLength` | integer | Ai Summary Length |
| `model` | string | Model |
| `modelProvider` | string | Model Provider |
| `sourcesCount` | integer | Sources Count |
| `citationsCount` | integer | Citations Count |
| `relatedQuestionsCount` | integer | Related Questions Count |
| `organicResultsCount` | integer | Organic Results Count |
| `matchedSelector` | string | Matched Selector |
| `extractionConfidence` | number | Extraction Confidence |
| `country` | string | Country |
| `language` | string | Language |
| `scrapedAt` | string | Scraped At |
| `position` | integer | Position |
| `type` | string | Record Type |

<details>
<summary>All 37 declared dataset fields</summary>

`type`, `searchQuery`, `hasSummary`, `aiSummaryLength`, `model`, `modelProvider`, `sourcesCount`, `citationsCount`, `relatedQuestionsCount`, `organicResultsCount`
`matchedSelector`, `extractionConfidence`, `country`, `language`, `scrapedAt`, `resultType`, `position`, `query`, `aiSummary`, `aiSummaryHtml`
`aiSummaryTokens`, `summaryTitle`, `summarySubtitle`, `sources`, `citations`, `inlineReferences`, `inlineReferencesCount`, `relatedQuestions`, `followupQuestions`, `followupQuestionsCount`
`organicResults`, `firstOrganicResult`, `error`, `errorType`, `searchUrl`, `market`, `searchMetadata`

</details>

#### Example dataset item

This compact example is taken from local Actor storage. Long text and nested collections are shortened for documentation only.

```json
{
  "searchQuery": "What is artificial intelligence",
  "hasSummary": true,
  "aiSummaryLength": 1026,
  "sourcesCount": 20,
  "citationsCount": 42,
  "relatedQuestionsCount": 8,
  "organicResultsCount": 10,
  "matchedSelector": "#chatllm-main-answer-content",
  "extractionConfidence": 0.9,
  "country": "us",
  "language": "en",
  "scrapedAt": "2026-07-23T15:18:10.460Z"
}
```

### Related Actors

- [Brave Autocomplete Scraper](https://apify.com/searchapi/brave-autocomplete-scraper)
- [Brave Discussions Scraper](https://apify.com/searchapi/brave-discussions-scraper)
- [Brave Goggles Scraper](https://apify.com/searchapi/brave-goggles-scraper)

# Actor input Schema

## `query` (type: `string`):

A single search query to get the Brave AI Summarizer response for.

## `queries` (type: `array`):

Optional list of queries to process in batch (overrides 'query' if provided).

## `maxItems` (type: `integer`):

Maximum number of queries to process (when using the 'queries' list).

## `country` (type: `string`):

Brave country code for localized results (e.g. 'us', 'gb', 'in').

## `language` (type: `string`):

Brave language code (e.g. 'en', 'de', 'fr').

## `waitForSummary` (type: `boolean`):

Whether to wait extra time for the AI summary to load dynamically.

## `summaryTimeoutMs` (type: `integer`):

Maximum milliseconds to wait for the AI summary block to appear.

## `navigationTimeoutSecs` (type: `integer`):

Maximum seconds for Brave page navigation.

## `headless` (type: `boolean`):

Run Firefox without a visible window.

## `proxyConfiguration` (type: `object`):

Use Apify Proxy or authorized custom proxy URLs when required.

## `debug` (type: `boolean`):

Enable verbose diagnostics without logging query contents or sensitive values.

## Actor input object example

```json
{
  "query": "What is machine learning",
  "queries": [
    "What is AI",
    "How does machine learning work"
  ],
  "maxItems": 10,
  "country": "us",
  "language": "en",
  "waitForSummary": true,
  "summaryTimeoutMs": 15000,
  "navigationTimeoutSecs": 60,
  "headless": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

## `results` (type: `string`):

Canonical v2 schema for Brave AI Mode / Summarizer results — matches \_canonical/schemas/ai-summary.schema.json

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "What is artificial intelligence",
    "maxItems": 10,
    "country": "us",
    "language": "en",
    "summaryTimeoutMs": 15000,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("searchapi/brave-ai-mode-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "What is artificial intelligence",
    "maxItems": 10,
    "country": "us",
    "language": "en",
    "summaryTimeoutMs": 15000,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("searchapi/brave-ai-mode-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "What is artificial intelligence",
  "maxItems": 10,
  "country": "us",
  "language": "en",
  "summaryTimeoutMs": 15000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call searchapi/brave-ai-mode-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=searchapi/brave-ai-mode-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/kNvOMRzExPc0mu4EF/builds/gPv9eaohzMutiUFqr/openapi.json
