ChatGPT-Antworten für die Forschung sammeln: So baut man einen Datensatz
Für einen belastbaren Datensatz sollten Prompts und Länderliste eingefroren und jeder Prompt mehrfach pro Land über die ChatGPT-Weboberfläche abgefragt werden. Gespeichert werden rohes JSON, gerendertes HTML, Zeitstempel und das jeweils genutzte Modell, da einzelne Antworten aus einem sich ständig ändernden System nur wenig aussagen.

Freeze a prompt set and a list of countries, collect every prompt several times in each country from ChatGPT's web interface, and store the raw JSON, the rendered HTML, the timestamp and the model ChatGPT used with every answer. A single answer per prompt is a sample of one from a system that changes between runs and between weeks.
Treat each answer as one observation of a cell: prompt × country × wave × sample.
For scale, a 2026 preprint ran each of 80 questions 20 times on two ChatGPT versions. A Hamburg study of more than 24,000 German news answers over five weeks found that source diversity changed from week to week, as The Decoder reported.
ChatGPT's answer to one prompt is a draw from a distribution. The searches ChatGPT runs for a prompt vary in length and structure between runs, and the Hamburg study saw the cited sources shift from week to week. In our daily monitoring, a brand that ChatGPT named for a prompt on one day was named again the next day 75% of the time at the median. If your measure is a share (how often a brand is named, how often a domain is cited), you need several draws per cell to estimate it, and a confidence interval to report it.
Spread the samples. Five samples in one minute measure run-to-run noise; five samples on five days also catch day-to-day drift, at the same cost.
The web app does not let you pin a model. ChatGPT picks one for each request, and the choice changes over time. Our monitoring logged these shares of ChatGPT answers per week, on the same prompt set:
The mini model appeared on 2.5% to 4% of answers in three August weeks and on none from the week of 31 August. A study that ran from August into October would compare three models without knowing it, unless it logged the field.
In the API docs, null marks answers that OpenAI served in its mobile-web format, which also has no searchQueries and a shorter sources list. Keep those rows and code null as its own value. The request flag legacy: true asks for the legacy interface, which returns the model name, on a best-effort basis.
For time, keep task.createdAt (when you submitted) and your own receipt time. task.latencyMs is the processing time and leaves out the queue wait, so neither field alone is the exact moment ChatGPT answered.
The async batch endpoint takes up to 500 tasks per request and calls your webhook once for each finished task. Its parameters are in the batch endpoint reference. This submits one wave:
import itertools import os import requests PROMPTS = { "p001": "What is the best CRM for a small business?" } # frozen set COUNTRIES = [ "US", "GB", "IE" ] SAMPLES = 5 WAVE = "2026-11-16" tasks = [ { "taskType": "CHATGPT", "idempotencyKey": f "v1-{pid}-{country}-{WAVE}-s{s}", "webhook": { "url": "https://example.org/webhook" }, "payload": { "prompt": text, "country": country, "include": { "html": True } }, } for ( pid, text ), country, s in itertools. product ( PROMPTS. items ( ), COUNTRIES, range ( SAMPLES ) ) ] for i in range ( 0, len ( tasks ), 500 ): r = requests. post ( "https://api.cloro.dev/v1/async/task/batch", headers = { "Authorization": f "Bearer {os.environ['API_KEY']}" }, json = tasks [ i: i + 500 ], timeout = 60, ) data = r. json ( ) print ( data [ "summary" ] ) for res in data [ "results" ]: if not res [ "success" ]: print ( res [ "index" ], res [ "error" ] [ "code" ] ) Enter fullscreen mode Exit fullscreen mode The idempotencyKey must be unique across your account, so a resubmitted task returns 409 and is not charged twice. It also comes back in every webhook as task.idempotencyKey, so each answer maps to its cell without a lookup table.
The receiver stores the raw body under the task ID. The service makes up to 5 delivery attempts, so the same task can arrive twice, and writing to <task.id>.json makes the second copy harmless:
import json import pathlib from flask import Flask, request app = Flask ( __name__ ) RAW = pathlib. Path ( "raw" ) @app. post ( "/webhook" ) def receive ( ): body = request. get_data ( ) # raw bytes, also needed for signature checks task = json. loads ( body ) [ "task" ] ( RAW / f "{task['id']}.json" ). write_bytes ( body ) return "", 200 Enter fullscreen mode Exit fullscreen mode Two clocks run out after about 24 hours: finished tasks are deleted from the API, and the response.html link expires. A second job should fetch each HTML file and store it beside the JSON on the day it arrives. The queue holds up to 100,000 waiting tasks per organization.
A field you ignore today, such as entities or footnote on each source, can become a variable in the next paper, so keep the raw JSON.
An async ChatGPT answer costs 5 credits. Query fan-out ( include.searchQueries ) adds 2, and a US state adds 2. HTML and Markdown are free, and failed tasks cost nothing. Credits expire at the end of each monthly cycle, so a long study pays per month of collection.
The 500 × 3 × 5 design uses all of the Lite credits, with none left for a rerun. Lite allows 10 concurrent tasks and Hobby 20, which sets how fast a wave finishes.
OpenAI's Terms of Use (effective 1 January 2026) list "Automatically or programmatically extract data or Output" among the things users may not do. Your ethics board or legal team should see that clause and your collection method before the study starts.
In the paper, report the collection route, the logged-out state, the countries, the dates of each wave, and the share of each model value, null included, so that others can compare their data with yours.
The model shares come from our own monitoring of ChatGPT on a fixed prompt set, 10 August to 15 November 2026, as shares of successful answers per week. The endpoint paths, fields, limits and credit prices come from the API docs, and the plan prices from the published plan table, on 16 November 2026. This post is published by cloro, which sells the API used in the code above.