ChatGPT 抓取器
使用 scraper.chatgpt Actor 捕获 ChatGPT 回答——包括 Markdown 响应、搜索链接和归属数据——而无需自行对 UI 进行逆向工程。
请求示例
curl 'https://api.scrapeless.com/api/v2/scraper/request' \
--header 'Content-Type: application/json' \
--header 'x-api-token: {you_api_key}' \
--data '{
"actor": "scraper.chatgpt",
"input": {
"prompt": "Most reliable proxy service for data extraction",
"country": "JP",
"web_search": true,
"shopping": true
},
"webhook": {
"url": "http://www.youwebhook.com"
}
}'请求体参数
| 参数 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
prompt | string | 是 | 发送给 ChatGPT 的提示词。 |
country | string | 是 | 国家或地区代码。 |
web_search | boolean | 否 | 是否启用网络搜索。 |
shopping | boolean | 否 | 是否获取购物数据。默认为 true。启用后,将在 products 字段中返回产品信息。 |
响应字段
注意: 如果响应包含购物数据(
products字段),该 API 调用将按基础费率的 2 倍计费。这是因为从多个来源提取和处理产品信息需要额外的资源开销。
| 参数 | 类型 | 描述 |
|---|---|---|
prompt | string | 原始提示词。 |
result_text | string | ChatGPT 返回的 Markdown 格式响应。 |
model | string | 模型标识符,例如 gpt-5-1。 |
web_search | bool | 指示是否运行了搜索增强。 |
links | array | 补充链接数组。 |
search_result | array | 与响应关联的 SERP(搜索引擎结果页)结果。 |
search_result.attribution | string | 搜索结果的来源。 |
search_result.snippet | string | ChatGPT 提供的摘要/片段。 |
search_result.title | string | 搜索结果的标题。 |
search_result.url | string | 搜索结果的 URL。 |
content_references | array | ChatGPT 回答中包含的引用。 |
content_references.attribution | string | 引用来源。 |
content_references.title | string | 引用内容的标题。 |
content_references.url | string | 引用内容的 URL。 |
products | array | ChatGPT 返回的产品信息。 |
products.id | string | 唯一产品标识符。 |
products.title | string | 产品标题。 |
products.description | string | 产品描述(可能为 null)。 |
products.price | string | 显示价格,例如 $799.99。 |
products.rating | float | 平均评分。 |
products.num_reviews | int | 评论数量。 |
products.merchants | string | 商家名称,例如 Sony + others。 |
products.image_urls | array | 产品图片 URL 数组。 |
products.url | string | 产品页面 URL。 |
products.offers | array | 购买报价数组。 |
products.offers.merchant_name | string | 商家名称。 |
products.offers.price | string | 报价。 |
products.offers.price_details | object | 详细价格明细。 |
products.offers.price_details.base | string | 基础价格。 |
products.offers.price_details.total | string | 含税和运费的总价。 |
products.offers.available | bool | 产品库存/可用状态。 |
products.offers.details | string | 配送和库存信息。 |
products.offers.url | string | 结账或产品 URL。 |
products.rating_grouped_citation | object | 评分的引用数据。 |
products.rating_grouped_citation.title | string | 引用标题。 |
products.rating_grouped_citation.url | string | 引用 URL。 |
products.rating_grouped_citation.supporting_websites | array | 支持该评分的网站。 |
products.rating_grouped_citation.supporting_websites.title | string | 网站标题。 |
products.rating_grouped_citation.supporting_websites.url | string | 网站 URL。 |
ads | object | ChatGPT 返回的广告信息。 |
ads.type | string | 广告响应类型,例如 ads。 |
ads.content | object | 广告内容。 |
ads.content.type | string | 广告单元类型,例如 single_advertiser_ad_unit。 |
ads.content.advertiser_brand | object | 广告主品牌信息。 |
ads.content.advertiser_brand.id | string | 广告主品牌的唯一标识符。 |
ads.content.advertiser_brand.name | string | 广告主品牌名称。 |
ads.content.advertiser_brand.url | string | 广告主品牌网站 URL。 |
ads.content.advertiser_brand.favicon_url | string | 广告主网站图标 URL。 |
ads.content.ad_cards | array | 广告卡片数组。 |
ads.content.ad_cards.title | string | 广告卡片标题。 |
ads.content.ad_cards.body | string | 广告正文或描述。 |
ads.content.ad_cards.company_name | string | 广告公司名称。 |
ads.content.ad_cards.format | string | 广告卡片格式,例如 image_card_v2。 |
ads.content.ad_cards.image_url | string | 广告图片 URL。 |
ads.content.ad_cards.cta_product_copy | string | 号召性用语(CTA)产品文案(可能为 null)。 |
ads.content.ad_cards.card_header | object | 广告卡片头部信息。 |
ads.content.ad_cards.card_header.title | string | 卡片头部标题。 |
ads.content.ad_cards.card_header.subtitle | string | 卡片头部副标题,例如 Sponsored。 |
ads.content.ad_cards.card_header.logo_url | string | 广告主 Logo URL。 |
ads.content.ad_cards.favicon_url | string | 广告的网站图标 URL。 |
ads.content.ad_cards.target | object | 广告目标链接信息。 |
ads.content.ad_cards.target.type | string | 目标类型,例如 url。 |
ads.content.ad_cards.target.value | string | 目标链接的实际 URL 值。 |
ads.content.ad_cards.target.open_externally | bool | 是否在外部打开链接。 |
ads.content.carousel_cards | array | 轮播广告卡片数组。 |
ads.content.carousel_cards.title | string | 轮播卡片标题。 |
ads.content.carousel_cards.body | string | 轮播卡片正文或描述。 |
ads.content.carousel_cards.image_url | string | 轮播卡片图片 URL。 |
ads.content.carousel_cards.target | object | 轮播卡片目标链接信息。 |
ads.content.carousel_cards.target.type | string | 目标类型,例如 url。 |
ads.content.carousel_cards.target.value | string | 轮播目标链接的实际 URL 值。 |
ads.content.carousel_cards.target.open_externally | bool | 是否在外部打开轮播链接。 |