ChatGPT Scraper
使用 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"
}
}'请求体参数
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | 发送给 ChatGPT 的提示词。 |
country | string | Yes | 国家或地区代码。 |
web_search | boolean | No | 是否启用网络搜索。 |
shopping | boolean | No | 是否获取购物数据。默认为 true。启用后,将在 products 字段中返回产品信息。 |
响应字段
注意: 如果响应包含购物数据(
products字段),该 API 调用将按基础费率的 2 倍计费。这是由于从多个来源提取和处理产品信息需要额外的资源开销。
| Parameter | Type | Description |
|---|---|---|
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 | 广告主网站图标(favicon)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 | 广告的网站图标(favicon)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 | 是否在外部打开轮播链接。 |
map | object | ChatGPT 返回的地图和本地商家数据。 |
map.entities | array | 已解析实体的排序列表(例如本地商家)。 |
map.entities.category | string | 实体类别,例如 local_business。 |
map.entities.id | string | 实体标识符(例如 Google Place ID)。 |
map.entities.name | string | 实体名称。 |
map.entities.latitude | float | 实体纬度。 |
map.entities.longitude | float | 实体经度。 |
map.entities.extra_params | object | 实体的附加查询参数。 |
map.entities.extra_params.address | string | 实体地址。 |
map.entities.extra_params.business_id | string | 商家标识符。 |
map.entities.extra_params.location | string | 搜索位置上下文。 |
map.entities.extra_params.provider | string | 数据提供商,例如 yelp-feed、b3。 |
map.entities.entity | object | 详细实体记录。 |
map.entities.entity.address | string | 完整街道地址。 |
map.entities.entity.attributes | object | 附加属性(可能为 null)。 |
map.entities.entity.categories | array | 实体的类别标签。 |
map.entities.entity.city | string | 城市(可能为 null)。 |
map.entities.entity.country_code | string | ISO 国家代码,例如 US。 |
map.entities.entity.country_name | string | 国家名称。 |
map.entities.entity.date_closed | string | 关闭日期(可能为 null)。 |
map.entities.entity.date_opened | string | 开业日期(可能为 null)。 |
map.entities.entity.description | string | 商家描述(可能为 null)。 |
map.entities.entity.description_cite | string | 描述引用(可能为 null)。 |
map.entities.entity.distance_meters | float | 距离搜索位置的米数(可能为 null)。 |
map.entities.entity.enriched_description | string | 增强描述(可能为 null)。 |
map.entities.entity.from_cache | bool | 记录是否来自缓存。 |
map.entities.entity.hours | array | 每日营业时间。 |
map.entities.entity.hours.day | int | 星期几(0=星期日 … 6=星期六)。 |
map.entities.entity.hours.start | string | 24 小时制 HHMM 格式的营业时间,例如 0800。 |
map.entities.entity.hours.end | string | 24 小时制 HHMM 格式的打烊时间,例如 1900。 |
map.entities.entity.id | string | 实体标识符。 |
map.entities.entity.image_url | string | 主图片 URL。 |
map.entities.entity.image_urls | array | 图片 URL 数组。 |
map.entities.entity.is_claimed | bool | 商家列表是否已认领(可能为 null)。 |
map.entities.entity.is_closed_permanently | bool | 是否永久关闭。 |
map.entities.entity.is_closed_temporarily | bool | 是否临时关闭。 |
map.entities.entity.is_open | bool | 当前是否营业。 |
map.entities.entity.latitude | float | 纬度。 |
map.entities.entity.location | string | 位置上下文,例如 Portland, OR, USA。 |
map.entities.entity.longitude | float | 经度。 |
map.entities.entity.menu | object | 菜单信息(可能为 null)。 |
map.entities.entity.menu.url | string | 菜单 URL。 |
map.entities.entity.name | string | 商家名称。 |
map.entities.entity.next_open_hour | object | 下一个营业时段。 |
map.entities.entity.next_open_hour.day | int | 下一个营业日的星期几。 |
map.entities.entity.next_open_hour.start | string | 下一个营业时间(HHMM)。 |
map.entities.entity.next_open_hour.end | string | 对应的打烊时间(HHMM)。 |
map.entities.entity.phone | string | 电话号码。 |
map.entities.entity.popularity_score | float | 热度评分(可能为 null)。 |
map.entities.entity.price | string | 价格数值(可能为 null)。 |
map.entities.entity.price_str | string | 价格等级标识,例如 $、$$(可能为 null)。 |
map.entities.entity.provider | string | 数据源提供商,例如 yelp-feed、b3、bright-feed。 |
map.entities.entity.provider_images | array | 提供商提供的图片(可能为 null)。 |
map.entities.entity.provider_logo_dark_url | string | 暗色模式下的提供商 Logo URL(可能为 null)。 |
map.entities.entity.provider_logo_url | string | 提供商 Logo URL(可能为 null)。 |
map.entities.entity.provider_url | string | 实体在提供商网站上的 URL。 |
map.entities.entity.rank | int | 排名位置(可能为 null)。 |
map.entities.entity.ranking_score | float | 内部排名分数。 |
map.entities.entity.rating | float | 平均评分。 |
map.entities.entity.rating_scale | int | 最高评分标准,例如 5。 |
map.entities.entity.reconciled_thumbnails | array | 跨提供商整合的缩略图。 |
map.entities.entity.reconciled_thumbnails.image_url | string | 缩略图 URL。 |
map.entities.entity.reconciled_thumbnails.obfuscated_provider | string | 缩略图的混淆提供商名称。 |
map.entities.entity.reservation_providers | array | 可用的预订服务提供商。 |
map.entities.entity.review_count | int | 评论数量。 |
map.entities.entity.review_highlights | array | 精选评论摘要(可能为 null)。 |
map.entities.entity.reviews | array | 评论记录(可能为 null)。 |
map.entities.entity.service_providers | array | 服务提供商(可能为 null)。 |
map.entities.entity.special_hours | array | 特殊/节假日营业时间(可能为 null)。 |
map.entities.entity.state | string | 州或地区代码(可能为 null)。 |
map.entities.entity.tags | array | 属性标签,例如无障碍设施。 |
map.entities.entity.website_url | string | 官方网站 URL。 |
map.entities.entity.yelp_menu_url | string | Yelp 菜单 URL(可能为 null)。 |
map.entities.entity.zipcode | string | 邮政编码(可能为 null)。 |
map.raw_search_entities | array | 原始未排序的搜索实体。每个项的结构与 map.entities 相同。 |