# ChatGPT Scraper API - Prompt-to-Reply as Structured JSON > Source: https://scrape.do/products/ready-api/chatgpt-scraper/ Send a prompt to ChatGPT and get the full assistant reply back as structured JSON. One GET request, no account, no session state, no streaming to assemble on your side. > Each successful request costs **25 credits**. **ChatGPT Replies as Structured JSON** Send a single prompt and get the full assistant reply back as parsed JSON. No login, no cookies, no session state. The streaming message envelope is assembled server-side and handed to you ready to use, complete with citations, model, and finish reason. ![ChatGPT Replies as Structured JSON](/uploads/chatgpt-api.png) ## Highlights ### One Prompt In, One Clean Reply Out - Send a prompt with a single `GET` request. Get back the **full assistant reply, citations, and model metadata** in one JSON envelope. No account to manage, no cookies to refresh, no streaming protocol to assemble. - Each call is stateless. Build prompt batches, evaluation harnesses, or research pipelines without juggling conversation IDs or session tokens. Pay only for replies that actually finish. ### Citations and Metadata, Already Parsed - When the model cites sources, you get the **resolved URLs** in a `content_references[]` array on the message metadata. Inline citation delimiters are stripped from the visible text so `parts[0]` reads cleanly. - The envelope also includes `model_slug` (which ChatGPT model answered), `finish_details` (stop reason), `message.id`, and `conversation_id`. Everything you need to log, audit, or chain replies into a downstream pipeline. ## How It Works ### Prompt to Reply Send a text prompt as the q parameter. The plugin opens a chatgpt.com session server-side, collects the streamed assistant message, and returns the fully assembled envelope. No conversation state, no cleanup on your side. ![Prompt to Reply](/uploads/chatgpt-results.png) **cURL (API mode)** ```bash curl --location --request GET 'https://api.scrape.do/plugin/chatgpt/chat?token=&q=Explain+how+rainbows+form' ``` **Python (API mode)** ```python import requests import json token = "" url = f"https://api.scrape.do/plugin/chatgpt/chat?token={token}&q=Explain+how+rainbows+form" response = requests.request("GET", url) print(json.dumps(response.json(), indent=2)) ``` **Node.js (API mode)** ```javascript const axios = require('axios'); const token = ""; const url = `https://api.scrape.do/plugin/chatgpt/chat?token=${token}&q=Explain+how+rainbows+form`; axios.get(url) .then(response => { console.log(JSON.stringify(response.data, null, 2)); }) .catch(error => { console.error(error); }); ``` *(Go, Ruby, Java, C#, PHP examples are also available on the HTML version.)* **Example response** ```json { "data": { "message": { "id": "f0a2b1c4-1234-5678-9abc-def012345678", "status": "finished_successfully", "content": { "content_type": "text", "parts": [ "Rainbows form when sunlight is refracted, reflected, and dispersed inside water droplets in the atmosphere..." ] }, "metadata": { "model_slug": "gpt-5", "finish_details": { "type": "stop" }, "content_references": [ { "type": "webpage", "title": "How Rainbows Form, NOAA SciJinks", "safe_urls": ["https://scijinks.gov/rainbow/"] } ] } }, "conversation_id": "9b8a7c6d-0011-2233-4455-667788990011" } } ``` ## FAQ ### How is this different from the OpenAI API? The OpenAI API requires an OpenAI account, a paid plan, API key management, and per-token billing. This plugin scrapes the public `chatgpt.com` web product, so there is no OpenAI account to maintain on your side. Every successful call is a flat **25 credits**, regardless of prompt length or model output. Useful when you want the same conversational answers the web app gives, not a separate production-grade contract with OpenAI. ### Which ChatGPT model does it use? Whichever model `chatgpt.com` serves to anonymous users at request time, returned to you as `data.message.metadata.model_slug` (e.g., `gpt-5`). The plugin doesn't let you pin a specific model. If you need model-level guarantees, the OpenAI API is the better fit. ### Can I do multi-turn conversations? No. Each request is stateless. To continue a conversation, include the prior context inside the new `q`. The `conversation_id` in the response is informational and not reusable across calls. ### How do I handle citations? When the model cites sources, they come back in `data.message.metadata.content_references[]`. Each entry has a `type` (e.g., `"webpage"`), a `title`, and `safe_urls[]` with the resolved URLs. The visible reply text in `parts[0]` is already clean: inline citation delimiters are stripped server-side before the response is returned. ### Is the prompt size limited? Yes. Very long prompts are rejected before any model call runs, so no credits are spent on them. For long-context tasks, summarize first or use the OpenAI API directly. ### What does `finish_details` mean? `finish_details.type == "stop"` is a normal completion. Other values indicate the model stopped early (for example at a tool-call boundary or a content filter). Always check this field if your downstream consumer needs guaranteed full replies. ### How do I retry failed calls? The plugin returns standard `5xx` for transient upstream issues. Retry once with a short backoff. Successful calls cost 25 credits; failed calls don't consume credits. ### Where can I find the full API reference? The [ChatGPT API documentation](/documentation/chatgpt-api/) covers the full request shape, the response envelope structure, every field on the message metadata, and the citation reference object.