# Google AI Overview Scraper (`googleapi/google-ai-overview-scraper`) Actor

Extract rich rendered Google AI Overview answers, citation sources, follow-up questions, and surrounding search result cards.

- **URL**: https://apify.com/googleapi/google-ai-overview-scraper.md
- **Developed by:** [Google API](https://apify.com/googleapi) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Collect public Google Search results for a set of queries. When an AI Overview is shown, the dataset can include its answer text, sections, cited sources, and follow-up questions, along with other visible search-result modules.

### How to use

1. Enter one or more search phrases or provide public Google Search URLs in `startUrls`.
2. Choose the language, country, and SafeSearch setting.
3. Select the result modules to include and set the result limit.
4. Run the Actor and review the search records in the dataset.

Example:

```json
{
  "queries": ["what is artificial intelligence"],
  "country": "us",
  "language": "en",
  "safeSearch": true,
  "maxItems": 10,
  "includeOrganicResults": true,
  "includeVideoResults": true,
  "includeRelatedQueries": true
}
```

### Input

| Input | Description | Default |
|---|---|---:|
| `queries` | Search phrases to run on public Google Search pages. | — |
| `startUrls` | Public Google Search URLs. Supplied URLs replace generated queries. | — |
| `language` / `country` | Language and regional Google Search settings. | `en` / `us` |
| `safeSearch` | Apply Google SafeSearch to generated query URLs. | `true` |
| `maxItems` | Maximum search records across the run (1–100). | 25 |
| `page` | Starting Google results page for generated searches (1–1,000). | 1 |
| `maxPages` | Maximum rendered views per query (1–10). Additional views scroll the same page to reveal more results. | 1 |
| `includeOrganicResults` | Include visible organic result cards. | `true` |
| `includeVideoResults` | Include standalone video-result cards. | `true` |
| `includeRelatedQueries` | Include follow-up prompts, People Also Ask questions, and related searches. | `true` |
| `includePageText` | Include cleaned visible text from the Google Search results area. | `false` |
| `proxyConfiguration` | Optional Apify Proxy configuration for public search pages. | — |

### Output

Each dataset row represents a search query and includes `searchQuery` and `searchUrl`. If present on the page, it can also include:

- **AI Overview:** answer title, text and formatted HTML, section headings and items, cited sources, and counts.
- **Related questions and searches:** follow-up prompts, People Also Ask questions, related searches, and their counts.
- **Search results:** organic and standalone video cards with visible titles, links, publishers, dates, descriptions, and other card details.
- **Optional page text:** cleaned visible text and character and word counts when `includePageText` is enabled.
- **Search context:** final and canonical URLs, page title, language, country, and search page type.

Google may show different modules depending on the query, language, country, and availability. Missing scalar values are `null`; arrays remain empty when no matching module is visible. Citation and result snippets are visible card text. The Actor does not open citation destinations. YouTube links included only as AI Overview citations are not treated as standalone video results.

Example dataset item:

```json
{
  "searchQuery": "sample topic",
  "searchUrl": "https://www.google.com/search?q=sample+topic&hl=en&gl=us",
  "searchLanguage": "en",
  "searchCountry": "us",
  "hasAiOverview": true,
  "aiOverviewTitle": "AI Overview",
  "aiOverviewText": "Answer text displayed by Google for this search.",
  "aiOverviewSources": [
    {
      "sourcePosition": 1,
      "sourceTitle": "Example Source",
      "sourceLink": "https://example.org/article",
      "sourceDomain": "example.org"
    }
  ],
  "followUpQueries": [],
  "peopleAlsoAskQuestions": [],
  "organicResults": [],
  "videoResults": [],
  "hasPageText": false
}
```

The Output tab shows the available result fields. The run output includes links to the dataset and run summary.

### Limits and responsible use

Results depend on the query, locale, time, and modules Google makes available. More queries and rendered views can increase run time. This Actor reads public pages only and does not sign in or bypass access checks. It is not affiliated with Google.

# Actor input Schema

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

Search phrases to run on public Google Search result pages. If omitted or empty, the Actor uses the documented sample query.

## `startUrls` (type: `array`):

Optional public Google /search URLs. When supplied, these replace generated searches; result toggles and limits still apply.

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

Language code used for the Google Search page, such as en or de.

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

Google country code used for regional results, such as us or gb.

## `safeSearch` (type: `boolean`):

Enable Google's SafeSearch parameter for generated query URLs.

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

Maximum number of query-page records to emit across all supplied queries or start URLs.

## `maxPages` (type: `integer`):

Maximum rendered snapshots per query, including the initial page. Additional snapshots scroll the same page to reveal lazy-loaded cards; this does not request Google pagination pages.

## `page` (type: `integer`):

One-based starting Google result page for generated searches. Custom startUrls keep their supplied page parameters.

## `includePageText` (type: `boolean`):

Retain visible text from the Google Search results region, excluding the site-wide account/navigation header. Disabled by default to keep records focused on the extracted answer and result cards.

## `includeOrganicResults` (type: `boolean`):

Include organic search-result cards found on the rendered page.

## `includeVideoResults` (type: `boolean`):

Include standalone video result cards. YouTube links used only as AI Overview citations are not treated as video cards.

## `includeRelatedQueries` (type: `boolean`):

Include AI Overview follow-up prompts, People Also Ask questions, and related-search queries when visibly present.

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

Optional Apify proxy configuration for permitted public Google requests.

## Actor input object example

```json
{
  "queries": [
    "what is artificial intelligence"
  ],
  "language": "en",
  "country": "us",
  "safeSearch": true,
  "maxItems": 25,
  "maxPages": 1,
  "page": 1,
  "includePageText": false,
  "includeOrganicResults": true,
  "includeVideoResults": true,
  "includeRelatedQueries": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `OUTPUT` (type: `string`):

No description

## `RUN_HEALTH` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("googleapi/google-ai-overview-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 = {}

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

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

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

```

## CLI example

```bash
echo '{}' |
apify call googleapi/google-ai-overview-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,googleapi/google-ai-overview-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/aj3dA62tOxRjCNXTW/builds/10gfSZ7m6Kt3xLvkq/openapi.json
