AnswerLine Sign in Start free

Engines

ChatGPT API

The answer ChatGPT gives real users, with every cited source, the searches it ran, product cards and brand mentions.

Price

5 credits per async request, 7 synchronous.

+2 for raw response, query fan-out, ads or shopping cards (once, however many you add)

Endpoint

POST /v1/monitor/chatgpt

Or queue it with POST /v1/async/task and taskType: "CHATGPT".

Request

curl -X POST "https://api.answerline.dev/v1/monitor/chatgpt" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"What are the best running shoes for flat feet?","country":"US","include":{"markdown":true,"searchQueries":true}}'

Request options

* required. Nested fields are written with a dot, e.g. include.markdown.

FieldTypeDescription
prompt * string The prompt to send to ChatGPT
country * string Country/region code for localized response
include object Optional flags for including additional response formats
include.html boolean Include a URL to the full HTML of the response
include.markdown boolean Include markdown-formatted response in the result
include.rawResponse boolean Include ChatGPT's raw response payload
include.searchQueries boolean Include the query fan-out ChatGPT used to generate the response
include.ads boolean Include ads displayed in ChatGPT response
include.shopping boolean Include shopping cards and inline products with pricing and offers. Adds +2 credits to the base cost (shared with rawResponse, searchQueries, and ads — enabling any one or any combination adds the same +2).
legacy boolean Serve ChatGPT's legacy desktop interface instead of the default mobile-web one. The legacy interface streams the answer as an event stream, so `result.model`, `result.searchQueries` and `result.mapSearchQueries` are populated. Best-effort and temporary: OpenAI controls which interface it serves and can retire the legacy one at any time, so a request can still come back in the mobile-web shape. Handle both. Defaults to false.
disableWebSearch boolean Do not force ChatGPT's web search. answerline returns the answer ChatGPT gives on its own, which uses web search only when ChatGPT decides to, so `result.sources`, `result.citationPills` and `result.searchQueries` are often empty. Defaults to false: web search is forced on every request.
state string State code for sub-country geo-targeting (e.g., "CA"). Only valid with country "US".

What you get back

Field in resultTypeDescription
textstringChatGPT's response text
markdownstringChatGPT's response formatted in Markdown (included when include.markdown is true)
sourcesobject[]Array of sources referenced in the response. Returns empty array when no sources are available.
searchQueriesstring[]Array of query fan-out ChatGPT used to generate the response (included when include.searchQueries is true)
shoppingCardsobject[]Array of shopping/product cards extracted from the response. The field is omitted entirely from `result` when `include.shopping` is `false` or unset — clients should treat it as optional rather than expecting an empty array.
inlineProductsobject[]Array of inline products with pricing and offers. The field is omitted entirely from `result` when `include.shopping` is `false` or unset — clients should treat it as optional rather than expecting an empty array.
entitiesobject[]Array of entities extracted from the response (when available)
citationPillsobject[]Array of inline citation pills extracted from the response (when available). These are citations that appear inline within the text. Each entry is one (pill, source) pair; group by `citationPillId` to recover pill-level structure.
adsobject[]Array of ads served in the ChatGPT response (included when include.ads is true). OpenAI serves candidate ads but the interface renders at most one; use `rendered` to identify which were actually shown.
modelstringThe ChatGPT model used to generate the response. Empty on responses served through OpenAI's mobile-web format.

Full field definitions are in the API reference.

Other engines