← API Store
Search & SEOGoogle
Google AI mode answer
GET /google/v1/ai-modeEvery response includes credits_used: the credits this call cost.
Each call costs 4 credits; failed calls are free. Run it in the console playground to see a live result.
Parameters
| Name | Type | Description |
|---|---|---|
qrequired | string | Search query (also accepted as query or keyword). Example: coffee machine |
country | string | Results for this country (Google gl, and the location defaults to it). Two-letter code. Example: us |
location | string | Search as if from this place, e.g. `Austin,Texas,United States` (Google uule). Default: the country. |
language | string | Interface language (Google hl), e.g. en, de, pt-BR. Example: en |
lr | string | Only results in these languages, e.g. `en` or `en|de`. |
cr | string | Only results from these countries, e.g. `US` or `US|GB`. |
time | string | Only results from the past hour, day, week, month or year; `day_3` = past 3 days. |
date_from | string | Only results from this date (YYYY-MM-DD). |
date_to | string | Only results up to this date (YYYY-MM-DD). |
sort | string | `date` sorts newest first (news). |
tbs | string | Raw Google tbs filter, combined with the options above. |
google_domain | string | Google domain, e.g. google.co.uk. |
safe | string | SafeSearch: on or off. |
autocorrect | string | 0 searches the query exactly as typed (no spelling correction). |
filter | string | 0 also shows near-duplicate results. |
site | string | Only these sites, comma-separated (site:). |
exclude_sites | string | Leave these sites out, comma-separated (-site:). |
filetype | string | Only this file type, e.g. pdf. |
device | string | desktop (default) or mobile results. |
Every endpoint also takes: raw、fields、fresh、output、records
{
"all_sources": [
{
"google_link": "https://www.google.com/goto?url=CAEScwHrOzAV4J_lYpP0LxDfELCXYwH2f0YxZS51k-L0Vpep2u3kVAc2xwyktZfoRIlFNnIAzCNZFa2PrhoaLB3iIN8NllwuBWkJhwlh3XR6…",
"label": "Bon Appétit: Recipes, Cooking, Entertaining, Restaurants | Bon Appétit"
}
],
"answer": "Finding the right coffee machine depends entirely on how you like to brew your morning cup—whether you prefer a quick single-serve pod, a la…",
"blocks": [
{
"tag": "h3",
"text": "AI Mode reply for coffee machine"
},
{
"tag": "li",
"text": "Hamilton Beach 12 Cup Programmable Coffee Maker 52580270 46290"
},
"… 54 more"
],
"cached": false,
"credits_used": 1,
"images": [
"https://encrypted-tbn1.gstatic.com/faviconV2?url=https://www.google.com&client=AIM&size=128&type=FAVICON&fallback_opts=TYPE,SIZE,URL",
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRMaD5ca9hrUjjVZMWDV9OHsNGqfCeX-uaXPuu9lbIcEq12xfRCUJGRT7xNxfmDg3uCKbTb5I24ceT_Ct4",
"… 10 more"
],
"links": [
{
"href": "https://myactivity.google.com/search-services/history/search?utm_source=aim&utm_campaign=aim_tm",
"label": "See your Search history"
},
{
"href": "https://www.google.com/search-personalization/",
"label": "Personalization"
},
"… 44 more"
],
"query": "coffee machine",
"search_parameters": {
"autocorrect": true,
"country": "us",
"cr": null,
"device": "desktop",
"filter": true,
"google_domain": "google.com",
"language": "en",
"limit": 10,
"location": "United States",
"lr": null,
"q": "coffee machine",
"safe": null,
"start": 0,
"tbs": null,
"type": "web"
},
"sources": [
{
"google_link": "https://www.google.com/goto?url=CAEScwHrOzAV4J_lYpP0LxDfELCXYwH2f0YxZS51k-L0Vpep2u3kVAc2xwyktZfoRIlFNnIAzCNZFa2PrhoaLB3iIN8NllwuBWkJhwlh3XR6…",
"label": "Bon Appétit: Recipes, Cooking, Entertaining, Restaurants | Bon Appétit",
"url": "https://www.bonappetit.com/story/best-drip-coffee-makers"
}
]
} Response fields (40)
Field paths and types observed in the sample response; the live response is authoritative.
$ | object |
$.all_sources | array |
$.all_sources[] | object |
$.all_sources[].google_link | string |
$.all_sources[].label | string |
$.answer | string |
$.blocks | array |
$.blocks[] | object | string |
$.blocks[].tag | string |
$.blocks[].text | string |
$.cached | boolean |
$.credits_used | integer |
$.images | array |
$.images[] | string |
$.links | array |
$.links[] | object | string |
$.links[].href | string |
$.links[].label | string |
$.query | string |
$.search_parameters | object |
$.search_parameters.autocorrect | boolean |
$.search_parameters.country | string |
$.search_parameters.cr | null |
$.search_parameters.device | string |
$.search_parameters.filter | boolean |
$.search_parameters.google_domain | string |
$.search_parameters.language | string |
$.search_parameters.limit | integer |
$.search_parameters.location | string |
$.search_parameters.lr | null |
$.search_parameters.q | string |
$.search_parameters.safe | null |
$.search_parameters.start | integer |
$.search_parameters.tbs | null |
$.search_parameters.type | string |
$.sources | array |
$.sources[] | object |
$.sources[].google_link | string |
$.sources[].label | string |
$.sources[].url | string |