> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ChatGPT Scraper API

> 使用 Bright Data ChatGPT Scraper API 提取结构化搜索结果、引用来源和答案。同步请求建议每次不超过 20 个输入。

发送一个提示词，即可获得结构化的搜索结果。Bright Data ChatGPT Scraper API 负责处理代理、浏览器自动化和解析，让你可以专注于自己的数据管道。

<Tip>
  初次使用 Bright Data？[创建免费账户](https://www.bright.cn/products/web-scraper/chatgpt?hs_signup=1\&utm_source=docs)，即可**每月获得 5,000 个免费额度**，无需信用卡。这足以让你从**多达 5,000 条 ChatGPT 记录**开始抓取。参见[免费套餐](/cn/general/account/billing-and-pricing/free-tier)。
</Tip>

## 工作原理

你向 Bright Data ChatGPT Scraper API 发送一个提示词。Bright Data 负责处理抓取基础设施，并返回干净、结构化的 JSON，其中包含答案、引用来源和来源信息。

```text theme={null}
Your app  -->  Bright Data API  -->  Structured JSON
           POST /datasets/v3/scrape
           Authorization: Bearer YOUR_API_KEY
```

所有请求都使用 ChatGPT Search 的 `dataset_id`，并以 NDJSON（默认）、JSON、JSON lines、CSV 和 Parquet 格式返回结果。见[输出格式](/cn/products/scrapers/scrapers-library/data-delivery#支持哪些输出格式)。

## 响应内容示例

Bright Data ChatGPT Scraper API 于 2026 年 9 月 6 日返回的单条记录（已裁剪为所示字段）。可在[快速开始](/cn/products/scrapers/chatgpt/quickstart)中亲自发送该请求。

```json theme={null}
{
  "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...",
  "model": null,
  "web_search_triggered": true,
  "citations": [
    {
      "url": "https://www.timeout.com/newyork/hotels/best-luxury-hotels-in-nyc?utm_source=chatgpt.com",
      "title": "16 Best Luxury Hotels in New York City For 2026 | World-Class Hotels in NYC",
      "description": "Time Out Worldwide",
      "icon": null
    }
  ],
  "search_sources": [
    {
      "url": "https://www.timeout.com/newyork/hotels/best-luxury-hotels-in-nyc?utm_source=chatgpt.com",
      "title": "16 Best Luxury Hotels in New York City For 2026 | World-Class Hotels in NYC",
      "snippet": null,
      "rank": 1
    }
  ],
  "prompt_sent_at": "2026-09-06T10:22:47.311Z",
  "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
}
```

## 支持哪些功能

<CardGroup cols={2}>
  <Card title="带引用来源的搜索" icon="quote-right" href="/cn/api-reference/scrapers/ai-search-apis/chatgpt-search-by-prompt">
    从 ChatGPT 网页搜索中获取结构化答案，附带来源引用、位置和关联的参考链接。
  </Card>

  <Card title="追问提示词" icon="comments" href="/cn/api-reference/scrapers/ai-search-apis/chatgpt-search-by-prompt">
    发送额外的提示词，在同一搜索上下文中获取追问的答案。
  </Card>

  <Card title="购物和地图结果" icon="store" href="/cn/api-reference/scrapers/ai-search-apis/chatgpt-search-by-prompt">
    检测 ChatGPT 何时针对地点类查询返回购物商品卡片或基于地图的结果。
  </Card>

  <Card title="网页搜索控制" icon="globe" href="/cn/products/scrapers/concepts/query-fan-out">
    使用 `web_search` 来允许或禁用实时网页搜索，并使用 `web_search_triggered` 来判断搜索是否实际运行过。
  </Card>
</CardGroup>

## 数据集 ID

ChatGPT Scraper API 使用一个 `dataset_id`。在每个请求上将 ID 作为查询参数传递。

| 数据类型 | 数据集 ID |
| :- | :- |
| ChatGPT Search | `gd_m7aof0k82r803d5bjm` |

## 请求方式

Bright Data Scraper API 支持两种请求方式，请根据您的数据量和延迟需求选择。

| 方式 | 端点 | 适用场景 |
| :- | :- | :- |
| **同步** | `/scrape` | 实时查询，最多 20 个 URL |
| **异步** | [`/trigger`](/cn/products/scrapers/scrapers-library/async-requests) | 批量任务、20 个及以上 URL、生产环境管道 |

详见[了解同步与异步请求](/cn/concepts/sync-vs-async)。

两个端点都接受带 `input` 数组的对象，可附加 `limit_per_input` 和 `custom_output_fields`，在 `/trigger` 上还可附加 `deliver` 配置。也接受由输入组成的纯 JSON 数组，本页示例使用此格式。详见[请求体](/cn/api-reference/scrapers/synchronous-requests#请求体)。

## 功能与限制

| 功能 | 详情 |
| :- | :- |
| **输出格式** | NDJSON（默认）、JSON、JSON lines、CSV 和 Parquet（[各格式适用范围](/cn/products/scrapers/scrapers-library/data-delivery#支持哪些输出格式)） |
| **同步请求最大 URL 数** | 20 |
| **异步请求最大 URL 数** | 无限制，每个任务最多 1 GB 输入 |
| **数据新鲜度** | 实时（按需抓取） |
| **投递方式** | API 下载、[webhook](/cn/products/scrapers/scrapers-library/data-delivery)、[Amazon S3](/cn/products/scrapers/scrapers-library/data-delivery)、Snowflake、Azure、GCS（[全部目标](/cn/products/scrapers/scrapers-library/data-delivery)） |
| **计费** | 按成功记录计费（[查看价格](https://www.bright.cn/pricing/web-scraper)） |

## 还有哪些 AI 答案引擎有爬虫

爬虫库还覆盖另外五个引擎。每个都接受提示词并返回带引用的回答；链接可在控制面板中打开对应爬虫，国家列表说明该引擎可定位的国家。

| 引擎 | 爬虫 | 国家列表 |
| :- | :- | :- |
| Perplexity | [在控制面板中打开](https://brightdata.com/cp/scrapers/browse?domain=perplexity.ai) | [国家](https://github.com/brightdata/answer-engines-country-codes/blob/main/perplexity_countries.csv) |
| Gemini | [在控制面板中打开](https://brightdata.com/cp/scrapers/browse?domain=gemini.google.com) | [国家](https://github.com/brightdata/answer-engines-country-codes/blob/main/gemini_countries.csv)，不支持欧洲国家 |
| Copilot | [在控制面板中打开](https://brightdata.com/cp/scrapers/browse?domain=copilot.microsoft.com) | [国家](https://github.com/brightdata/answer-engines-country-codes/blob/main/copilot_countries.csv) |
| Google AI 模式 | [在控制面板中打开](https://brightdata.com/cp/scrapers/browse?domain=google.com) | [国家](https://github.com/brightdata/answer-engines-country-codes/blob/main/google_aimode_countries.csv) |
| Grok | 当前不可用 | [国家](https://github.com/brightdata/answer-engines-country-codes/blob/main/grok_countries.csv) |

ChatGPT 自身的国家列表见 [GitHub](https://github.com/brightdata/answer-engines-country-codes/blob/main/chatgpt_countries.csv)。网络搜索控制因引擎而异：ChatGPT 和 Grok 接受 `web_search` 输入，Gemini 自行决定。详见[查询扩展与网络搜索控制](/cn/products/scrapers/concepts/query-fan-out)。

## 常见问题

### 数据是实时抓取的吗？

是的。每次请求都会触发一个实时的 ChatGPT 搜索会话。不存在缓存或过时的数据。处理时间取决于提示词的复杂程度、是否启用网页搜索以及爬虫负载。Bright Data ChatGPT Scraper API 不公布固定的响应时间。同步请求最多等待 1 分钟，之后返回 HTTP `202` 和 `snapshot_id`，并继续以异步方式采集。

### 响应时间为什么会发生变化？

OpenAI 会调整其页面的提供方式，Bright Data ChatGPT Scraper API 的采集器也会相应更新。即使成功率保持不变，采集器更新也可能改变一次采集所需的时间。对于生产环境的工作负载，请基于[异步工作流](/cn/products/scrapers/scrapers-library/async-requests)或 [Webhook 投递](/cn/products/scrapers/scrapers-library/data-delivery)进行构建，这样较长的运行时间不会破坏集成。

### 我能在多次请求之间保持对话上下文吗？

不能。每次请求都会开启一个全新的 ChatGPT 会话。请求之间不会保留任何记忆或上下文。若要在单次请求内提出追问，请使用 `additional_prompt` 字段。

### 与使用代理或 Web Unlocker API 抓取有何不同？

使用代理或 Web Unlocker API 抓取时，您仍需编写和维护自己的解析逻辑，并在目标网站页面结构变化时随时更新。Bright Data Scraper API 处理整个链路：代理轮换、反爬绕过与解析。您只需发送 URL 或关键词，即可获得干净的结构化 JSON，无需自建抓取基础设施或维护解析器。

## 后续步骤

<CardGroup cols={3}>
  <Card title="快速开始" icon="rocket" href="/cn/products/scrapers/chatgpt/quickstart">
    在 5 分钟内用你的第一个提示词搜索 ChatGPT。
  </Card>

  <Card title="端点" icon="bolt" href="/cn/products/scrapers/chatgpt/send-first-request">
    每个端点一个请求，附实际抓取的响应。
  </Card>

  <Card title="API 参考" icon="code" href="/cn/api-reference/scrapers/ai-search-apis/chatgpt-search-by-prompt">
    端点规格、参数和响应架构。
  </Card>
</CardGroup>
