主题
获取 ChatGPT LLM Scraper 高级结果
接口说明
用于按任务 ID 获取 ChatGPT LLM Scraper 的高级结果。
请求地址
GET https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/task_get/advanced/$id
计费说明
账户在创建任务时扣费,任务结果在随后 30 天可重复获取。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。该 ID 可在任务创建后的 30 天用于随时获取结果。 |
返回结构
接口返回 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 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
建议在接时对异常状态和错误码建立完整处理机制。
tasks 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务 ID,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000,完整列表参考 /v3/appendix/errors |
status_message | string | 任务状态信息 |
time | string | 任务处理耗时,单位秒 |
cost | float | 该任务成本,单位 USD |
result_count | integer | result 数组数量 |
path | array | URL 路径 |
data | object | 与创建任务时 POST 请求中传参数一致 |
result | array | 结果数组 |
result 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | POST 数组中提交的。返回时会对 %## 进行解码加号 + 会被解码为空格。 |
location_code | integer | POST 数组中的地区编码 |
language_code | string | POST 数组中的语言代码 |
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 结果数组 |
search_results 字段说明
表示模型检索阶段抓取到的网页搜索结果。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 chatgpt_search_result |
url | string | 结果 URL |
domain | string | 结果域名 |
title | string | 结果标题 |
description | string | 结果描述 |
breadcrumb | string | 面屑路径 |
sources 字段说明
表示模型最终答案中引用或依赖的来源。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 chat_gpt_source |
title | string | 来源标题 |
snippet | string | 来源描述 |
domain | string | 来源域名 |
url | string | 来源 URL |
thumbnail | string | 来源缩略图 |
source_name | string | 来源名称 |
publication_date | string | 发布时间,格式示例:2019-11-15 12:57:46 +00:00 |
markdown | string | Markdown 格式 |
brand_entities 字段说明
表示回答中出现的品牌实体。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 chat_gpt_brand_entity |
title | string | 品牌名称 |
category | string | 品牌类别 |
markdown | string | Markdown 格式品牌名称 |
urls | array | 与品牌的 URL 与域名列表 |
brand_entities.urls 子字段
| 字段 | 类型 | 说明 |
|---|---|---|
url | string | URL |
domain | string | 域名 |
items 结果类型说明
1)chat_gpt_text
文本型回答。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_text |
rank_group | integer | 同类型中的组排名 |
rank_absolute | integer | 所有中的绝对排名 |
markdown | string | Markdown 格式 |
sources | array | 文本引用来源,结构同上 |
brand_entities | array | 文本中提及的品牌实体,结构同上 |
2)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 | 表格数组,每个数组代表一行 |
3)chat_gpt_navigation_list
导航/延伸列表。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_navigation_list |
rank_group | integer | 同类型中的组排名 |
rank_absolute | integer | 所有中的绝对排名 |
title | string | 素标题 |
sources | array | 来源列表 |
4)chat_gpt_images
图片集合结果。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_images |
rank_group | integer | 同类型中的组排名 |
rank_absolute | integer | 所有中的绝对排名 |
markdown | string | Markdown 格式 |
items | array | 图片条目数组 |
chat_gpt_images.items 子字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_images_element |
alt | string | 图片 alt 文本 |
url | string | 页面 URL |
image_url | string | 图片 URL。可能指向原始资源,或在原始资源不可用时指向平台存储地址。 |
markdown | string | Markdown 格式 |
5)chat_gpt_local_businesses
本地商家结果。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_local_businesses |
rank_group | integer | 同类型中的组排名 |
rank_absolute | integer | 所有中的绝对排名 |
markdown | string | Markdown 格式 |
items | array | 本地商家条目数组 |
chat_gpt_local_businesses.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 | 当前 rating_type 的最大分值 |
6)chat_gpt_products
商品结果。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_products |
rank_group | integer | 同类型中的组排名 |
rank_absolute | integer | 所有中的绝对排名 |
items | array | 商品条目数组 |
chat_gpt_products.items 子字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chat_gpt_products_element |
product_id | string | 商品 ID |
merchants | string | 提供该商品的商家 |
id_to_token_map | string | 商品标识 token,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 | 商品标识,可作为购物接口中的 data_docid |
catalog_id | string | 商品目录标识,可作为购物接口中的 product_id |
gpcid | string | 商品聚类标识,可作为购物接口中的 gid |
headline_offer_docid | string | 主报价文档标识,可作为购物接口中的 data_docid |
image_docid | string | 商品图片标识 |
rds | string | 资源描述字符串 |
query | string | ChatGPT 用于检索该商品的搜索词 |
mid | string | 商家标识 |
pvt | string | 商品视图类型参数 |
uule | string | 编码后的地理位置参数 |
gl | string | 国家代码 |
hl | string | 语言代码 |
7)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 图片地址 |
调用示例
cURL
bash
id="02261816-2027-0066-0000-c27d02864073"
curl --location --request GET "https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02231256-2604-0066-2000-57133b8fc54e"
url = f"https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/task_get/advanced/{task_id}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
data = response.json
print(data)
# 可按需进一步读取 data["tasks"][0]["result"]TypeScript
typescript
import axios from "axios";
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/ai_optimization/chat_gpt/llm_scraper/task_get/advanced/${taskId}`,
headers: {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
}).then((response) => {
console.log(response.data);
}).catch((error) => {
console.error(error);
});结合 tasks_ready 获取已完成任务
接中,通常调用:
GET /v3/ai_optimization/chat_gpt/llm_scraper/tasks_ready
获取已完成任务,再通过返回的任务 ID 或 endpoint_advanced 调用:
GET /v3/ai_optimization/chat_gpt/llm_scraper/task_get/advanced/$id
这种方式适合批量拉取异步任务结果。
响应示例
json
{
"version": "0.1.20250723",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1703 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "02231256-2604-0066-2000-57133b8fc54e",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0312 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"ai_optimization",
"chat_gpt",
"llm_scraper",
"task_get",
"advanced"
],
"data": {
"api": "ai_optimization",
"function": "llm_scraper",
"se": "chat_gpt",
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "albert einstein",
"location_code": 2840,
"language_code": "en",
"markdown": "Here’s a classic image of **Albert Einstein**, perhaps the most iconic physicist of the 20th century.",
"search_results": [],
"sources": [],
"fan_out_queries": [],
"brand_entities": [],
"se_results_count": 0,
"item_types": [
"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 |\n|---|---|\n| Photoelectric Effect | Laid foundations for quantum mechanics |\n| Brownian Motion | Cemented atomic theory |",
"table": {
"table_header": [
"Contribution",
"Impact"
],
"table_content": [
["Photoelectric Effect", "Laid foundations for quantum mechanics"],
["Brownian Motion", "Cemented atomic theory"]
]
},
"brand_entities": []
},
{
"type": "chat_gpt_products",
"rank_group": 1,
"rank_absolute": 4,
"items": [
{
"type": "chat_gpt_products_element",
"product_id": "gid://shopify/p/5ymP4aadqvedAsJ3PeFyvU",
"merchants": "Walmart + others",
"title": "Funny Albert Einstein Quotes Hoodie",
"price": 49.95,
"currency": "USD",
"url": "https://example.com/product",
"domain": "example.com",
"images": [],
"product_ids": []
}
]
},
{
"type": "chat_gpt_local_businesses",
"rank_group": 1,
"rank_absolute": 5,
"markdown": "Local business recommendations...",
"items": []
},
{
"type": "chat_gpt_ad",
"rank_group": 1,
"rank_absolute": 6,
"title": "Iconic American Classics",
"snippet": "Timeless looks for summer events.",
"url": "https://example.com/ad",
"domain": "example.com",
"image_url": "https://example.com/image.jpg",
"advertiser": {
"name": "Example Advertiser",
"url": "https://example.com",
"favicon_url": "https://example.com/favicon.png"
}
}
]
}
]
}
]
}常见状态说明
| 状态码 | 含义 |
|---|---|
20000 | 请求成功 |
40000+ | 任务级错误,需结合 status_message 排查 |
10000-60000 | 任务状态码范围,完整错误码参考 /v3/appendix/errors |
使用建议
- 该接口适合获取完整增强版结果结构,回答文本,还可返回来源、品牌实体、图片、表格、商品、本地商家、导航列表、广告等。
- 若需要批量处理异步任务,建议调用
/v3/ai_optimization/chat_gpt/llm_scraper/tasks_ready,再按任务 ID 拉取高级结果。 - 若需做引用来源分析,重点
sources、search_results、fan_out_queries。 - 若需做品牌与商业结果分析,重点
brand_entities、chat_gpt_products、chat_gpt_ad、chat_gpt_local_businesses。
实用场景
- 监控 AI 回答引用来源:抓取
sources和search_results,识别品牌是否被模型引用及引用自哪些站点,与外链策略优化。 - 分析品牌在 AI 回答中的:提取
brand_entities,统计品牌名称、类别及域名,评估品牌在生成式搜索中的可见度。 - 拆解 AI 答案结构:解析
items中的文本、表格、图片、导航列表等模块,判断目标主题在 AI 结果中的呈现方式,优化生产方向。 - 跟踪商品推荐机会:读取
chat_gpt_products,识别 AI 场景下被展示的商品、商家、价格和商品标识,支持电商选品与竞品研究。 - 评估本地商家与广告露出:分析
chat_gpt_local_businesses和chat_gpt_ad,判断本地服务或商业广告在 AI 回答中的出现,本地 SEO 与投放优化。