
A ChatGPT scraper API is an HTTP service that submits a prompt to the consumer ChatGPT experience and returns the visible answer as structured data. A useful response includes not only the generated text, but also citations, source links, and metadata needed to store or analyze the observation.
The name can be misleading. A ChatGPT scraper API is not the official OpenAI API, and it should never be presented as one.
ChatGPT scraper API vs. OpenAI API
The distinction is about the surface being measured.
The official OpenAI API lets developers generate responses with OpenAI models and tools inside their own applications. Its web search tool can retrieve current information and return sourced citations through the Responses API.
The consumer ChatGPT product is a separate experience. The official ChatGPT Search documentation describes search behavior in ChatGPT, including inline citations and the Sources panel.
A ChatGPT scraper API captures that consumer-facing result. This matters when the business question is:
What does ChatGPT show a user who asks this question?
If the business question is instead:
What answer does our application produce with a specific model and tool configuration?
then the official OpenAI API is the correct interface.
These measurements can inform one another, but one is not a substitute for the other.
What a ChatGPT scraper API returns
A well-designed API converts the rendered chat answer into JSON fields. The exact schema depends on the provider, but a useful payload contains:
- the prompt
- the final answer text
- content references or citations
- web search results consulted by the answer
- model or surface identifier, when available
- task ID
- country or locale
- capture timestamp
The separation between answer and citations is important. If source links remain embedded in markdown, every downstream user must parse the prose again.
How the request works
Scrapeless exposes its ChatGPT collector as the scraper.chatgpt actor within the LLM Chat Scraper family. The request uses a standard HTTP pattern:
- Endpoint:
POST https://api.scrapeless.com/api/v2/scraper/execute - Authentication:
x-api-token - Actor:
scraper.chatgpt - Input: a prompt and an optional country
Store your API key in an environment variable:
export SCRAPELESS_API_KEY=your_api_token_here
Then send a prompt:
curl -sS -X POST https://api.scrapeless.com/api/v2/scraper/execute \
-H "Content-Type: application/json" \
-H "x-api-token: ${SCRAPELESS_API_KEY}" \
-d '{
"actor": "scraper.chatgpt",
"input": {
"prompt": "What are the best tools for monitoring AI search visibility?",
"country": "US"
}
}'
The request shape is deliberately small. The managed service handles rendering, session behavior, and extraction behind the endpoint.
Understanding the response envelope
The top-level response uses a stable envelope:
{
"status": "success",
"task_id": "...",
"task_result": {
"prompt": "What are the best tools for monitoring AI search visibility?",
"model": "...",
"result_text": "...",
"content_references": [
{
"title": "...",
"url": "https://example.com/resource",
"attribution": "example.com"
}
],
"search_result": [],
"links": [],
"products": null
}
}
This sample is illustrative; fields may be empty or null on a particular run.
The main fields have distinct jobs:
-
statusindicates the outcome of the capture. -
task_ididentifies the observation for audit and storage. -
task_result.result_textcontains the answer body. -
task_result.content_referencesexposes citations as objects. -
task_result.search_resultcontains supporting search results when present. -
task_result.linkscontains additional links surfaced in the response. -
task_result.productsmay contain shopping-related data for relevant prompts and can otherwise be null.
Treat every optional field as nullable. A prompt can generate a complete answer with no citations, so an empty source list does not automatically mean the scraper failed.
A small Python client
The same request can be wrapped in a few lines of Python:
import os
from urllib.parse import urlparse
import requests
ENDPOINT = "https://api.scrapeless.com/api/v2/scraper/execute"
def capture_chatgpt(prompt: str, country: str = "US") -> dict:
response = requests.post(
ENDPOINT,
headers={
"Content-Type": "application/json",
"x-api-token": os.environ["SCRAPELESS_API_KEY"],
},
json={
"actor": "scraper.chatgpt",
"input": {"prompt": prompt, "country": country},
},
timeout=180,
)
response.raise_for_status()
return response.json()
def citation_domains(payload: dict) -> list[str]:
result = payload.get("task_result") or {}
references = result.get("content_references") or []
return [
urlparse(item.get("url", "")).netloc.lower()
for item in references
if item.get("url")
]
if __name__ == "__main__":
capture = capture_chatgpt(
"What are the best tools for monitoring AI search visibility?"
)
result = capture.get("task_result") or {}
print(result.get("result_text", ""))
print(citation_domains(capture))
The code preserves two important boundaries: the API response remains the source record, while citation-domain extraction is a downstream transformation that can be changed later.
Why location belongs in the data model
Country is not merely a networking detail. Search-grounded answers can draw on local sources, availability, and regional context. A monitoring program should therefore store the market used for every run.
If you compare a US capture with a German capture, treat them as two cohorts. Combining them into one trend can hide genuine localization differences.
The same rule applies to language. Prompt language, interface language, and geographic market are separate variables and should be recorded separately when the collection system exposes them.
Start Scraping with Scrapeless
Power up your web scraping and automation workflow with Scrapeless!
Sign up today and get $5 in free credit — no credit card required.Claim your free credit now in the Scrapeless Dashboard.
What developers use it for
Citation tracking
Extract the hostname from every citation URL and aggregate counts by domain, topic, platform, and market. This produces a citation-share view without relying on manual screenshots.
Brand monitoring
Run a stable set of category and comparison prompts. Record whether the answer mentions the target brand, how it is framed, and which evidence supports the claim.
Answer drift
Store repeated captures and compare answer text, named products, and cited domains. A diff can surface meaningful changes, but the system should preserve both originals rather than overwriting the older row.
Content research
Map recurring cited pages to prompt clusters. This shows which pages ChatGPT uses for definitions, comparisons, implementation advice, or buying decisions.
Evaluation datasets
Build time-stamped prompt–answer–citation triples for human review or automated evaluation. The task ID and raw response make every derived label traceable.
Common implementation mistakes
Calling the scraper “the ChatGPT API”
That wording implies an official OpenAI service. Use “ChatGPT scraper API” and identify the third-party provider clearly.
Assuming every answer has citations
Some prompts do not trigger web grounding. Code should accept an empty content_references array as a valid outcome.
Treating one run as a ranking
Generated answers vary. Report mention or citation rates over a defined sample, not a permanent position derived from one capture.
Dropping the raw payload
Schemas evolve and analysis needs change. Store the normalized fields your dashboard uses, but retain the original response so future transformations remain possible.
Mixing prompt versions
A small wording change can alter intent. Give prompts stable IDs and increment a version when wording changes. Do not compare two versions as if they were identical tests.
Ignoring timestamps
An answer without a capture time cannot support trend analysis. Store timestamps in a consistent standard inside the database, even if the publishing layer formats dates differently for readers.
When not to use a scraper API
Use the official OpenAI API when you are building an application, controlling the model and tools, or testing your own integration. Use a ChatGPT scraper API only when the consumer product itself is the target of observation.
Do not use either route to collect private conversations, other users’ account data, or restricted content. A responsible program stays with prompts the organization is authorized to submit and responses returned to that authorized session.
Where Scrapeless fits
The Scrapeless ChatGPT Scraper API guide documents the scraper.chatgpt request and response fields in more detail. The actor is part of the Universal Scraping API product line.
The same top-level envelope is designed to support neighboring AI-answer actors, while the contents of task_result remain platform-specific. That is a sensible integration pattern: normalize the stable transport contract and preserve the native result schema.
The takeaway
A ChatGPT scraper API captures the answer a user sees in the consumer ChatGPT product and returns it as structured JSON. It is useful for citation analysis, AI brand monitoring, answer drift, and evaluation datasets.
It is not the official OpenAI API. Use the official API to build with OpenAI models and tools; use a clearly identified scraper API when ChatGPT’s public answer surface is the object you need to measure.
Compliance note: Capture only publicly available answer data through sessions you are authorized to use. Follow applicable law, privacy obligations, and platform terms. This article is educational and is not legal advice.

Top comments (0)