JustSERPDocs
Google

Google AI Overview

The AI Overview Google shows above its results, in full, with the businesses and sources it names.

GET
/v1/google/ai-overview

The AI Overview Google shows above its results, in full, with the businesses and sources it names. Most searches have none, and answer_status: "no_answer" is an answer: count it as a result. Coordinates place the search; country and language set Google's gl and hl.

In the document form. $1 request $2 q (the question) or page_token, and no query, is the document-form Google AI Overview call, answered as the document: search_metadata, search_parameters, local_results, inline_shopping, text_blocks, markdown, reference_links (no search_information). location, uule or latitude with longitude place the search; link: resolved expands Google's /goto links. A page_token must be one this API issued; any other is a 400. Not returned: web_results, a reference's date and thumbnail. A results page with no Overview is text_blocks: [].

Authorization

headerX-API-Key<token>

Your API key.

Query Parameters

cancel_token?string

A name you make up for this request (a UUID is fine), so you can later GET /v1/cancel with it. Only you know it, so only you can cancel. Use a new one for every request, retries included: a cancelled token stays cancelled for a few minutes.

Length1 <= length <= 128
query?string

The question, as it is to be asked. 1 to 2000 characters after trimming.

Length1 <= length <= 2000
location?|

A canonical place name, e.g. "Austin,Texas,United States".

latitude?number

Send with longitude.

Range-90 <= value <= 90
longitude?number
Range-180 <= value <= 180
q?string
Length1 <= length <= 8193
page_token?string

A token this API issued; any other token is a 400.

uule?string
gl?string
Default"us"
hl?string
Default"en"

Response Body

The answer: with query and location, ours; with q, the document.

application/json
  1. response

One shape for the AI engines. What each fills:

Engineanswer_statusmodelbusinessescitationslocation_used
google_ai_overviewanswered or no_answernullwith Google ids when shown as cards; kgmid only for a linked nametitle, url, snippet, sourcewhen the footer says, source: device
google_ai_modeanswerednullusually with Google ids, rating, reviewstitle, url, snippet, sourcenull
chatgptanswerednullfrom place cards, with maps_url; no idsa chip's citation is the site's origin onlynull on today's pages

Identical questions get different answers; asking again is not a cache hit.

search_metadata*
search_parameters*

The request's own fields as sent, engine first, without cancel_token.

search_information*

The parser's own, e.g. yelp_search's; otherwise {}.

answer_status?string

no_answer only from google_ai_overview in practice; for the others a page with no reply is parsed: false.

Value in"answered""no_answer"
model?string|null
answer_text?|

Plain text. Null with no_answer.

answer_markdown?|

Headings, lists, bold, tables; code fenced with its language, formulas as $LaTeX$. Prefer it for display.

businesses?array<>
citations?array<>
location_used?|null
Example Request
curl -X GET 'https://api.justserp.com/v1/google/ai-overview?query=Who+has+the+best+pizza+near+Chelsea%2C+New+York%2C+NY%3F&location%5Blatitude%5D=40.7455&location%5Blongitude%5D=-74.0083&location%5Bcountry%5D=us&location%5Blanguage%5D=en'
Example Response
{  "search_metadata": {    "id": "string",    "status": "Success",    "created_at": "string",    "request_url": "string",    "html_url": "string"  },  "search_parameters": {},  "search_information": {},  "answer_status": "answered",  "model": "string",  "answer_text": "string",  "answer_markdown": "string",  "businesses": [    {      "position": 0,      "name": "string",      "snippet": "string",      "place_id": "string",      "data_id": "string",      "data_cid": "string",      "kgmid": "string",      "website": "string",      "address": "string",      "phone": "string",      "latitude": 0,      "longitude": 0,      "rating": 0,      "reviews": 0,      "citation_indexes": [        0      ],      "maps_url": "string"    }  ],  "citations": [    {      "position": 0,      "url": "string",      "title": "string",      "snippet": "string",      "source": "string",      "date": "string"    }  ],  "location_used": {    "latitude": 0,    "longitude": 0,    "name": "string",    "source": "string"  }}