API Reference
Query ChatGPT programmatically and receive its answer as clean, structured data — the reply text plus the sources, product cards, and sponsored placements that appear alongside it.
Overview
Submit a natural-language prompt and cloro runs it against ChatGPT on your behalf, then parses the rendered response into a predictable JSON payload. This lets you track how a brand, product, or topic is described, which pages the model cites as sources, and whether shopping or advertising units are surfaced for a given query. Use the include block to opt into heavier fields — raw HTML, markdown, the underlying streamed events, and commercial units — so responses stay lean unless you explicitly ask for more.
Request parameters
| Field | Type | Description |
|---|---|---|
| prompt | string | The question or instruction sent to ChatGPT. Required. |
| country | string | Two-letter ISO country code used to localize the response (for example US). |
| include | object | Optional flags that add extra fields to the result. All default to false. |
| include.html | boolean | Return a hosted URL pointing to the captured HTML of the answer. |
| include.markdown | boolean | Return the answer rendered as markdown text. |
| include.rawResponse | boolean | Return the underlying stream of model events exactly as received. |
| include.searchQueries | boolean | Return the search queries the model issued while composing its answer. |
| include.ads | boolean | Return any sponsored brand units detected in the response. |
| include.shopping | boolean | Return shopping cards and product listings when present. |
Response fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the request completed successfully. |
| result | object | Container for the parsed answer and its associated data. |
| result.text | string | The plain-text answer produced by ChatGPT. |
| result.sources | array | Citations backing the answer, each with a position, URL, and metadata. |
| result.sources[].position | number | Order in which the citation appears. |
| result.sources[].url | string | Link to the cited page. |
| result.sources[].label | string | Display title of the cited page. |
| result.sources[].description | string | Short summary of the cited content. |
| result.sources[].footnote | boolean | Whether the citation was rendered as a footnote reference. |
| result.sources[].datePublished | string | Publication date of the source, when available. |
| result.html | string | Hosted URL of the captured HTML, present only when requested. |
| result.markdown | string | Markdown rendering of the answer, present only when requested. |
| result.rawResponse | array | Raw model event stream, present only when requested. |
| result.ads | array | Sponsored brand units, each with brand details and product cards. |
Response example
{
"success": true,
"result": {
"text": "Acme Corp is a mid-sized manufacturer known for industrial tooling and, separately, as a running gag in classic animation.",
"sources": [
{
"position": 1,
"url": "https://example.com/acme-overview?utm_source=chatgpt.com",
"label": "Acme Corp — Company Overview",
"description": "A concise profile covering Acme Corp's history, products, and market position.",
"footnote": false,
"datePublished": "2025-03-18"
},
{
"position": 2,
"url": "https://example.org/acme-tooling-review?utm_source=chatgpt.com",
"label": "Reviewing Acme's Industrial Tooling Line",
"description": "An in-depth look at build quality and pricing across Acme's tooling range.",
"footnote": true
}
],
"html": "https://storage.cloro.cloud/results/9f2c14a7-3b60-4de1-a0f8-72d9c1e4b501/page-1.html",
"markdown": "Acme Corp is a mid-sized manufacturer known for industrial tooling...",
"ads": [
{
"brand": {
"name": "Acme Shoes",
"url": "https://www.acmeshoes.com?utm_source=chatgpt.com",
"favicon": "https://images.example.com/favicon.ico"
},
"cards": [
{
"title": "Premium Running Shoes",
"body": "Lightweight performance shoes with responsive cushioning.",
"url": "https://www.acmeshoes.com/running?utm_source=chatgpt.com",
"image": "https://images.example.com/product.jpg"
}
]
}
]
}
}
Notes
Authenticate every call with a bearer token in the Authorization header and send the body as application/json. The endpoint may return 400, 401, 403, 404, 409, 429, 499, 500, or 502 depending on the request and upstream conditions; handle 429 with backoff and retry. Keep the include flags off unless you need the extra fields — smaller payloads are faster to transfer and parse. For access issues or unexpected results, reach out to [email protected].