Skip to main content
GET
Ask ChatGPT
Ask the real chatgpt.com a question anonymously and get the answer back as JSON — plus every web source ChatGPT retrieved, which of those it cited, and exactly which span of the answer each citation supports. Accepts GET (query params) or POST (JSON body) with identical fields. Credits: 20
Typical latency is 20-25s ungrounded, 30-70s with web search — this is a live answer, not a cache. Set your client timeout to at least 60 s.

Authorization

string
required
Your ScrapeBadger API key.

Query Parameters

string
required
The question to ask. Maximum 4,096 characters. Each request is standalone — there is no conversation memory, so include all the context you need here.
string
default:"US"
ISO-3166 alpha-2 egress country, e.g. US, GB, DE. Changes the localised results ChatGPT retrieves.
Whether ChatGPT should browse the web. One of:
  • auto — let ChatGPT decide (default).
  • force — instruct it to search the web.
  • off — answer from the model’s own knowledge only.
Check web_search_triggered in the response for what actually happened.
string
Public http(s) URL of an image to attach to the prompt. ChatGPT looks at the picture and answers about it. JPEG, PNG, GIF, WEBP and BMP; up to 5 MB.Supply the picture either as image_url or as image_base64 — sending both is a 400.
string
The image itself, base64-encoded — POST only, since a whole image does not belong in a query string. A bare base64 payload and a data:image/png;base64,... URL are both accepted.
An image ask is slower than a text one: ChatGPT uploads the picture before it starts answering. Allow 90-150 s.
This is image input only. Anonymous chatgpt.com will not GENERATE an image — its own logged-out page gates that behind a login — so no request to this endpoint can return a picture it drew. images in the response is what the answer displayed.

Response

string
Echo of the prompt you sent.
string
The answer as plain text. Citation offsets index into this string.
string | null
The answer with its original Markdown formatting, when available.
Citation[]
The sources ChatGPT actually referenced in the answer.
SearchResult[]
The full set ChatGPT retrieved — including results it looked at but did not cite. Empty when web_search_triggered is false.
MediaItem[]
Images the answer displayed — product shots, article art and other pictures a web-grounded answer pulls in. Favicon-sized assets are excluded. Never a generated image: see the warning above.
string[]
Distinct hostnames across the cited sources — a quick view of who ChatGPT trusted.
boolean
Whether ChatGPT actually browsed the web for this answer.
string[]
ChatGPT’s internal reference markers, e.g. turn0search1, turn0news20.
string | null
Which model answered, e.g. gpt-5-5. Reported, not requestable.
string | null
Identifier of the one-shot exchange. Not a handle you can continue from.
string | null
Identifier of the answer message.
string
Echo of the egress country used.
integer
Length of answer in characters.
integer
Number of entries in citations.
integer
End-to-end time to produce the answer, in milliseconds.
number | null
Answer creation time as a Unix timestamp.
string | null
Answer creation time as an ISO-8601 UTC string.

Example

Response
search_results is the full retrieved set; citations is the subset that made it into the answer. When web_search_triggered is false, both are empty and ChatGPT answered from its own knowledge — that is a valid response, not an error.

Asking about an image

Attach a picture and ChatGPT answers about it. image_url works on GET and POST; image_base64 is POST only.
An image ChatGPT cannot read is a 400 with "code": "invalid_image", raised before the request reaches a browser — so a broken picture never costs you credits. Sending both image_url and image_base64 is also a 400.
ChatGPT is non-deterministic. The same prompt can return different wording and different sources on each call. For tracking, sample on a schedule and aggregate.