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

Extract Google AI Overview text, bullets, and sources from rendered Search pages for SEO research and agent workflows. Returns one record per query with overviewText, overviewBullets, sources, warnings, and searchUrl. Charged $0.005 per query plus a $0.00005 start fee.

- **URL**: https://apify.com/muhammadafzal/google-ai-overview-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Other, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 google ai overview queries

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

## Google AI Overview Scraper

Extract the AI Overview that Google visibly renders for search queries, including overview text, bullets, and supporting source links. This version uses direct DOM extraction only, so it does not call an external LLM provider and does not require an OpenRouter API key.

This actor is an extraction tool, not an answer-generation tool. If Google does not show an AI Overview for a query, the actor returns `overviewPresent: false` and a warning. It never creates a replacement answer.

### What it returns

The dataset contains one item per processed query:

| Field | Description |
| --- | --- |
| `query` | The Google Search query sent by the actor. |
| `searchUrl` | The rendered Google Search URL used as the source page. |
| `overviewPresent` | Whether a Google AI Overview was detected. |
| `overviewText` | Visible overview text, or `null` when no overview was available. |
| `overviewBullets` | Short bullets found in the visible overview. |
| `sources` | Supporting links captured from the rendered Google page. |
| `extractor` | `dom` when an overview was detected, or `none`. |
| `warnings` | Non-fatal details such as no overview or a Google challenge page. |
| `error` | A recoverable query error, or `null`. |
| `scrapedAt` | ISO 8601 collection timestamp. |

The `SUMMARY` key-value-store record contains request totals, locale, proxy mode, query price, and run-level warnings.

### When to use this actor

Use it to observe Google AI Overview coverage for a list of queries, compare visibility across country/language settings, collect the sources Google exposes alongside an overview, or feed structured visibility evidence into an SEO or research pipeline.

Do not use it to ask an AI model a question, generate a synthetic answer, scrape Google account data, or bypass a Google challenge. For standard organic result extraction without AI Overview detection, use a Google Search or SERP-focused actor.

### Input

```json
{
  "queries": [
    "what is retrieval augmented generation",
    "how does a heat pump work"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "useApifyProxy": false
}
```

- `queries` — one natural-language search query per line; up to 25 queries per run.
- `countryCode` — two-letter Google country parameter such as `us`, `gb`, or `pk`; defaults to `us`.
- `languageCode` — two-letter Google language parameter such as `en`, `de`, or `ur`; defaults to `en`.
- `useApifyProxy` — defaults to `false` to avoid proxy charges. Enable it when Google challenges the default cloud IP; proxy usage may add Apify proxy charges.

### Output example

```json
{
  "query": "what is retrieval augmented generation",
  "status": "success",
  "overviewPresent": true,
  "overviewText": "Retrieval-augmented generation combines information retrieval with text generation...",
  "overviewBullets": [
    "Retrieve relevant documents",
    "Ground the generated response in those documents"
  ],
  "sources": [
    {
      "title": "Retrieval-augmented generation",
      "url": "https://example.com/rag",
      "domain": "example.com",
      "snippet": "Background on RAG"
    }
  ],
  "extractor": "dom",
  "warnings": [],
  "error": null,
  "scrapedAt": "2026-08-08T12:00:00.000Z"
}
```

If an eligible query produces no overview, the item remains a truthful observation with `overviewPresent: false`, `overviewText: null`, an empty `overviewBullets` array, and a warning explaining that Google did not expose a detectable overview. Google availability varies by country, language, account, query, device, and time.

### Pricing

The included PPE definition charges:

| Event | Price | When it fires |
| --- | ---: | --- |
| `apify-actor-start` | $0.00005 | Once per run. |
| `google-ai-overview-result` | $0.005 | Once per valid query processed, including no-overview results. |

A five-query run has a maximum event charge of $0.02505 before any Apify plan or proxy charges. The actor prints this cap at run start and stops additional work if the PPE event limit is reached.

### Reliability and limitations

The actor uses a single Playwright browser session with low concurrency and retries temporary navigation failures. It extracts only text and links visible in the rendered Google page; there is no LLM cleanup or answer synthesis. Google changes its markup and may show different features for different sessions, so a missing overview means only that this run did not detect one.

Google challenge pages are reported as errors or warnings. The actor does not attempt to defeat CAPTCHA, login walls, or access controls. Enable Apify Proxy only when needed, because proxy traffic may create additional usage charges.

Use the returned `searchUrl` and source links for review, and independently verify important claims. This actor does not provide legal, medical, financial, or other professional advice.

### API and MCP usage

Start the actor through the Apify API with an input object matching `INPUT_SCHEMA.json`. The dataset output is available from the run’s default dataset, and the `SUMMARY` record is available from the run’s default key-value store. The flat, explicit output fields and stable null values are intended for Apify MCP and other agent clients.

### Legal and responsible use

Use this actor only where you have a lawful basis and permission to access the target service. Respect Google’s Terms of Service, robots and access policies, applicable privacy law, and any contractual restrictions. Do not submit personal, confidential, or sensitive queries.

### References

- [Google Search Help: AI Overviews](https://support.google.com/websearch/answer/14901683)

# Actor input Schema

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

Use this when you need the Google AI Overview for one or more search queries. Enter one natural-language query per line, for example 'what is retrieval augmented generation'. Defaults to a representative AI Overview query. This is not a Google result URL list.

## `countryCode` (type: `string`):

Use this to localize Google Search results to a two-letter country code, for example 'us' or 'gb'. Defaults to 'us'. This is not a proxy-country override; it changes Google request parameters only.

## `languageCode` (type: `string`):

Use this to set the Google Search language using a two-letter code, for example 'en' or 'de'. Defaults to 'en'. This controls Google’s results language, not translation.

## `useApifyProxy` (type: `boolean`):

Use this when Google is returning a challenge or blocking the default cloud IP. Defaults to false to avoid proxy charges. This enables Apify's proxy pool and does not bypass Google access controls.

## Actor input object example

```json
{
  "queries": [
    "what is retrieval augmented generation"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "useApifyProxy": false
}
```

# Actor output Schema

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

Structured JSON records, one per processed Google query.

## `summary` (type: `string`):

Run totals, locale, pricing information, and warnings stored in the SUMMARY key-value record.

# 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 = {
    "countryCode": "us",
    "languageCode": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/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 = {
    "countryCode": "us",
    "languageCode": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/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 '{
  "countryCode": "us",
  "languageCode": "en"
}' |
apify call muhammadafzal/google-ai-overview-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/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/ccn5cFQG0sCX40oVd/builds/3cwpQsASfgMgg0aqf/openapi.json
