# Apify Google AI Overview API

> Get Google AI Overview answers and their cited sources as structured JSON with the Apify Google AI Overview API Actor (johnvc/Google-AI-Overview-API). Send one query or a batch, and get one row per query with ai_overview_present, ordered text_blocks (paragraphs, headings, lists, tables), references with link and source domain, retrievals_used, and a fetched_at timestamp. Use when the user wants a google ai overview api, wants to extract or export Google AI Overview answers to JSON or CSV, check which sources an AI Overview cites for a keyword, batch AI Overview lookups across a query list, or asks how to get Google AI Overview data programmatically. Pay-per-retrieval billing, MCP-ready for Claude and other AI agents.

- Skill: `johnisanerd/apify-google-ai-overview-api` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add johnisanerd/apify-google-ai-overview-api`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johnisanerd/apify-google-ai-overview-api/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- License: MIT
- Author: johnisanerd (https://skillmd.com/u/johnisanerd)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/johnisanerd/apify-google-ai-overview-api

---


# Google AI Overview API: Answers and Citations as JSON

Fetch Google's AI Overview for any search query as clean, structured JSON. One call takes a query (or a batch of queries) and returns the AI-generated answer as ordered text blocks plus every source it cites, with links and source domains.

## When to use this skill

- The user wants a Google AI Overview API, or Google AI Overview data programmatically.
- They want to extract or export AI Overview answers to JSON or CSV.
- They want the cited sources behind an AI Overview for a keyword or topic.
- They want to batch AI Overview lookups across a keyword list into one dataset.

Not for: recurring brand-citation watchlists (use the google-ai-overview-monitoring skill), organic result rank tracking (this returns the AI Overview only), or other engines' AI answers (see `references/actor-index.md` for Bing, Brave, and Naver equivalents).

## What you get (one row per query)

`query`, `result_type`, `ai_overview_present`, `text_blocks` (ordered blocks typed `paragraph`, `heading`, `list`, or `table`, each with a `snippet`; list blocks carry `list` items, table blocks carry raw `table` rows plus a `formatted` object form), `snippet_links` and `snippet_highlighted_words` when present, `reference_indexes` tying a block to its sources when present, `references` (each with `link`, `source`, `index`, plus `title`, `snippet`, `thumbnail`, and `source_icon` when present), `used_dedicated_api`, `retrievals_used`, `gl`, `hl`, `fetched_at`.

## Prerequisites

- Apify account (sign up at https://apify.com?fpr=9n7kx3&fp_sid=skillrepo).
- Authentication via `apify login`, or an `APIFY_TOKEN` environment variable (Apify Console, Settings, Integrations).

## The Actor

- Store page: https://apify.com/johnvc/Google-AI-Overview-API?fpr=9n7kx3&fp_sid=skillrepo
- Actor ID: `johnvc/Google-AI-Overview-API`
- Pricing: pay per AI Overview retrieval plus a small per-run setup fee (see `references/gotchas.md`).

## Run it with the Apify CLI

Fetch one AI Overview:

```bash
apify actors call "johnvc/Google-AI-Overview-API" -i '{"query":"what is retrieval augmented generation"}' \
  --json \
  --user-agent apify-awesome-skills/apify-google-ai-overview-api \
  2>/dev/null
```

Batch a keyword list with country targeting:

```bash
apify actors call "johnvc/Google-AI-Overview-API" -i '{"queries":["best crm for startups","how does vector search work","what is a transformer model"],"gl":"us","hl":"en"}' \
  --json \
  --user-agent apify-awesome-skills/apify-google-ai-overview-api \
  2>/dev/null
```

Every call carries the three flags this repo expects: `--json`, `--user-agent apify-awesome-skills/apify-google-ai-overview-api`, and `2>/dev/null`.

## Run it from Claude or another AI agent (MCP)

The Actor is MCP-ready. Add the hosted server URL:

`https://mcp.apify.com/?tools=actors,docs,johnvc/Google-AI-Overview-API`

Then ask, for example: "Get the Google AI Overview for 'best crm for startups' and list the sources it cites." MCP setup docs: https://docs.apify.com/platform/integrations/mcp

## Workflow

1. Collect the queries. Provide a single `query`, a `queries` list, or both; they merge and dedupe, and the Actor returns one row per query. Question-style informational searches trigger AI Overviews most often.
2. Set targeting. Keep `hl` at `en` (AI Overviews are currently English-only), pick `gl` for the country, and add `location` only when a named place matters.
3. Estimate cost, then confirm with the user if the batch is large. See `references/gotchas.md`.
4. Run the Actor and read the dataset. To get plain answer text, concatenate the `snippet` of each block in `text_blocks` in order. To attribute claims, map each block's `reference_indexes` to the `references` array by `index`.
5. Deliver rows as JSON or CSV, or hand back the dataset link. `fetched_at` timestamps each row for later comparisons.

## Inputs

- `query` (string): a single search query
- `queries` (array of strings): batch of queries, merged with `query` and deduped
- At least one of `query` or `queries` is required
- `gl` (string, default `us`): two-letter country code
- `hl` (string, default `en`): interface language; keep `en`
- `location` (string): optional named location, for example "Austin, Texas, United States"

## Cost

Billing is pay per event: a small setup fee per run plus a fee per AI Overview retrieval. An inline answer costs one retrieval; when Google defers generation, the Actor resolves it automatically at the cost of a second retrieval. A 10-query batch of inline answers runs about $0.16. Live prices and thresholds are in `references/gotchas.md`.

## Honest limits

- Not every query gets an AI Overview. Rows without one come back with `ai_overview_present: false`; you still pay for the lookup.
- English-only for now, and available in a limited set of countries; `hl` other than `en` will mostly return nothing.
- Some `references` entries carry only `link`, `source`, and `index` (video sources often skip `title` and `snippet`).
- Answers change over time and vary by `gl` and `location`; this fetches the live overview, not history. Build history with your own repeated runs.

## Troubleshooting

- `ai_overview_present: false`: rephrase as a question-style informational query, keep `hl` at `en`, and try `gl` at `us`.
- `used_dedicated_api: true` and `retrievals_used: 2`: normal; Google deferred generation and the Actor resolved it, which costs one extra retrieval.
- Missing `title` or `snippet` on a reference: normal for some source types; `link` and `source` are always there for matching.

See `references/gotchas.md` for cost guardrails and error recovery, and `references/actor-index.md` for the Actor routing table.

## Related answer-engine Actors

- Naver AI Overview API: https://apify.com/johnvc/naver-ai-overview-api?fpr=9n7kx3&fp_sid=skillrepo
- Brave AI Mode API: https://apify.com/johnvc/brave-ai-mode-api?fpr=9n7kx3&fp_sid=skillrepo
- Bing Copilot API: https://apify.com/johnvc/bing-copilot-api?fpr=9n7kx3&fp_sid=skillrepo
- Google News API: https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3&fp_sid=skillrepo

