Google AI Mode Scraper API
AI Mode answers, citations, follow-up questions and response fields.
Retrieve Google AI Mode answers, citation links and follow-up conversations as structured data. Ask a question and receive the completed response directly.
Test Google AI Mode Scraper API →Endpoint and authentication
POST https://api.goanyapi.com/api/v1/google-ai-modeAuthorization: Bearer YOUR_API_KEY
Content-Type: application/jsonWith the current configuration, each successful request costs 3 credits.
Each completed successful request, including empty/unavailable answers and valid follow-ups, is charged at the configured rate. Invalid parameters, authentication errors and operational failures are not charged. This is a synchronous endpoint; there is no task ID, polling or webhook.
JSON body parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
query | string | Yes | Question, required; at most 8192 UTF-8 bytes. Maximum characters: 8192 What is x.com |
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 |
location | string | No | Location, for example Austin, TX. Cannot be combined with uule. Maximum characters: 512 Austin, TX |
coordinates | object | No | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | No | Encoded Google location, starting w+ or a+ followed by Base64; mutually exclusive with location and coordinates. Maximum characters: 4096 ^[wa]\+[A-Za-z0-9+/_-]+=*$ |
image_url | string | No | Public HTTPS image URL for the initial question or a follow-up. Maximum characters: 8192 ^https://[^\s]+$ |
continuable | boolean | No | Start a follow-up conversation; requires JSON output (omit output or use json; html must be false or omitted). Returned token expires 15 minutes after the first request; availability may end sooner. Default: false |
subsequent_request_token | string | No | Opaque token returned in result.content.subsequent_request_token. Bound to your account. Requires JSON output; omit output or use json and omit html or set false. Send a new query; retain original country, language, device and location controls. May be combined with continuable. Each completed follow-up is billed separately. Maximum characters: 65536 ^gam1\.[A-Za-z0-9_-]+$ |
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: comma-separated paths, indices, half-open slices [0:3], [] and .{nested,fields}; max 128 selections and 16 levels. Missing fields omitted. Include subsequent_request_token for follow-ups. Incompatible with HTML. Maximum characters: 8192 results[].{title,text,links},subsequent_request_token |
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 |
Only query is required. Omit unused parameters; unknown fields, null values, invalid types and incompatible combinations are rejected before charging. Coordinates must contain numeric latitude (−90 to 90) and longitude (−180 to 180). uule cannot be combined with location or coordinates. output=html or html=true cannot use json_restrictor; html=true cannot use output=json/md. Output filtering changes presentation, not billing.
Request example
curl "$GOANYAPI_API_ORIGIN/api/v1/google-ai-mode" \
-X POST -H "Authorization: Bearer $GOANYAPI_API_KEY" \
-H "Content-Type: application/json" \
--data '{"query":"What is x.com","country":"us","language":"en"}'Follow-up conversations
Conversations require JSON output (omit output or use json; html must be omitted or false). Start with continuable=true. Read result.content.subsequent_request_token (or search_parameters.subsequent_request_token). Send a new query and the returned token on the next POST. The continuable flag may also be supplied with the token. Retain original country/language/device/location/coordinates/uule; omitted controls are restored from the token, changed controls are rejected. Tokens are account-bound and expire at most 15 minutes after the initial request; search sessions may expire sooner. Restart with continuable=true if expired. Each completed continuation is billed separately. Conversation tokens are distinct from next_page_token. Keep the token field when using json_restrictor.
Response fields
| Field | Meaning |
|---|---|
data.endpoint | google-ai-mode |
data.query | Submitted controls; conversation credentials are 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 Mode 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, engine, operation, type, country, language, device, location, coordinates, uule, image_url, continuable, feature_available, pagination_limited and pagination_reason. |
data.result.content.has_next_page / next_page_token | Returned pagination metadata; this endpoint does not accept page tokens. Do not mistake it for a conversation token. |
data.result.content.subsequent_request_token | Opaque account-bound follow-up token; may also occur in search_parameters. Empty means unavailable. |
Business values may be null, empty or missing. All returned records and zero values are preserved. A title of AI Mode and an empty URL are valid; do not invent a page URL or infer failure. AI-generated text should be checked against its citations.
Saved response example
The following uses the supplied real snapshot. Billing fields are described above and are populated from the live account and current price on actual calls. Viewing this example makes no live request.
{
"code": "ok",
"message": "Saved example response",
"data": {
"endpoint": "google-ai-mode",
"query": {
"query": "What is x.com"
},
"result": {
"format": "json",
"content": {
"has_next_page": false,
"next_page_token": "",
"results": [
{
"address": "",
"category": "",
"description": "",
"id": "",
"name": "",
"phone": "",
"rating_source": "",
"snippet": "",
"thumbnail": "",
"url": "",
"website": "",
"latitude": 0,
"longitude": 0,
"position": 0,
"rank": 0,
"rating": 0,
"rating_max": 0,
"review_count": 0,
"coordinates": {
"latitude": 0,
"longitude": 0
},
"links": [
{
"title": "Business Insider",
"url": "https://www.businessinsider.com/history-behind-elon-musk-x-brand-that-may-replace-twitter-2023-7"
},
{
"title": "X.com",
"url": "https://x.com"
}
],
"text": "X.com is the official domain name and corporate identity for the social media platform formerly known as Twitter. What it is Today The Platform: It is the web address and brand for Elon Musk's microblogging and social networking site, which dropped the classic blue bird logo and name in July 2023. The \"Everything App\" Vision: Musk uses X as the foundation for a broader visionan all-in-one platform intended to blend social media, messaging, video, and future financial/shopping services. The Parent Company: Twitter was folded into X Corp., a private corporation owned by Musk. A Brief History of the Name 1999 (Online Banking): The name actually dates back to 1999, when Elon Musk co-founded X.com as an online financial services and banking startup. The PayPal Merger: X.com merged with a competitor named Confinity in 2000, and the combined company was eventually renamed PayPal. The Reacquisition: Musk bought back the x.com domain name from PayPal in 2017, noting it had strong sentimental value. The Twitter Takeover: After purchasing Twitter in late 2022 for $44 billion, Musk gradually transitioned the service over to the historic X.com brand. You can access the platform directly at X.com. Are you looking for information on how to use a specific feature on X, or are you trying to recover/manage an account there?",
"title": "AI Mode",
"type": "ai_summary"
}
],
"search_parameters": {
"continuable": false,
"coordinates": {
"latitude": 0,
"longitude": 0
},
"country": "us",
"device": "desktop",
"engine": "google",
"feature_available": true,
"image_url": "",
"language": "en",
"location": "",
"operation": "google_ai_mode",
"pagination_limited": false,
"pagination_reason": "",
"query": "What is x.com",
"subsequent_request_token": "",
"type": "search",
"uule": ""
},
"serp_features": [
{
"confidence": 0.75,
"data_cid": "",
"engine": "google",
"extracted_at": "2026-11-10T04:31:18.371Z",
"id": "f_ce11420d51cefb66",
"items": [],
"links": [
{
"title": "Business Insider",
"url": "https://www.businessinsider.com/history-behind-elon-musk-x-brand-that-may-replace-twitter-2023-7"
},
{
"title": "X.com",
"url": "https://x.com"
}
],
"live_busyness": {
"busyness_percent": 0,
"day": "",
"description": "",
"hour": 0
},
"popular_times": {},
"position": {
"absolute": 1
},
"source_result_ids": [],
"text": "X.com is the official domain name and corporate identity for the social media platform formerly known as Twitter. What it is Today The Platform: It is the web address and brand for Elon Musk's microblogging and social networking site, which dropped the classic blue bird logo and name in July 2023. The \"Everything App\" Vision: Musk uses X as the foundation for a broader visionan all-in-one platform intended to blend social media, messaging, video, and future financial/shopping services. The Parent Company: Twitter was folded into X Corp., a private corporation owned by Musk. A Brief History of the Name 1999 (Online Banking): The name actually dates back to 1999, when Elon Musk co-founded X.com as an online financial services and banking startup. The PayPal Merger: X.com merged with a competitor named Confinity in 2000, and the combined company was eventually renamed PayPal. The Reacquisition: Musk bought back the x.com domain name from PayPal in 2017, noting it had strong sentimental value. The Twitter Takeover: After purchasing Twitter in late 2022 for $44 billion, Musk gradually transitioned the service over to the historic X.com brand. You can access the platform directly at X.com. Are you looking for information on how to use a specific feature on X, or are you trying to recover/manage an account there?",
"title": "AI Mode",
"type": "ai_summary"
}
],
"subsequent_request_token": ""
}
}
}
}Privacy and errors
zero_trace=true skips query and response artifact storage; billing and operational metadata remain. It is not anonymous billing or deletion of past requests. Tokens are not copied into usage metadata. 400 invalid_params: invalid body or conversation token; 401: authentication required; 402 insufficient_credits: insufficient balance; 429: rate limited; 502 request_failed: search or response failure; 504 request_timeout: request timed out; 503 service_not_configured: service or price unavailable. Failures do not consume credits. Retrying a completed request is a new billable request.