Prerequisites
- A Bright Data account with an active API key
- Completed the Quickstart
请求结构
每个同步请求都遵循相同的模式:POST https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
[{"url": "https://chatgpt.com/", "prompt": "Your search prompt here"}]
url 字段始终为 https://chatgpt.com/。prompt 字段包含您的搜索查询。
/scrape 端点专为实时的单 URL 请求设计。Bright Data 建议每个请求不超过 20 个输入(这是最佳实践,而非硬性限制),端点最多等待 1 分钟。如果采集耗时更长,响应为 HTTP 202,返回 snapshot_id 而不是数据,采集将继续以异步方式进行。请通过异步请求获取结果,或使用 Webhook 投递接收结果。ChatGPT 搜索
Dataset ID:gd_m7aof0k82r803d5bjm
基本搜索
发送提示并获取带有引用的结构化答案:curl -X POST \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '[{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York"}]'
200 响应。处理时间取决于目标网站状况和爬虫负载。
Example response
Example response
[
{
"url": "https://chatgpt.com/?q=Top%20hotels%20in%20New%20York",
"prompt": "Top hotels in New York",
"answer_text": "Map data is currently unavailable Aman New York 4.3 Отель 2 450 $ The Plaza Hotel The Carlyle, A Rosewood Hotel 4.5 Отель 1 359 $ The Mark Hotel 4.5 Отель 2...",
"answer_text_markdown": "* Map data is currently unavailable 4.4 インド料理店 ¥1,000~2,000 神戸鉄板焼 白秋 4.7 ステーキハウス ¥10,000 以...",
"model": null,
"web_search_triggered": false,
"is_map": true,
"citations": [],
"prompt_sent_at": "2026-09-06T10:23:10.445Z",
"answer_html": "<html lang=\"en-US\" dir=\"ltr\" data-theme=\"light\" data-contrast=\"default\" data-build=\"prod-4ec31e730ff961987ab0f9a7e9dd6248f66da3b0\" data-close-image-viewer=\"C...",
"country": "JP"
}
]
后续提示搜索
使用additional_prompt 字段在同一会话中提出后续问题:
curl -X POST \
"https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_m7aof0k82r803d5bjm&format=json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '[{"url": "https://chatgpt.com/", "prompt": "Top hotels in New York", "additional_prompt": "Which of these are pet-friendly?"}]'
Example response
Example response
[
{
"url": "https://chatgpt.com/?q=Top%20hotels%20in%20New%20York",
"prompt": "Top hotels in New York",
"answer_text": "Map data is currently unavailable The St. Regis New York 4.5 Hotel $2,201 Park Hyatt New York 4.6 Hotel $3,191 The Carlyle, A Rosewood Hotel 4.5 Hotel $1,359...",
"additional_answer_text": "Map data is currently unavailable Park Hyatt New York 4.6 Hotel The Manner 4.6 Resort hotel Refinery Hotel 4.5 Hotel Made Hotel 4.4 Hotel New York Hilton Mid...",
"model": null,
"web_search_triggered": true,
"citations": [
{
"url": "https://www.cntraveler.com/gallery/best-hotels-in-new-york-city?utm_source=chatgpt.com",
"title": "35 Best Hotels in New York City We Won't Shut Up About | Condé Nast Traveler",
"description": "Condé Nast Traveler",
"icon": null
}
],
"prompt_sent_at": "2026-09-06T10:23:07.451Z",
"answer_html": "<html lang=\"en-US\" dir=\"ltr\" data-theme=\"light\" data-contrast=\"default\" data-build=\"prod-4ec31e730ff961987ab0f9a7e9dd6248f66da3b0\" data-close-image-viewer=\"C...",
"is_map": true
}
]
ChatGPT 搜索抓取器返回哪些输出字段?
ChatGPT 搜索抓取器(gd_m7aof0k82r803d5bjm,collect_by_url)返回 32 个输出字段。字段说明保留 API 返回的英文原文。
输出字段(32)
输出字段(32)
| 字段 | 类型 | 说明 |
|---|---|---|
url | url | ChatGPT page URL |
prompt | text | The input prompt |
answer_html | text | The answer of ChatGPT search |
answer_text | text | Answer text in plain text |
links_attached | array | Hyperlinks included in the response text, along with their position and linked words. |
citations | array | Sources directly referenced in the answer, often linked to specific facts or claims. |
country | country | Country from which to perform the search |
is_map | boolean | Indication whether a map package result was generated |
references | array | Links grouped under the References section |
shopping | array | Product recommendation cards from ChatGPT’s Shopping panel |
shopping_visible | boolean | Whether the Shopping panel appeared for this answer |
index | number | The index column lets you assign a unique ID to each crawl request for easy tracking. |
answer_text_markdown | html2markdown | Answer text in markdown format. |
web_search_triggered | boolean | Was a web search triggered by ChatGPT when returning the answer |
additional_prompt | text | The additional_prompt is a follow-up input sent after receiving the first answer, aiming to clarify, expand, or refine the initial response. The system processes this prompt and returns the result as additional_answer_text. |
additional_answer_text | text | The additional_answer_text is the system’s response to the additional_prompt, which follows the initial interaction. It provides additional information, clarification, or a refined answer based on the user’s follow-up input. |
map | array | Map package result |
search_sources | array | A list of external web pages ChatGPT used to gather information, usually shown at the bottom of the response. |
search_sources_more | array | A list of external web pages ChatGPT used to gather information, usually shown at the bottom of the response (from “More” partition). |
response_raw | text | Raw data of ChatGPT’s response |
response_raw_additional_prompt | text | Raw data of ChatGPT’s response for additional prompt. |
answer_section_html | text | The answer’s section html |
model | text | Model used for answer |
web_search_query | array | Model-generated web search queries (exact strings, in execution order) |
prompt_sent_at | date | exact prompt timestamp |
answer_text_raw | text | Original answer_text as extracted, without trimming or whitespace normalization (may include leading/trailing spaces and newline characters). |
business_locations | array | Please consider adding new fields, attaching example of JSON we can get for each business location mentioned in answer. Array of business location entities returned when the answer includes local business results. Each entry contains the business ID, coordinates, name, category, address, contact info, ratings, hours, images, and open/closed status. |
ads | array | Array of advertisement’s card data. |
additional_answer_text_markdown | html2markdown | additional_answer_text_markdown in markdown format. |
questionnaire | array | Questionnaire |
shopping_additional_prompt | array | Product recommendation cards from ChatGPT’s Shopping panel from results of additional prompt |
citations_additional_prompt | array | Sources directly referenced in the answer of additional prompt, often linked to specific facts or claims. |
/scrapers/gd_m7aof0k82r803d5bjm.json
快速参考:数据集 ID
| Endpoint | Dataset ID | Input |
|---|---|---|
| ChatGPT Search | gd_m7aof0k82r803d5bjm | url + prompt |
输入字段
| Field | Required | Description |
|---|---|---|
url | Yes | 始终为 https://chatgpt.com/ |
prompt | Yes | 搜索提示(最多 4,096 个字符) |
country | No | 国家代码,用于位置定向结果 |
index | No | 唯一追踪 ID(数字) |
require_sources | No | 如果未找到来源则返回错误(布尔值) |
additional_prompt | No | 同一会话中的后续提示 |
web_search | No | 启用或禁用网络搜索(默认值:true) |
输出格式
使用format 查询参数控制响应格式:
| Value | Description |
|---|---|
json | JSON 数组 |
ndjson | 换行分隔的 JSON,每行一条记录(默认) |
csv | 逗号分隔值 |
/scrape 的 format 值。完整列表(NDJSON(默认)、JSON、JSON lines、CSV 和 Parquet)及各格式适用范围见输出格式。
相关内容
异步批处理请求
在单个批处理作业中使用数百个提示搜索 ChatGPT。
API 参考
完整的参数和响应字段参考。