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
The Actor
Run it with the Apify CLI
Fetch one AI Overview:
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:
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
- 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.
- 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.
- Estimate cost, then confirm with the user if the batch is large. See
references/gotchas.md.
- 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.
- 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
1---2name: apify-google-ai-overview-api3description: 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.4license: MIT5---67# Google AI Overview API: Answers and Citations as JSON89Fetch 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.1011## When to use this skill1213- The user wants a Google AI Overview API, or Google AI Overview data programmatically.14- They want to extract or export AI Overview answers to JSON or CSV.15- They want the cited sources behind an AI Overview for a keyword or topic.16- They want to batch AI Overview lookups across a keyword list into one dataset.1718Not 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).1920## What you get (one row per query)2122`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`.2324## Prerequisites2526- Apify account (sign up at https://apify.com?fpr=9n7kx3&fp_sid=skillrepo).27- Authentication via `apify login`, or an `APIFY_TOKEN` environment variable (Apify Console, Settings, Integrations).2829## The Actor3031- Store page: https://apify.com/johnvc/Google-AI-Overview-API?fpr=9n7kx3&fp_sid=skillrepo32- Actor ID: `johnvc/Google-AI-Overview-API`33- Pricing: pay per AI Overview retrieval plus a small per-run setup fee (see `references/gotchas.md`).3435## Run it with the Apify CLI3637Fetch one AI Overview:3839```bash40apify actors call "johnvc/Google-AI-Overview-API" -i '{"query":"what is retrieval augmented generation"}' \41 --json \42 --user-agent apify-awesome-skills/apify-google-ai-overview-api \43 2>/dev/null44```4546Batch a keyword list with country targeting:4748```bash49apify 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"}' \50 --json \51 --user-agent apify-awesome-skills/apify-google-ai-overview-api \52 2>/dev/null53```5455Every call carries the three flags this repo expects: `--json`, `--user-agent apify-awesome-skills/apify-google-ai-overview-api`, and `2>/dev/null`.5657## Run it from Claude or another AI agent (MCP)5859The Actor is MCP-ready. Add the hosted server URL:6061`https://mcp.apify.com/?tools=actors,docs,johnvc/Google-AI-Overview-API`6263Then 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/mcp6465## Workflow66671. 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.682. 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.693. Estimate cost, then confirm with the user if the batch is large. See `references/gotchas.md`.704. 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`.715. Deliver rows as JSON or CSV, or hand back the dataset link. `fetched_at` timestamps each row for later comparisons.7273## Inputs7475- `query` (string): a single search query76- `queries` (array of strings): batch of queries, merged with `query` and deduped77- At least one of `query` or `queries` is required78- `gl` (string, default `us`): two-letter country code79- `hl` (string, default `en`): interface language; keep `en`80- `location` (string): optional named location, for example "Austin, Texas, United States"8182## Cost8384Billing 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`.8586## Honest limits8788- Not every query gets an AI Overview. Rows without one come back with `ai_overview_present: false`; you still pay for the lookup.89- English-only for now, and available in a limited set of countries; `hl` other than `en` will mostly return nothing.90- Some `references` entries carry only `link`, `source`, and `index` (video sources often skip `title` and `snippet`).91- Answers change over time and vary by `gl` and `location`; this fetches the live overview, not history. Build history with your own repeated runs.9293## Troubleshooting9495- `ai_overview_present: false`: rephrase as a question-style informational query, keep `hl` at `en`, and try `gl` at `us`.96- `used_dedicated_api: true` and `retrievals_used: 2`: normal; Google deferred generation and the Actor resolved it, which costs one extra retrieval.97- Missing `title` or `snippet` on a reference: normal for some source types; `link` and `source` are always there for matching.9899See `references/gotchas.md` for cost guardrails and error recovery, and `references/actor-index.md` for the Actor routing table.100101## Related answer-engine Actors102103- Naver AI Overview API: https://apify.com/johnvc/naver-ai-overview-api?fpr=9n7kx3&fp_sid=skillrepo104- Brave AI Mode API: https://apify.com/johnvc/brave-ai-mode-api?fpr=9n7kx3&fp_sid=skillrepo105- Bing Copilot API: https://apify.com/johnvc/bing-copilot-api?fpr=9n7kx3&fp_sid=skillrepo106- Google News API: https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3&fp_sid=skillrepo