Google AI Overview API: Get AI Overviews as JSON
Google offers no API for AI Overviews. Its Search Console reports count how often your own site appears in them, but nothing returns the overview for a query you choose. GET /v1/google-search/search-ai-overview?query=... does that: you pass a query, plus hl, gl, google_domain or uule for language and location, and it costs 1 credit per successful call. Expect many queries to have no overview at all, because Google shows one only on some searches.
Is there an official Google AI Overview API?
No. Google's documentation for site owners says pages that appear in AI features such as AI Overviews and AI Mode are counted in Search Console's Performance report, under the Web search type (Google Search Central, 2026). In June 2026 Google added dedicated generative AI performance reports, rolling out to a subset of websites first (Google Search Central Blog, 2026).
Both are the right tools for one question: how often does my site show up? They're free, first-party and cover every query Google counts. They can't tell you what an overview says, which sources it cites, or whether a competitor appears for your keywords. For that you need the overview itself for a query you choose, which is what the Search Ai Overview endpoint returns. Data is collected from publicly available sources and returned as found at the time of the call.
| Question | Search Console | /v1/google-search/search-ai-overview |
|---|---|---|
| How often does my site appear in AI features? | Yes, impressions and clicks | No |
| What does the overview say for a given query? | No | Yes |
| Which sites are cited for my keywords? | Only my own | Whatever the overview shows |
| Cost | Free | 1 credit per successful call |
How do you request an AI Overview?
Send a GET request with query. Add hl and gl, both two-letter codes, so the overview matches the language and country you're tracking. The request below uses the endpoint's catalogue example. Put your key in the X-API-Key header; keys start with sk_live_, and the authentication docs cover the rest.
curl "https://api.perceptlayer.com/v1/google-search/search-ai-overview?query=how+does+photosynthesis+work&hl=en&gl=us" \
-H "X-API-Key: $API_KEY"
We haven't run this request for the article and have no recorded response, so we won't describe the response fields here. Run it in the playground on the Search Ai Overview page to see the real output before you write a parser.
Which parameters does the endpoint take?
The endpoint takes one required parameter and four optional ones. Types and lengths come from the endpoint definition. Nothing else, such as defaults, is documented, so set the language and location you need on every call rather than relying on one.
| Parameter | Type | Notes |
|---|---|---|
query |
string, required | Up to 2,048 characters |
hl |
string | Interface language, 2 characters, for example en |
gl |
string | Country, 2 characters, for example us |
google_domain |
string | Up to 100 characters, for example google.co.uk |
uule |
string | Encoded location, up to 500 characters |
gl sets the country; uule narrows to a place, which matters for local queries such as "emergency plumber near me". The Google Search API guide covers uule and the other six Google Search endpoints, so this article doesn't repeat them.
Why do many queries return no AI Overview?
Because Google shows an overview only when its systems decide it helps. Google's help pages say AI Overviews appear when generative AI can be especially helpful, such as when you want to understand information from a range of sources (Google Search Help, 2026). After early problems, Google said in 2024 it had added triggering restrictions for queries where overviews weren't proving helpful (Google, 2024).
Query length is the clearest pattern in public data. In Pew Research Center's analysis of 900 US adults' browsing in March 2025, 18% of Google searches produced an AI summary. Only 8% of one- or two-word searches did, against 53% of searches with 10 words or more, and questions and full sentences triggered summaries more often (Pew Research Center, 2025). Those are US figures from 2025; the share changes as Google expands the feature.
So a keyword list of short head terms will mostly come back empty, while long, question-shaped queries will mostly return an overview. Plan for both outcomes in your code. We haven't recorded a query without an overview, so we can't show whether one comes back as a successful, billed response with no overview in it, or as a not_found (404) error, which costs nothing. Budget as if every call costs 1 credit, and check the response on the first runs.
How do you track AI Overviews for a keyword set?
Run each keyword once a day with fixed hl and gl, store the raw JSON with the date, and compare day over day. Storing the raw response matters more than usual here: overview text changes between runs, and you can't go back for yesterday's. Here's a minimal daily job in Python.
import datetime
import json
import os
import pathlib
import requests
URL = "https://api.perceptlayer.com/v1/google-search/search-ai-overview"
HEADERS = {"X-API-Key": os.environ["API_KEY"]}
KEYWORDS = ["how does photosynthesis work", "how long to boil an egg for a soft yolk"]
day = datetime.date.today().isoformat()
out = pathlib.Path("overviews") / day
out.mkdir(parents=True, exist_ok=True)
for i, kw in enumerate(KEYWORDS):
r = requests.get(URL, headers=HEADERS, params={"query": kw, "hl": "en", "gl": "us"}, timeout=60)
record = {"query": kw, "status": r.status_code, "credits": r.headers.get("X-Credits-Used")}
if r.ok:
record["body"] = r.json()
elif r.status_code != 404:
record["error"] = r.json().get("error", {}).get("code")
(out / f"{i:04d}.json").write_text(json.dumps(record))
We haven't run this script against the live API. It stores the status and the X-Credits-Used header with each result, which answers the empty-overview billing question on your first run. It treats a 404 as "no data" and keeps any other error code. For retries on rate_limited and temporarily_unavailable, see handling web data API errors in Python. For what to do with stored results, search result data for SEO monitoring covers which SERP fields to track.
What does tracking AI Overviews cost?
Each call costs 1 credit on success; failed calls cost nothing and return X-Credits-Used: 0. Every success returns X-Credits-Used and X-Credits-Remaining, so the daily job can log spend from the headers. The credits docs explain billing.
| Job | Calls a month | Credits a month |
|---|---|---|
| 30 keywords, daily, one market | 900 | 900 |
| 200 keywords, daily, one market | 6,000 | 6,000 |
| 200 keywords, daily, three markets | 18,000 | 18,000 |
| 200 keywords, weekly, one market | about 867 | about 867 |
The 1,000 free credits you get every month after verifying an email address cover the first row. The 200-keyword daily job, 6,000 credits a month, needs a pack: a Build pack of 50,000 credits covers eight months of it, and purchased credits last 12 months. Weekly tracking is 200 × 52 ÷ 12 ≈ 867 credits a month, inside the free tier. See pricing for what credits cost. Free accounts run at 1 request a second, so 200 calls take a little over three minutes; the rate limits docs list paid rates.
If you also want the classic results for the same keywords, that's a second call to the Google Search endpoint at 1 credit each. For Google's conversational answers with follow-ups, see the Google AI Mode API guide.
Can an AI agent fetch AI Overviews?
Yes. The MCP server at https://api.perceptlayer.com/mcp exposes search_endpoints and get_endpoint for free catalogue lookups and call_endpoint to run the endpoint, spending 1 credit on success. An agent can look up google-search.search-ai-overview, read its parameters and call it with a query.
An overview is Google's generated summary, not a source. If an agent uses it, have it follow the cited pages rather than quoting the overview as fact. Setup is in the AI agents docs, and errors come back with a JSON code listed in the errors docs.
To see a real response, get a free API key and run your own keyword in the playground on the Google Search API page.
APIs in this post
Frequently asked questions
Does Google have an API for AI Overviews?
No. Google reports your own site's impressions in AI features through Search Console, under the Web search type, and added dedicated generative AI reports in 2026 for a subset of sites. Neither returns the overview for a query you choose. GET /v1/google-search/search-ai-overview takes a query and returns the overview as JSON, at 1 credit per successful call.
How much does the AI Overview endpoint cost?
1 credit per successful call; failed calls cost nothing. Tracking 200 keywords daily is about 6,000 credits a month, and every account gets 1,000 free credits a month after verifying an email address. Prepaid packs start at 10,000 credits and last 12 months. The pricing page has what credits cost.
Why did my query return no AI Overview?
Google shows overviews only when its systems judge them helpful, mostly for longer and question-shaped queries. Pew found summaries on 8% of one- or two-word searches and 53% of searches of 10 words or more in March 2025. Language and country matter too, so set hl and gl to the market you're tracking.
Can I target a country or city?
Yes. gl takes a two-letter country code and hl a two-letter language code. google_domain sets the Google domain, such as google.co.uk, and uule takes an encoded location for city-level results. Keep these fixed across runs, or day-over-day changes will mix market differences with real ones.
What happens if a call fails?
You get an HTTP status and a JSON error with a code, message and request_id, and nothing is debited. A missing query returns invalid_parameters (422). Rate-limited (429) and temporarily unavailable (503) responses carry a Retry-After header with the seconds to wait. The errors docs list every code.