Docs / API reference /
Track ChatGPT answers
POST https://api.answerline.dev/v1/monitor/chatgpt
Get structured output from ChatGPT for any prompt in supported regions: the answer, its cited sources, ads, shopping cards and brand entities
From $1.00 per 1,000 Failed requests are free Async task type CHATGPT ChatGPT fields and prices
Body
-
promptstring required -
Prompt submitted to ChatGPT, up to 2,000 characters. A longer prompt is refused with a 400 that states its length.
-
countrystring required -
Code of the country or region used to localize the response
-
includeobject -
Flags that add extra output formats to the response (optional)
8 properties
-
include.htmlboolean -
A copy of the ChatGPT page as it was when the answer was captured, stored on our file host and linked in
html, to check the answer against. It is free. -
include.markdownboolean -
Add a markdown version of the response to the result
-
include.rawResponseboolean -
Return the answer as normalized stream events. For the engine's answer as received, use
include.rawWire. -
include.searchQueriesboolean -
Return the fan-out queries ChatGPT issued while producing the response (empty on the answers served today)
-
include.adsboolean -
Return ads that ChatGPT shows in its response (empty on the answers served today)
-
include.shoppingboolean -
Return shopping cards plus products shown inline (inlineProducts), with their prices and offers. Free. Today the products from ChatGPT's shopping search come in inlineProducts and shoppingCards is usually empty.
-
include.rawWireboolean -
Return the engine's own response as received in result.rawWire: the answer stream, the rendered results pages or the RSS feed, without Gemini's detected location or ChatGPT's session tokens; null where it was not captured. Free. See https://answerline.dev/docs/output-formats#raw-wire
-
include.screenshotboolean -
Return a full-page PNG screenshot of the engine's page as it showed the finished answer, in result.screenshot: a link, or one link per results page on Google Search. On ChatGPT, Gemini, AI Mode, Google Search, Perplexity and Grok; other engines refuse it with a 400. Absent when the answer was read without a rendered page or its page was not available. Free. See https://answerline.dev/docs/output-formats#screenshots
-
-
legacyboolean -
Accepted for compatibility with clients that ask for ChatGPT's older desktop interface. Not served yet: the answer arrives in the same shape whatever its value. Default: false.
-
disableWebSearchboolean -
Accepted for compatibility. On every answer served today ChatGPT decides by itself whether to search the web, whatever this value, and
result.provenance.searchModerecordsengine-default. Default: false. -
statestring -
US state code (e.g. "CA", "DC" included). Sent without a country, the request asks for the US; sent with any country other than "US", it is refused with a 400, uncharged. ChatGPT and Gemini answer as a person in that state sees it; every other engine accepts it and answers for the whole US, at the price of a request without it. provenance.requestedState reports the state asked. See https://answerline.dev/docs/coverage#states
-
answerDepth"any" | "full" | "quick" -
Accepted so existing requests stay valid; it does not change the answer or the price. Every engine writes one depth: Perplexity answers every request with its Quick Search answer, and provenance.answerDepth says quick. See https://answerline.dev/docs/engine-features/#answer-depth
Returns
-
result.textstring -
Text of ChatGPT's reply
-
result.searchResultsobject[] -
Every page ChatGPT searched for the answer (its "Searched N websites"), cited or not, in the order it lists them. Absent when the answer did not search or ChatGPT does not list them.
-
result.sourcesobject[] -
Sources the response cites; an empty array if there are none.
-
result.htmlstring -
Present when include.html is true: the link to the stored copy of the ChatGPT page.
-
result.markdownstring -
ChatGPT's reply as Markdown; returned only if include.markdown is true
-
result.rawResponseobject[] -
The answer as normalized stream events (present when include.rawResponse is true). For the engine's answer as received, use include.rawWire.
-
result.searchQueriesstring[] -
The fan-out queries ChatGPT issued while producing the response (present when include.searchQueries is true)
-
result.modelstring -
ChatGPT model that produced the answer. Empty when ChatGPT names no model.
-
result.shoppingCardsobject[] -
Shopping/product cards parsed from the response. When
include.shoppingisfalseor not set,resultdoes not contain this field at all, so treat it as optional instead of relying on an empty array. -
result.inlineProductsobject[] -
Products shown inline, with their prices and offers. When
include.shoppingisfalseor not set,resultdoes not contain this field at all, so treat it as optional instead of relying on an empty array. -
result.entitiesobject[] -
Entities parsed from the response (if any). With include.shopping, an entity ChatGPT links to a product also carries
product. -
result.mapobject[] -
Map entries for businesses or places parsed from the response (if any). Entries originate from the enrichment providers ChatGPT uses (Yelp, Google Business), with field names in camelCase. Only the fields filled in most often appear here; see the API reference for every field.
-
result.citationPillsobject[] -
Inline citation pills parsed from the response (if any), i.e. citations shown in the body of the text. Every entry represents a single (pill, source) pair; grouping on
citationPillIdrebuilds each pill. -
result.adsobject[] -
Ads delivered with the ChatGPT response (present when include.ads is true). Several candidate ads are sent by OpenAI, yet the interface displays one at most; check
renderedto see which ones were really displayed. -
result.imagesobject[] -
The pictures ChatGPT shows in its answer, beside the places and things it names, in answer order: medium image, the page each comes from (url), its title and the picture shown (thumbnail). Absent when the answer shows none.
-
result.screenshotstring -
Present when include.screenshot is true and the answer came from a rendered page: the link to the PNG screenshot of the ChatGPT page once the answer finished.
-
result.linksobject[] -
The links in the answer's text, in the order a reader meets them: one entry per web (http or https) link the answer shows, images and code aside, with the words it shows (text), where it goes (url), its domain and its 1-based position. Sources cited by pills are in citationPills; links to the same page appear in both when the answer does both. Empty when the text links nowhere.
Responses
- 200
- ChatGPT monitoring result (success)
- 400
- Bad Request - the request failed validation
- 401
- Unauthorized - authentication failed
- 403
- Forbidden - INSUFFICIENT_CREDITS: the balance does not cover this request
- 404
- Not Found - No such route, or the engine is paused
- 409
- Conflict - the resource is in a conflicting state
- 429
- Too Many Requests - the call could not start now (
CONCURRENT_LIMIT_EXCEEDED), or the service dropped the request because it was overloaded (SERVICE_OVERLOADED); that case returnsRetry-Afterwithout any limit headers.RATE_LIMIT_EXCEEDED, withRetry-After, is sent only when one address presented too many unknown keys - 499
- Client Closed Request - the client cancelled the request
- 500
- Internal Server Error
- 502
- Bad Gateway - the engine failed