主题
通过 id 获取 ChatGPT AI Mode 高级结果
接口说明
用于根据任务 ID 获取 ChatGPT AI Mode SERP 高级结果。
- 请求方式:
GET - 请求地址:
https://api.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/$id
说明:
$id为任务唯一标识符(UUID)- 任务结果在任务创建后的 30 天 可重复拉取
- 在创建任务时扣费,结果查询本身不重复收费
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准
计费说明
该接口本身用于获取已创建任务的结果,不会重复计费。费用发生在任务提交阶段。
若异步任务创建单价已知,应按人民币换算展示;本页未提供明确单价,因此不单独列出参考价。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
路径参数
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。可在任务创建后的 30 天用于获取结果。 |
沙箱调试
如需查看该端点可能返回的完整字段结构,可调用沙箱地址:
https://sandbox.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/00000000-0000-0000-0000-000000000000
说明:
- 沙箱返回当前端点所有可用字段
- 字段中的值为演示数据
- 调用沙箱接口不计费
返回结构
接口返回 JSON,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码 |
status_message | string | 通用提示信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次返回对应的总费用,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 返回错误的任务数量 |
tasks | array | 任务结果数组 |
建议在接时统一处理状态码与异常。
tasks[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务 ID,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 | 结果数组 |
tasks[].data 字段
data 中通常任务提交时的原始参数,例如:
| 字段 | 类型 | 说明 |
|---|---|---|
api | string | API 类型 |
function | string | 调用方法 |
se | string | 搜索引擎类型 |
se_type | string | 搜索类型 |
language_code | string | 语言代码 |
location_code | integer | 地区代码 |
keyword | string | 查询。返回时会对 %## 解码,+ 会还原为空格 |
device | string | 设备类型 |
os | string | 操作系统 |
结果字段说明
tasks[].result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 查询 |
type | string | POST 提交时指定的搜索引擎类型 |
se_domain | string | POST 提交时指定的搜索引擎域名 |
location_code | integer | POST 提交时指定的地区代码 |
language_code | string | POST 提交时指定的语言代码 |
check_url | string | 搜索结果直达链接,可用于核对抓取结果 |
datetime | string | 结果采集时间,UTC 格式,示例:2019-11-15 12:57:46 +00:00 |
markdown | string | 结果的 Markdown 格式文本 |
search_results | array | 搜索结果数组 |
sources | array | 来源数组 |
se_results_count | integer | SERP 中结果总数 |
item_types | array | SERP 中出现的结果类型 |
items_count | integer | items 数组中的数量 |
items | array | ChatGPT 返回拆解后的结构化 |
search_results[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 chatgpt_search_result |
url | string | 结果链接 |
domain | string | 结果域名 |
title | string | 结果标题 |
description | string | 结果描述 |
breadcrumb | string | 面屑路径 |
sources[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 chatgpt_source |
title | string | 来源标题 |
snippet | string | 来源摘要 |
domain | string | 来源域名 |
url | string | 来源链接 |
thumbnail | string | 缩略图地址 |
source_name | string | 来源名称 |
publication_date | string | 发布时间,格式示例:2019-11-15 12:57:46 +00:00 |
markdown | string | Markdown 格式 |
item_types 可选值
item_types 表示当前 SERP 中识别到的块类型,可能:
chatgpt_textchatgpt_tablechatgpt_navigation_listchatgpt_imageschatgpt_local_businesseschatgpt_products
items[]素类型说明
1. chatgpt_text
表示文本回答块。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_text |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 在 SERP素中的绝对排名 |
markdown | string | Markdown 格式 |
sources | array | 来源数组,结构同上文 sources[] |
2. chatgpt_table
表示表格回答块。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_table |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 在 SERP素中的绝对排名 |
text | string | 素文本 |
markdown | string | Markdown 格式 |
table | object | 表格对象 |
chatgpt_table.table
| 字段 | 类型 | 说明 |
|---|---|---|
table_header | array | 表头 |
table_content | array | 表格数组,每个子数组表示一行 |
3. chatgpt_navigation_list
表示导航/推荐列表。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_navigation_list |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 在 SERP素中的绝对排名 |
title | string | 素标题 |
sources | array | 来源数组 |
markdown | string | Markdown 格式 |
4. chatgpt_images
表示图片结果块。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_images |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 在 SERP素中的绝对排名 |
markdown | string | Markdown 格式 |
items | array | 图片子项数组 |
chatgpt_images.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element |
alt | string | 图片 alt 文本 |
url | string | 页面 URL |
image_url | string | 图片 URL,可能是原始来源,也可能是平台缓存地址 |
markdown | string | Markdown 格式 |
5. chatgpt_local_businesses
表示本地商家结果块。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_local_businesses |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 在 SERP素中的绝对排名 |
markdown | string | Markdown 格式 |
items | array | 商家子项数组 |
chatgpt_local_businesses.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_local_businesses_element |
title | string | 商家名称 |
description | string | 商家描述 |
address | string | 地址 |
phone | string | 电话 |
reviews_count | integer | 评论总数 |
rating | object | 评分信息 |
rating 字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可为 Max5、Percents、CustomMax |
value | float | 平均评分 |
votes_count | integer | 投票数 |
rating_max | integer | 当前评分体系的最大值 |
6. chatgpt_products
表示商品结果块。
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_products |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 在 SERP素中的绝对排名 |
items | array | 商品子项数组 |
chatgpt_products.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_products_element |
product_id | string | 商品 ID |
title | string | 商品标题 |
rating | object | 商品评分 |
price | float | 商品价格 |
currency | string | 价格币种,ISO 货币代码 |
tag | string | 标签文本 |
url | string | 商品链接 |
domain | string | 商品域名 |
images | array | 商品图片 URL 列表;如无图片则可能为 null |
请求示例
cURL
bash
id="02261816-2027-0066-0000-c27d02864073"
curl --location --request GET "https://api.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02261816-2027-0066-0000-c27d02864073"
url = f"https://api.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/{task_id}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json)TypeScript
typescript
import axios from "axios";
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/serp/chatgpt/ai_mode/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);
});获取已完成任务后再拉取高级结果
在生产环境中,通常调用已完成任务列表接口,再按任务 ID 获取高级结果:
GET /v3/serp/chatgpt/ai_mode/tasks_readyGET /v3/serp/chatgpt/ai_mode/task_get/advanced/$id
这种方式适合批量轮询任务处理结果。
Python 示例:取已完成任务,再逐个获取结果
python
import requests
base_url = "https://api.seermartech.cn"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
# 1. 获取已完成任务
ready_resp = requests.get(
f"{base_url}/v3/serp/chatgpt/ai_mode/tasks_ready",
headers=headers
)
ready_data = ready_resp.json
results = []
if ready_data.get("status_code") == 20000:
for task_group in ready_data.get("tasks", []):
for task in task_group.get("result", []) or []:
endpoint = task.get("endpoint_advanced")
task_id = task.get("id")
# 方式一:直接使用返回的高级结果地址
if endpoint:
resp = requests.get(f"{base_url}{endpoint}" if endpoint.startswith("/v3/") else endpoint, headers=headers)
results.append(resp.json)
# 方式二:按 id 重新拼接查询地址
# if task_id:
# resp = requests.get(
# f"{base_url}/v3/serp/chatgpt/ai_mode/task_get/advanced/{task_id}",
# headers=headers
# )
# results.append(resp.json)
print(results)
else:
print("error:", ready_data.get("status_code"), ready_data.get("status_message"))响应示例
以下示例基于原文整理,字段结构与返回一致,部分演示值做了格式修正以便。
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": "02261816-2027-0066-0000-c27d02864073",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0321 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"serp",
"chatgpt",
"ai_mode",
"task_get",
"advanced"
],
"data": {
"api": "serp",
"function": "task_get",
"se": "chatgpt",
"se_type": "ai_mode",
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "albert einstein",
"type": "chatgpt",
"se_domain": "chatgpt.com",
"location_code": 2840,
"language_code": "en",
"check_url": "https://chatgpt.com/",
"datetime": "2025-07-16 12:57:46 +00:00",
"markdown": "示例 Markdown",
"search_results": [],
"sources": [],
"se_results_count": 0,
"item_types": [
"chatgpt_images",
"chatgpt_local_businesses",
"chatgpt_products",
"chatgpt_text",
"chatgpt_table",
"chatgpt_navigation_list"
],
"items_count": 6,
"items": [
{
"type": "chatgpt_images",
"rank_group": 1,
"rank_absolute": 1,
"markdown": "",
"items": [
{
"type": "images_element",
"url": "https://example.com/product-1",
"alt": "example image 1",
"image_url": "https://example.com/1.jpg",
"markdown": ""
}
]
},
{
"type": "chatgpt_local_businesses",
"rank_group": 2,
"rank_absolute": 2,
"markdown": "本地商家示例",
"items": [
{
"type": "chatgpt_local_businesses_element",
"title": "示例咖啡店",
"description": "门店描述",
"address": "示例地址",
"phone": "+1 000 000 0000",
"reviews_count": 30,
"rating": {
"rating_type": "Max5",
"value": 4.2,
"votes_count": 30,
"rating_max": 5
}
}
]
},
{
"type": "chatgpt_products",
"rank_group": 3,
"rank_absolute": 3,
"items": [
{
"type": "chatgpt_products_element",
"product_id": "12282010806018998187",
"title": "Samsung Galaxy S25 Ultra",
"rating": {
"rating_type": "Max5",
"value": 4.8,
"votes_count": 36000,
"rating_max": 5
},
"price": 1199.99,
"currency": "USD",
"tag": "Android flagship with pen & AI",
"url": "https://example.com/product/s25-ultra",
"domain": "example.com",
"images": [
"https://example.com/image1.jpg"
]
}
]
},
{
"type": "chatgpt_text",
"rank_group": 4,
"rank_absolute": 4,
"markdown": "文本回答示例",
"sources": []
},
{
"type": "chatgpt_table",
"rank_group": 5,
"rank_absolute": 5,
"text": null,
"markdown": "| Role | Name | Term |",
"table": {
"table_header": ["Role", "Name", "Term"],
"table_content": [
["45th President", "Donald J. Trump", "2017 – 2021"],
["46th President", "Joe Biden", "2021 – January 20, 2025"]
]
}
},
{
"type": "chatgpt_navigation_list",
"rank_group": 6,
"rank_absolute": 6,
"title": "Recent news on President Trump",
"sources": [],
"markdown": "导航列表示例"
}
]
}
]
}
]
}状态码与错误处理
顶层状态
status_code = 20000:请求成功- 状态码:表示请求异常、参数错误、任务未就绪或系统处理失败
任务级状态
每个 tasks[] 都有独立的:
status_codestatus_message
建议按以下方式处理:
- 判断顶层
status_code - 再遍历
tasks[]检查每个任务状态 - 若任务
status_code >= 40000或result为空,应按失败处理 - 对未完成任务可结合
/v3/serp/chatgpt/ai_mode/tasks_ready做轮询
使用建议
- 该接口适合获取结构化较强的 AI 搜索结果,是文本、表格、图片、商品、本地商家等块级
- 若需批量处理,建议从
/v3/serp/chatgpt/ai_mode/tasks_ready拉取已完成任务列表 markdown字段可直接用于展示、摘要提取或下游 NLP 处理sources与search_results可用于建立引用来源、结果可信度分析及站点监测
实用场景
- 监控品牌问答:抓取品牌问题在 ChatGPT AI Mode 中的回答、来源站点和引用链接,评估品牌是否被正确提及。
- 拆解 AI 回答结构:解析
chatgpt_text、chatgpt_table、chatgpt_navigation_list等模块,识别哪些形态更容易出现在 AI 搜索结果中。 - 追踪商品推荐位:提取
chatgpt_products中的商品标题、价格、评分和落地页,分析电商类的 AI 推荐格局。 - 分析本地商业可见性:读取
chatgpt_local_businesses中的商家名称、评分、地址和电话,评估本地门店在 AI 搜索中的展示机会。 - 沉淀可用训练语料:将
markdown、sources、search_results结构化库,为 SEO 策略分析、生成和答案对比提供数据基础。