Google AI Overview API
Google AI Overview summaries, citations, parameters and complete response fields.
Retrieve Google AI Overview summaries and citation links. The completed response returns in the same request, without task IDs, polling or callbacks.
Test Google AI Overview API →Endpoint and authentication
POST https://api.goanyapi.com/api/v1/google-ai-overviewAuthorization: Bearer YOUR_API_KEY
Content-Type: application/jsonWith the current configuration, each successful request costs 3 credits.
Each completed successful search uses the configured price, including unavailable overviews with feature_available=false. Validation, authentication and operational failures are free. Retrying a completed search is a new billable request.
JSON body parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
query | string | No | Search query, at most 8192 UTF-8 bytes. Required when page_token is absent; the token retains its original query. Maximum characters: 8192 how do solar panels work |
country | string | No | Two-letter country code, for example us or gb; omit for the search default. Maximum characters: 2 ^[a-zA-Z]{2}$us |
language | string | No | Language code, for example en or zh-CN; omit for the search default. Maximum characters: 20 ^[A-Za-z]{2,3}(?:-[A-Za-z]{2,4})?$en |
device | string | No | Device: desktop, mobile or tablet. desktop / mobile / tablet Maximum characters: 8192 |
page_token | string | No | Opaque ai_overview.page_token from a compatible Google search response. Use within one minute; retains original query, locale and device. Not an AI Mode conversation token. Maximum characters: 65536 |
output | string | No | Response format: json (default), md (Markdown), html (Brotli-compressed Base64 source). HTML is incompatible with json_restrictor. json / md / html Default: jsonMaximum characters: 8192 |
html | boolean | No | Alias for output=html. Cannot be combined with output=json/md or json_restrictor. Default: false |
json_restrictor | string | No | Select content fields using paths, indices, slices [0:3], [] and .{nested,fields}; up to 128 selections and 16 levels. Missing fields omitted. Incompatible with HTML. Maximum characters: 8192 results[].{title,text,links},search_parameters.feature_available |
zero_trace | boolean | No | Do not retain query or response artifacts. Billing and operational metadata are still retained. Default false. Default: false |
no_cache | boolean | No | Compatibility option; requests always fetch live results for either value. Normal billing applies. Default: false |
Supply at least query or page_token; query alone is sufficient for normal searches. query is limited to 8192 UTF-8 bytes. Unknown fields, null and invalid types are rejected. output=html or html=true cannot be combined with json_restrictor; html=true cannot be combined with output=json/md. Omit optional controls to use defaults. Field filtering does not change billing.
Request example
curl "$GOANYAPI_API_ORIGIN/api/v1/google-ai-overview" \
-X POST -H "Authorization: Bearer $GOANYAPI_API_KEY" \
-H "Content-Type: application/json" \
--data '{"query":"how do solar panels work","country":"us","language":"en","device":"desktop"}'Short-lived page_token
When a compatible Google search response provides ai_overview.page_token, submit it to this endpoint within one minute. It retains the original query, country, language and device; keep those controls unchanged. Not every search or SERP version returns a token; use query when no token is available. page_token is distinct from AI Mode subsequent_request_token and from next_page_token, and does not support conversational follow-ups.
Response fields
| Field | Meaning |
|---|---|
data.endpoint | google-ai-overview |
data.query | Submitted controls; page_token is not echoed. |
data.costCredits | Actual credits consumed at the current database-configured price. |
data.remainingCredits | Remaining credit balance. |
data.result.format | json / md / html+br+base64 |
data.result.content | JSON object, Markdown string, or Brotli-compressed Base64 source string. |
data.result.content.results[].address | Returned address business value; may be empty, null or absent. |
data.result.content.results[].category | Returned category business value; may be empty, null or absent. |
data.result.content.results[].coordinates | Latitude/longitude; zeros are preserved. |
data.result.content.results[].description | Returned description business value; may be empty, null or absent. |
data.result.content.results[].id | Returned id business value; may be empty, null or absent. |
data.result.content.results[].latitude | Returned latitude business value; may be empty, null or absent. |
data.result.content.results[].links | Citation array: title and url. Links are not a page/share URL. |
data.result.content.results[].longitude | Returned longitude business value; may be empty, null or absent. |
data.result.content.results[].name | Returned name business value; may be empty, null or absent. |
data.result.content.results[].phone | Returned phone business value; may be empty, null or absent. |
data.result.content.results[].position | Returned position business value; may be empty, null or absent. |
data.result.content.results[].rank | Returned rank business value; may be empty, null or absent. |
data.result.content.results[].rating | Returned rating business value; may be empty, null or absent. |
data.result.content.results[].rating_max | Returned rating_max business value; may be empty, null or absent. |
data.result.content.results[].rating_source | Returned rating_source business value; may be empty, null or absent. |
data.result.content.results[].review_count | Returned review_count business value; may be empty, null or absent. |
data.result.content.results[].snippet | Returned snippet business value; may be empty, null or absent. |
data.result.content.results[].text | Answer text. |
data.result.content.results[].thumbnail | Returned thumbnail business value; may be empty, null or absent. |
data.result.content.results[].title | Answer title; AI Overview in the saved example. |
data.result.content.results[].type | Returned type business value; may be empty, null or absent. |
data.result.content.results[].url | Result URL; can be empty. No share URL is fabricated. |
data.result.content.results[].website | Returned website business value; may be empty, null or absent. |
data.result.content.serp_features[] | Extracted answer features: id, engine, type, title, text, items, links, source_result_ids, position, confidence, extracted_at, data_cid, live_busyness and popular_times when present. Answer text and links can repeat the results entry. |
data.result.content.search_parameters | Returned query, country, language, device, engine, operation, type, page_token, feature_available, pagination_limited and pagination_reason. |
data.result.content.has_next_page / next_page_token | Returned pagination metadata, distinct from ai_overview.page_token. next_page_token is not an input parameter. |
data.result.content.ai_overview.page_token | Optional short-lived overview retrieval token. May be empty, null or absent; use within one minute. Not a conversation token. |
Business values may be empty strings, null, empty arrays or missing. All records and zeros are preserved. Titles, answers and page URLs are not fabricated. feature_available=false is a normal successful result; empty fields do not imply failure. Verify summary claims against citations.
Saved real response with an overview
The example is saved locally; viewing it makes no live request. Actual costCredits and remainingCredits come from the current configuration and account balance.
{
"code": "ok",
"message": "Saved example response",
"data": {
"endpoint": "google-ai-overview",
"query": {
"query": "how do solar panels work",
"country": "us",
"language": "en",
"device": "desktop"
},
"result": {
"format": "json",
"content": {
"ai_overview": {
"page_token": ""
},
"has_next_page": false,
"next_page_token": "",
"results": [
{
"address": "",
"category": "",
"coordinates": {
"latitude": 0,
"longitude": 0
},
"description": "",
"id": "",
"latitude": 0,
"links": [
{
"title": "EnergySage",
"url": "https://www.energysage.com/solar/solar-panels-work"
},
{
"title": "Reddit · r/explainlikeimfive",
"url": "https://www.reddit.com/r/explainlikeimfive/comments/13ycao0/eli5_how_the_hell_do_solar_panels_work"
},
{
"title": "YouTube · 3D Requiem",
"url": "https://www.youtube.com/watch?v=M7sgO9OI8D0"
},
{
"title": "National Grid Group",
"url": "https://www.nationalgrid.com/stories/energy-explained/how-does-solar-power-work"
},
{
"title": "How do solar panels work? - Richard Komp, Video, watch on YouTube",
"url": "https://www.youtube.com/watch?t=8&v=xKxrkht7CpY"
}
],
"longitude": 0,
"name": "",
"phone": "",
"position": 0,
"rank": 0,
"rating": 0,
"rating_max": 0,
"rating_source": "",
"review_count": 0,
"snippet": "",
"text": "Solar panels convert sunlight into usable electricity through a process called the photovoltaic effect. The Science Inside a Solar Cell Silicon Layers: Each solar panel is made up of many individual solar cells built from layers of silicon. P-N Junction: The top layer is N-type silicon (charged with extra electrons), and the bottom layer is P-type silicon (containing vacant spaces called \"holes\"). Where they meet, an internal electric field forms. Knocking Electrons Loose: When sunlight hits the cell, light particles (photons) transfer energy to the silicon and knock electrons free from their atomic bonds. Creating a Current: The internal electric field forces these free electrons to flow in one direction",
"thumbnail": "",
"title": "AI Overview",
"type": "ai_summary",
"url": "",
"website": ""
}
],
"search_parameters": {
"country": "us",
"device": "desktop",
"engine": "google",
"feature_available": true,
"language": "en",
"operation": "google_ai_overview",
"page_token": "",
"pagination_limited": false,
"pagination_reason": "",
"query": "how do solar panels work",
"type": "search"
},
"serp_features": [
{
"confidence": 0.75,
"data_cid": "",
"engine": "google",
"extracted_at": "2026-11-10T08:24:22.618Z",
"id": "f_ca68b8670a4968fe",
"items": [],
"links": [
{
"title": "EnergySage",
"url": "https://www.energysage.com/solar/solar-panels-work"
},
{
"title": "Reddit · r/explainlikeimfive",
"url": "https://www.reddit.com/r/explainlikeimfive/comments/13ycao0/eli5_how_the_hell_do_solar_panels_work"
},
{
"title": "YouTube · 3D Requiem",
"url": "https://www.youtube.com/watch?v=M7sgO9OI8D0"
},
{
"title": "National Grid Group",
"url": "https://www.nationalgrid.com/stories/energy-explained/how-does-solar-power-work"
},
{
"title": "How do solar panels work? - Richard Komp, Video, watch on YouTube",
"url": "https://www.youtube.com/watch?t=8&v=xKxrkht7CpY"
}
],
"live_busyness": {
"busyness_percent": 0,
"day": "",
"description": "",
"hour": 0
},
"popular_times": {},
"position": {
"absolute": 1
},
"source_result_ids": [
"s_169daea1d6724177",
"s_5e933f5eb801b623",
"s_7bdf9a5559f4e045"
],
"text": "Solar panels convert sunlight into usable electricity through a process called the photovoltaic effect. The Science Inside a Solar Cell Silicon Layers: Each solar panel is made up of many individual solar cells built from layers of silicon. P-N Junction: The top layer is N-type silicon (charged with extra electrons), and the bottom layer is P-type silicon (containing vacant spaces called \"holes\"). Where they meet, an internal electric field forms. Knocking Electrons Loose: When sunlight hits the cell, light particles (photons) transfer energy to the silicon and knock electrons free from their atomic bonds. Creating a Current: The internal electric field forces these free electrons to flow in one direction",
"title": "AI Overview",
"type": "ai_summary"
}
]
}
}
}
}Saved real response without an overview
The example is saved locally; viewing it makes no live request. Actual costCredits and remainingCredits come from the current configuration and account balance.
{
"code": "ok",
"message": "Saved example response",
"data": {
"endpoint": "google-ai-overview",
"query": {
"query": "site:example.com inurl:goanyapi-overview-no-result-20261110",
"country": "us",
"language": "en",
"device": "desktop"
},
"result": {
"format": "json",
"content": {
"ai_overview": {
"page_token": ""
},
"has_next_page": false,
"next_page_token": "",
"results": [],
"search_parameters": {
"country": "us",
"device": "desktop",
"engine": "google",
"feature_available": false,
"language": "en",
"operation": "google_ai_overview",
"page_token": "",
"pagination_limited": false,
"pagination_reason": "",
"query": "site:example.com inurl:goanyapi-overview-no-result-20261110",
"type": "search"
},
"serp_features": []
}
}
}
}Privacy and errors
zero_trace=true skips query and response artifact storage while retaining billing and necessary operational metadata; it does not delete past records. page_token is not copied into usage metadata. 400 invalid_params: invalid parameters or short-lived token; 401: authentication required; 402 insufficient_credits: insufficient balance; 429: rate limited; 502 request_failed: request or response failure; 504 request_timeout: request timed out; 503 service_not_configured: service or price unavailable. Failed requests do not consume credits.