AI answers

What Gemini and ChatGPT answer to a prompt, as a visitor who is not signed in sees it: the text and the sources it cites, in order.

Embed
Preview of the card
<a href="https://scrapelyserp.com/docs/ai-answers"><img src="https://scrapelyserp.com/docs/_api/public/orgs/affc5b0f-d3c2-423a-8143-9d10db5736ae/spaces/981e6275-da3f-446c-82de-889f59c83b6f/pages/8eaeba0e-36c7-4235-abfa-40b198c68779/social-card.svg?v=3e7ae33eec8b" alt="AI answers" width="600" height="315"></a>

What Gemini and ChatGPT answer to a prompt, as a visitor who is not signed in sees it: the text and the sources it cites, in order.

At a glance

Track whether your brand and pages appear in AI answers. Each call asks one prompt of one assistant and answers { endpoint, url, credits, duration_ms, data } with data in one shape (AiAnswer): prompt, model, text (markdown), citations, refused and search_queries.

Every citation has position (1, 2, 3… in the order the assistant lists its sources), url (the page itself, never a redirect link or tracking parameters), title (null when unknown) and domain. Call-to-action links such as "Visit example.com" are not sources and are left out. A source appears once, however often the answer leans on it. An answer that cites nothing has an empty citations list. refused is true when the assistant declined to answer. search_queries lists what it searched for when it says, and is null when it does not.

An answer we could not read (blocked, or no answer came back) is 502 TARGET_FAILED and costs nothing; you never get an empty answer instead.

Endpoint

Asked from

Typical

GET /v1/structured/gemini/answer

country (2 letters, default us), zip

about 250,000 answers per credit, 5–10 s

GET /v1/structured/chatgpt/answer

country (2 letters, default us), zip

about 10,000 answers per credit, 8–20 s

Answers vary from one call to the next, as they do for any visitor: ask the same prompt more than once to measure how often a brand appears. country sets where the visitor appears to be, and zip narrows that to a US area; both change what is searched and cited.

Gemini

Parameter

Type

Default

Description

prompt (required)

string

—

What to ask, up to 2,000 characters.

country

string

us

Two-letter country to ask from.

zip

string

—

A 5-digit US ZIP code. Results reflect that area (local prices, stock and nearby results). Unknown ZIP codes are a free 400.

curl -G "https://api.scrapelyserp.com/v1/structured/gemini/answer" \
  -H "Authorization: Bearer $SCRAPELY_API_KEY" \
  --data-urlencode "prompt=What is the best CRM for a small business?" \
  -d country=us

Full reference → GET /v1/structured/gemini/answer

ChatGPT

ChatGPT answers with web search, as a visitor who is not signed in sees it. text marks where it cites a source with [n], meaning citations[n - 1].

Parameter

Type

Default

Description

prompt (required)

string

—

What to ask, up to 2,000 characters.

country

string

us

Two-letter country the visitor appears to be in.

zip

string

—

A 5-digit US ZIP code. Results reflect that area (local prices, stock and nearby results). Unknown ZIP codes are a free 400.

Full reference → GET /v1/structured/chatgpt/answer

Updated