Skip to main content
The ChatGPT Scraper API enables you to programmatically interact with ChatGPT and automatically collect AI-generated responses along with structured metadata. Instead of manual data collection, you can retrieve results as parsed JSON, raw HTML, or other formats for seamless integration into your workflows.

Request and response flow

The ChatGPT scraper handles the rendering, parsing, and delivery of results in your requested format. You provide your prompt, API credentials, and optional parameters to receive structured responses.

Making a request

Send a POST request to the API endpoint with your prompt and configuration:
import requests

payload = {
    'prompt': 'Compare the top 3 programming languages for web development in 2025',
    'country': 'US',
    'include': {
        'markdown': True,
        'rawResponse': True,
        'searchQueries': True
    }
}

response = requests.post(
    'https://api.cloro.dev/v1/monitor/chatgpt',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json=payload
)
Set an appropriate timeout of 120-180 seconds when making requests, as ChatGPT responses may take time to generate depending on complexity.

Authentication

The API uses Bearer token authentication. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Every request must include this header to authenticate your API calls.

Rendering and parsing process

When you submit a request, the ChatGPT scraper:
  1. Handles the rendering - Manages authentication, sessions, and anti-bot systems automatically
  2. Processes the prompt - Sends your prompt to ChatGPT with any specified parameters
  3. Collects the response - Captures the complete AI-generated response as it streams
  4. Parses the data - Extracts structured metadata including shopping cards, search queries, and more
  5. Delivers results - Returns the data in your requested format (JSON, Markdown, etc.)
The scraper eliminates the need for you to manage authentication, sessions, or anti-bot systems yourself.

Request parameters

You can customize your requests with these parameters:
ParameterDescriptionDefault
prompt*The prompt or question to send to ChatGPT (1-10,000 characters)
countryOptional country/region code for localized monitoring (e.g., US, GB, DE)
include.markdownInclude response in Markdown format when set to truefalse
include.rawResponseInclude raw streaming response events for debugging (+2 credits)false
include.searchQueriesInclude query fan-out ChatGPT used to generate response (+2 credits)false
* Mandatory parameter

Response structure

The API returns a structured JSON object containing ChatGPT’s response and metadata:
{
  "status": "success",
  "result": {
    "model": "gpt-5-mini",
    "text": "When comparing programming languages for web development in 2025...",
    "markdown": "**When comparing programming languages for web development in 2025**...",
    "shoppingCards": [...],
    "searchQueries": ["web development languages 2025"],
    "rawResponse": [...]
  }
}

Timeout recommendations

We recommend setting a timeout of 120-180 seconds for your HTTP requests. ChatGPT responses can take time to generate depending on the complexity of your prompt.
For production environments, implement a retry mechanism in case of failures rather than relying solely on timeouts. The cloro system retries automatically on its end to ensure reliable delivery.

Output formats

You can retrieve responses in multiple formats:

Plain text

Default text format in the result.text field

Markdown

Formatted response when include.markdown is true

Structured JSON

Complete metadata and parsed data

Raw HTML

Raw response data for advanced debugging
Alternatively, you can extract the data in Markdown format for easier integration with AI tools and documentation workflows.

Build docs developers (and LLMs) love