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

Get the Google AI Overview text and its cited sources for any search query as JSON. 20% cheaper than the leading Google AI Overview scraper on Free to Gold plans; you pay only for queries that show an AI Overview.

- **URL**: https://apify.com/krammer/google-ai-overview-scraper.md
- **Developed by:** [krammer liu](https://apify.com/krammer) (community)
- **Categories:** SEO tools, AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 ai overview results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Google AI Overview Scraper - AI Overview API

Get the Google AI Overview for any search query: the answer text and the sources it cites, as JSON. The price is 20% cheaper than the leading Google AI Overview scraper on Free to Gold plans. You pay only for queries that show an AI Overview. Queries without an AI Overview and failed queries are free.

Built for SEO and content teams who track what Google answers, and for AI agents (MCP) that need the Google AI Overview as a tool.

### Input

One field: `queries`. Enter one search query per line.

```json
{
  "queries": "what is a roth ira\nbest crm for small business"
}
```

- Empty lines are dropped. Queries are not de-duplicated and the case is not changed.
- One run handles at most 1,000 queries. A line longer than 500 characters is not sent: it is listed in the errors dataset and not charged.
- Google results are for the United States, in English.

### Output

One item in the default dataset for each query that shows an AI Overview (text cut here, sources cut to two):

```json
{
  "query": "what is a roth ira",
  "type": "live",
  "text": "A Roth IRA (Individual Retirement Account) is a U.S. retirement savings account funded with after-tax dollars that offers tax-free investment growth and tax-free qualified withdrawals in retirement. Because you pay taxes upfront on contributions, you do not get a tax deduction when you deposit money, but eligible withdrawals later in life are tax-free.",
  "sources": [
    {
      "url": "https://www.fidelity.com/learning-center/smart-money/what-is-a-roth-ira",
      "title": "What is a Roth IRA and how does it work? | Fidelity",
      "description": "# Roth IRA contribution limits * The annual contribution limit for IRAs, including Roth and traditional IRAs, is $7,500 for 2026. ..."
    },
    {
      "url": "https://www.tiaa.org/public/retire/financial-products/iras/roth-ira",
      "title": "What is a Roth IRA: Benefits & How to Open an Account | TIAA",
      "description": "# What is a Roth IRA? A Roth individual retirement account, or Roth IRA, is an investment account designed to help you save for re..."
    }
  ]
}
```

- `type` is always `live`.
- `text` is plain text, not Markdown. Paragraphs, headings and list items are separated by line breaks. The leading Google AI Overview scraper returns Markdown, so the formatting differs.
- `sources` are in the order Google shows them. A field that Google does not show is an empty string.

### Errors dataset

A query that returns no result is written to the `errors` dataset, with the reason, and is not charged:

```json
{
  "query": "weather tomorrow",
  "error": "No AI Overview returned for the query."
}
```

| Case | `error` |
|---|---|
| Google showed no AI Overview | `No AI Overview returned for the query.` |
| Line longer than 500 characters | `Query is longer than 500 characters.` |
| Request rejected | `Rejected: <reason>` |
| Temporary failure (service unavailable, timeout, busy) | `Not fetched: <reason>. Not charged.` |

Queries that were not processed because the run stopped (Google limits requests, run timeout, maximum charge, free-plan limit) get no row. The run status message says how many were not processed. They are not charged.

The `RUN_SUMMARY` record in the key-value store has the outcome, counts and charged events.

### Pricing

Pay per event. No monthly fee.

| Event | Charged when | Price (depends on your Apify plan) |
|---|---|---|
| AI Overview result | One query returned a Google AI Overview | $0.0024 (Free), $0.0016 (Bronze), $0.0012 (Silver), $0.0008 (Gold and higher plans) |

Free Apify plans can use up to $1.00 of this Actor each month. Paid plans have no monthly limit.

### Use it as an API

Call the Actor over the Apify API. This request waits for the run and returns the dataset items:

```bash
curl -X POST "https://api.apify.com/v2/acts/krammer~google-ai-overview-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"queries": "what is a roth ira"}'
```

Python example with `apify-client`:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("krammer/google-ai-overview-scraper").call(
    run_input={"queries": "what is a roth ira\nbest crm for small business"}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["query"], "->", len(item["sources"]), "sources")
    print(item["text"][:200])
```

### Use it in AI agents (MCP)

The Apify MCP server can give an AI agent this Actor as a tool. Limit the server to this Actor with the `tools` parameter:

```bash
claude mcp add --transport http google-ai-overview "https://mcp.apify.com/?tools=krammer/google-ai-overview-scraper"
```

### Limits

- Google results are for the United States, in English. Queries in other languages may not show an AI Overview.
- Google does not show an AI Overview for every query. Those queries are not charged.
- The output text is plain text, not Markdown.
- One run handles at most 1,000 queries.
- Free plan: $1.00 per month.
- When the run timeout is close, the Actor stops before sending the next query, delivers what it has, and charges only for delivered results. Raise the run timeout for more queries.

### FAQ

**What happens when Google limits requests?**
The run stops. Queries that were not processed are not charged. Try again in about 10 minutes.

**Why is a query in the errors dataset?**
Google showed no AI Overview for it, or the query could not be fetched. See the table in "Errors dataset". Neither case is charged.

**Can I export the results to CSV or Excel?**
Yes. Export the dataset from Apify as CSV, JSON or Excel, or read it with the API or `apify-client`.

# Actor input Schema

## `queries` (type: `string`):

Use this field to give the Google search queries to look up. Enter one query per line. For each query, the AI Overview shown on the Google results page (United States, English) is returned. A query that shows no AI Overview is listed in the errors dataset and not charged.

## Actor input object example

```json
{
  "queries": "what is a roth ira\nbest crm for small business"
}
```

# Actor output Schema

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

One item per query that returned a Google AI Overview: query, type, text and sources.

## `errors` (type: `string`):

Queries that returned no AI Overview result, with the reason. Not charged.

## `runSummary` (type: `string`):

Run outcome, counts and charged events.

# 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 = {
    "queries": "what is a roth ira"
};

// Run the Actor and wait for it to finish
const run = await client.actor("krammer/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 = { "queries": "what is a roth ira" }

# Run the Actor and wait for it to finish
run = client.actor("krammer/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 '{
  "queries": "what is a roth ira"
}' |
apify call krammer/google-ai-overview-scraper --silent --output-dataset

```

## MCP server setup

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