主题
ChatGPT LLM 抓取实时高级版
POST /v3/ai_optimization/chat_gpt/llm_scraper/live/advanced
接口概述
Live ChatGPT LLM Scraper Advanced 用于实时获取 ChatGPT 搜索结果。返回会受到所选地域和语言参数影响,因此同一在不同国家/地区、不同语言环境下,结果可能不同。
- 请求方式:
POST - 接口地址:
https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/live/advanced
计费与调用限制
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准 - 参考价约 ¥0.0640 / 次
- 所有 POST 数据需使用
JSON(UTF-8 编码) - 请求体格式为 JSON 数组:
[{ ... }] - 每分钟最多可发送 2000 次 API 调用
- 每次 Live 请求支持 1 个任务
- 当前该实时接口的任务执行时间最长可达 120 秒
请求参数
请求体示例结构
json
[
{
"keyword": "albert einstein",
"location_code": 2840,
"language_code": "en",
"force_web_search": true,
"tag": "demo-001"
}
]字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 填。查询,最长支持 2000 个字符。 %## 会被解码,+ 会被解码为空格。如需传字面量 %,请写为 %25;如需传字面量 +,请写为 %2B。 |
location_name | string | 搜索地域名。未传 location_code 时填。传该字段时可不传 location_code。示例:United States。地域列表可通过 /v3/ai_optimization/chat_gpt/llm_scraper/locations 获取。 |
location_code | integer | 搜索地域编码。未传 location_name 时填。传该字段时可不传 location_name。示例:2840。地域列表可通过 /v3/ai_optimization/chat_gpt/llm_scraper/locations 获取。 |
language_name | string | 搜索语言名。未传 language_code 时填。传该字段时可不传 language_code。语言列表可通过 /v3/ai_optimization/chat_gpt/llm_scraper/languages 获取。 |
language_code | string | 搜索语言代码。未传 language_name 时填。传该字段时可不传 language_name。语言列表可通过 /v3/ai_optimization/chat_gpt/llm_scraper/languages 获取。 |
force_web_search | boolean | 是否强制 AI 代理使用网页搜索。可选。启用后,模型会被尽量要求访问并引用当前网页信息。默认值:false。**注意:**即使设为 true,也不能保证最终响应一定网页来源引用。 |
tag | string | 自定义任务标识。可选,最大长度 255。可用于请求与结果对账,响应中的 data 对象会返回该值。 |
返回结果说明
服务端会返回 JSON 数据,根对象中 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码。完整错误码见 /v3/appendix/errors |
status_message | string | 通用状态信息。完整说明见 /v3/appendix/errors |
time | string | 执行耗时,单位秒 |
cost | float | 本次请求总成本,单位 USD |
tasks_count | integer | tasks 数组中的任务数 |
tasks_error | integer | 返回错误的任务数 |
tasks | array | 任务结果数组 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000 |
status_message | string | 任务状态说明 |
time | string | 任务执行耗时 |
cost | float | 任务成本,单位 USD |
result_count | integer | result 数组数 |
path | array | URL 路径 |
data | object | 回显请求中提交的参数 |
result | array | 结果数组 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求中的。返回时 %## 会被解码,+ 会被转为空格 |
location_code | integer | 请求中的地域编码 |
language_code | string | 请求中的语言代码 |
model | string | 模型版本标识 |
check_url | string | 可直接访问的结果检查地址,用于核对抓取结果 |
datetime | string | 结果获取时间,UTC 格式:yyyy-mm-dd hh:mm:ss +00:00 |
markdown | string | 整体结果的 Markdown |
search_results | array | 模型在检索信息时用到的网页搜索结果,重复项和未最终使用的结果 |
sources | array | 模型在最终回答中引用或依赖的来源 |
fan_out_queries | array | 从主查询衍生出的扩展查询,用于补回答完整性 |
brand_entities | array | 回答中提及的品牌实体信息 |
se_results_count | integer | 结果总数 |
item_types | array | items 中出现的结果类型,如 chat_gpt_text、chat_gpt_table、chat_gpt_navigation_list、chat_gpt_images、chat_gpt_local_businesses、chat_gpt_products |
items_count | integer | items 数组中的数量 |
items | array | ChatGPT 结果块 |
结果结构
1)search_results[]
模型检索信息时获取到的网页搜索结果。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_search_result |
url | string | 结果 URL |
domain | string | 结果域名 |
title | string | 标题 |
description | string | 描述 |
breadcrumb | string | 面屑路径 |
2)sources[]
模型在最终回答中引用的来源。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_source |
title | string | 来源标题 |
snippet | string | 来源摘要 |
domain | string | 来源域名 |
url | string | 来源链接 |
thumbnail | string | 缩略图 |
source_name | string | 来源名称 |
publication_date | string | 发布时间,格式:yyyy-mm-dd hh:mm:ss +00:00 |
markdown | string | 来源的 Markdown 表示 |
3)brand_entities[]
回答中提及的品牌实体。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_brand_entity |
title | string | 品牌名称 |
category | string | 品牌类别 |
markdown | string | Markdown 格式的品牌名 |
urls | array | 与品牌的 URL 与域名列表 |
urls[] 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
url | string | URL |
domain | string | 域名 |
items[] 支持的结果类型
chat_gpt_text
文本回答块。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_text |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 在整个结果页中的绝对排名 |
markdown | string | 文本的 Markdown 格式 |
sources | array | 文本块引用来源,结构同上 |
brand_entities | array | 文本块中提及的品牌实体 |
chat_gpt_table
表格回答块。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_table |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 绝对排名 |
text | string | 表格对应的文本 |
markdown | string | 表格的 Markdown 格式 |
table | object | 表格结构 |
brand_entities | array | 表格中提及的品牌实体 |
table 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
table_header | array | 表头 |
table_content | array | 表格,每个子数组代表一行 |
chat_gpt_navigation_list
导航/延伸列表。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_navigation_list |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 绝对排名 |
title | string | 列表标题 |
sources | array | 列表来源 |
chat_gpt_images
图片结果块。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_images |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 绝对排名 |
markdown | string | 图片块的 Markdown |
items | array | 图片项列表 |
items[] 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_images_element |
alt | string | 图片 alt 文本 |
url | string | 页面 URL |
image_url | string | 图片 URL,可能为原始资源地址或平台存储地址 |
markdown | string | 图片项的 Markdown |
chat_gpt_local_businesses
本地商家结果块。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_local_businesses |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 绝对排名 |
markdown | string | 商家块的 Markdown |
items | array | 商家列表 |
items[] 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_local_businesses_element |
title | string | 商家名称 |
description | string | 商家描述 |
address | string | 地址 |
phone | string | 电话 |
reviews_count | integer | 评论总数 |
url | string | 商家网站 URL |
domain | string | 商家域名 |
rating | object | 评分信息 |
rating 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,如 Max5、Percents、CustomMax |
value | float | 平均评分 |
votes_count | integer | 投票/评价数 |
rating_max | integer | 评分上限 |
chat_gpt_products
商品结果块。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_products |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 绝对排名 |
items | array | 商品列表 |
items[] 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_products_element |
product_id | string | 商品 ID |
merchants | string | 提供该商品的商家 |
id_to_token_map | string | 商品标识令牌,Base64 编码,的购物商品 ID |
title | string | 商品标题 |
rating | object | 商品评分 |
price | float | 价格 |
currency | string | 币种,ISO 代码 |
tag | string | 标签文本 |
url | string | 商品 URL |
domain | string | 商品域名 |
images | array | 商品图片 URL 列表 |
product_ids | array | 购物商品标识列表 |
product_ids[] 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_google_shopping_product |
ei | string | 事件标识 |
product_id | string | 商品标识,可作为 Google Shopping API 的 data_docid |
catalog_id | string | 商品目录 ID,可作为接口中的 product_id |
gpcid | string | 商品聚类 ID,可作为接口中的 gid |
headline_offer_docid | string | 主报价文档 ID |
image_docid | string | 商品图片标识 |
rds | string | 部资源描述字符串 |
query | string | ChatGPT 用于获取商品的搜索词 |
mid | string | 商家标识 |
pvt | string | 商品视图类型参数 |
uule | string | 编码后的地理位置参数 |
gl | string | 国家代码 |
hl | string | 主机语言代码 |
chat_gpt_ad
广告结果块。
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_ad |
rank_group | integer | 同类型组排名 |
rank_absolute | integer | 绝对排名 |
title | string | 广告标题 |
snippet | string | 广告描述 |
url | string | 落地页 URL |
domain | string | 落地页域名 |
image_url | string | 广告图片 URL |
advertiser | object | 广告主信息 |
advertiser 子字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
name | string | 广告主名称 |
url | string | 广告主网站 |
favicon_url | string | 广告主 favicon URL |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/live/advanced" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"force_web_search": true,
"tag": "demo-001"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/live/advanced"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"force_web_search": True,
"tag": "demo-001"
}
]
response = requests.post(url, headers=headers, json=data, timeout=180)
print(response.json)TypeScript
typescript
import axios from "axios";
async function fetchChatGptLlmScraperAdvanced {
const response = await axios.post(
"https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/live/advanced",
[
{
language_code: "en",
location_code: 2840,
keyword: "albert einstein",
force_web_search: true,
tag: "demo-001",
},
],
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
timeout: 180000,
}
);
console.log(response.data);
}
fetchChatGptLlmScraperAdvanced.catch(console.error);响应示例
下方示例基于原始文档整理,结构可能因查询词、地区、语言和模型行为而变化。
json
{
"version": "0.1.20250724",
"status_code": 20000,
"status_message": "Ok.",
"time": "15.0903 sec.",
"cost": 0.004,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "ai_optimization",
"function": "llm_scraper",
"se": "chat_gpt",
"force_web_search": true,
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "albert einstein",
"location_code": 2840,
"language_code": "en",
"search_results": [],
"sources": [],
"fan_out_queries": [],
"brand_entities": [],
"se_results_count": 0,
"item_types": [
"chat_gpt_images",
"chat_gpt_text",
"chat_gpt_table",
"chat_gpt_products",
"chat_gpt_local_businesses",
"chat_gpt_navigation_list",
"chat_gpt_ad"
],
"items_count": 5,
"items": [
{
"type": "chat_gpt_text",
"rank_group": 1,
"rank_absolute": 2,
"markdown": "Here’s a classic image of **Albert Einstein**, perhaps the most iconic physicist of the 20th century.",
"sources": [],
"brand_entities": []
},
{
"type": "chat_gpt_table",
"rank_group": 1,
"rank_absolute": 3,
"text": null,
"markdown": "| Contribution | Impact |",
"table": {
"table_header": ["Contribution", "Impact"],
"table_content": [
["Photoelectric Effect", "Laid foundations for quantum mechanics"],
["Brownian Motion", "Cemented atomic theory"]
]
},
"brand_entities": []
},
{
"type": "chat_gpt_navigation_list",
"rank_group": 1,
"rank_absolute": 5,
"title": "Further reading on Einstein",
"sources": []
},
{
"type": "chat_gpt_ad",
"rank_group": 1,
"rank_absolute": 2,
"title": "Iconic American Classics",
"snippet": "Timeless looks for summer events.",
"url": "https://example.com/landing-page",
"domain": "example.com",
"image_url": "https://example.com/image.jpg",
"advertiser": {
"name": "Example Brand",
"url": "https://example.com/",
"favicon_url": "https://example.com/favicon.png"
}
}
]
}
]
}
]
}状态码与错误处理
- 顶层
status_code = 20000表示请求成功 - 各任务下也会返回独立的
status_code与status_message - 建议同时校验:
- 顶层请求状态
tasks_error是否为0tasks[].status_code是否成功- 错误码与状态信息请参考:
/v3/appendix/errors
使用说明与注意事项
- 每次请求只能提交一个任务,即 JSON 数组中一个对象。
- 结果是实时生成的,返回结构会因类型不同而变化,并不保证每次都出现
images、products、ads、local_businesses等模块。 force_web_search=true只表示尽量启用网页检索能力,不保证最终回答一定引用网页来源。- 若需要做结果核验,可结合
check_url、sources、search_results进行交叉比对。 markdown字段适合直接做渲染、摘要分析、结构化抽取或二次洗。
实用场景
- 监测品牌在 AI 回答中的:抓取
brand_entities、sources与正文块,判断品牌是否被提及、以什么类别出现,帮助评估 AI 搜索时代的品牌可见度。 - 分析 AI 回答引用了哪些站点:基于
sources和search_results识别高频被引用域名,制定数字、投放和外链合作策略。 - 拆解 AI 结果页的结构:通过
items中的text、table、images、products、ads等模块,分析不同查询意图下 AI 如何组织答案,指导生产与页面结构优化。 - 跟踪本地商家与商品推荐表现:当结果
chat_gpt_local_businesses或chat_gpt_products时,可评估本地门店、商品页在 AI 场景中的推荐机会,支持本地 SEO 与电商优化。 - 挖掘扩展问题与选题:利用
fan_out_queries识别 AI 为完成回答而扩展出的问题,帮助发现用户深层需求,补 FAQ、专题页和长尾布局。