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.
Endpoint
POST /v1/monitor/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
| Field | Type | Description |
|---|---|---|
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 result | Type | Description |
|---|---|---|
text | string | ChatGPT's response text |
markdown | string | ChatGPT's response formatted in Markdown (included when include.markdown is true) |
sources | object[] | Array of sources referenced in the response. Returns empty array when no sources are available. |
searchQueries | string[] | Array of query fan-out ChatGPT used to generate the response (included when include.searchQueries is true) |
shoppingCards | object[] | 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. |
inlineProducts | object[] | 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. |
entities | object[] | Array of entities extracted from the response (when available) |
citationPills | object[] | 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. |
ads | object[] | 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. |
model | string | The ChatGPT model used to generate the response. Empty on responses served through OpenAI's mobile-web format. |