Skip to content

通过 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 为准

请求参数

路径参数

字段类型说明
idstring任务唯一标识符,UUID 格式。可在任务创建后的 30 天用于获取结果。

沙箱调试

如需查看该端点可能返回的完整字段结构,可调用沙箱地址:

https://sandbox.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/00000000-0000-0000-0000-000000000000

说明:

  • 沙箱返回当前端点所有可用字段
  • 字段中的值为演示数据
  • 调用沙箱接口不计费

返回结构

接口返回 JSON,顶层 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger通用状态码
status_messagestring通用提示信息
timestring执行耗时,单位秒
costfloat本次返回对应的总费用,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorinteger返回错误的任务数量
tasksarray任务结果数组

建议在接时统一处理状态码与异常。

tasks[] 字段

字段类型说明
idstring任务 ID,UUID 格式
status_codeinteger任务状态码,通常范围 10000-60000
status_messagestring任务提示信息
timestring任务执行耗时,单位秒
costfloat任务费用,单位 USD
result_countintegerresult 数组数量
patharrayURL 路径
dataobject与任务提交时相同的请求参数
resultarray结果数组

tasks[].data 字段

data 中通常任务提交时的原始参数,例如:

字段类型说明
apistringAPI 类型
functionstring调用方法
sestring搜索引擎类型
se_typestring搜索类型
language_codestring语言代码
location_codeinteger地区代码
keywordstring查询。返回时会对 %## 解码,+ 会还原为空格
devicestring设备类型
osstring操作系统

结果字段说明

tasks[].result[] 字段

字段类型说明
keywordstring查询
typestringPOST 提交时指定的搜索引擎类型
se_domainstringPOST 提交时指定的搜索引擎域名
location_codeintegerPOST 提交时指定的地区代码
language_codestringPOST 提交时指定的语言代码
check_urlstring搜索结果直达链接,可用于核对抓取结果
datetimestring结果采集时间,UTC 格式,示例:2019-11-15 12:57:46 +00:00
markdownstring结果的 Markdown 格式文本
search_resultsarray搜索结果数组
sourcesarray来源数组
se_results_countintegerSERP 中结果总数
item_typesarraySERP 中出现的结果类型
items_countintegeritems 数组中的数量
itemsarrayChatGPT 返回拆解后的结构化

search_results[] 字段

字段类型说明
typestring素类型,固定为 chatgpt_search_result
urlstring结果链接
domainstring结果域名
titlestring结果标题
descriptionstring结果描述
breadcrumbstring面屑路径

sources[] 字段

字段类型说明
typestring素类型,固定为 chatgpt_source
titlestring来源标题
snippetstring来源摘要
domainstring来源域名
urlstring来源链接
thumbnailstring缩略图地址
source_namestring来源名称
publication_datestring发布时间,格式示例:2019-11-15 12:57:46 +00:00
markdownstringMarkdown 格式

item_types 可选值

item_types 表示当前 SERP 中识别到的块类型,可能:

  • chatgpt_text
  • chatgpt_table
  • chatgpt_navigation_list
  • chatgpt_images
  • chatgpt_local_businesses
  • chatgpt_products

items[]素类型说明

1. chatgpt_text

表示文本回答块。

字段类型说明
typestring固定为 chatgpt_text
rank_groupinteger同类型排名
rank_absoluteinteger在 SERP素中的绝对排名
markdownstringMarkdown 格式
sourcesarray来源数组,结构同上文 sources[]

2. chatgpt_table

表示表格回答块。

字段类型说明
typestring固定为 chatgpt_table
rank_groupinteger同类型排名
rank_absoluteinteger在 SERP素中的绝对排名
textstring素文本
markdownstringMarkdown 格式
tableobject表格对象

chatgpt_table.table

字段类型说明
table_headerarray表头
table_contentarray表格数组,每个子数组表示一行

3. chatgpt_navigation_list

表示导航/推荐列表。

字段类型说明
typestring固定为 chatgpt_navigation_list
rank_groupinteger同类型排名
rank_absoluteinteger在 SERP素中的绝对排名
titlestring素标题
sourcesarray来源数组
markdownstringMarkdown 格式

4. chatgpt_images

表示图片结果块。

字段类型说明
typestring固定为 chatgpt_images
rank_groupinteger同类型排名
rank_absoluteinteger在 SERP素中的绝对排名
markdownstringMarkdown 格式
itemsarray图片子项数组

chatgpt_images.items[]

字段类型说明
typestring固定为 images_element
altstring图片 alt 文本
urlstring页面 URL
image_urlstring图片 URL,可能是原始来源,也可能是平台缓存地址
markdownstringMarkdown 格式

5. chatgpt_local_businesses

表示本地商家结果块。

字段类型说明
typestring固定为 chatgpt_local_businesses
rank_groupinteger同类型排名
rank_absoluteinteger在 SERP素中的绝对排名
markdownstringMarkdown 格式
itemsarray商家子项数组

chatgpt_local_businesses.items[]

字段类型说明
typestring固定为 chatgpt_local_businesses_element
titlestring商家名称
descriptionstring商家描述
addressstring地址
phonestring电话
reviews_countinteger评论总数
ratingobject评分信息

rating 字段

字段类型说明
rating_typestring评分类型,可为 Max5PercentsCustomMax
valuefloat平均评分
votes_countinteger投票数
rating_maxinteger当前评分体系的最大值

6. chatgpt_products

表示商品结果块。

字段类型说明
typestring固定为 chatgpt_products
rank_groupinteger同类型排名
rank_absoluteinteger在 SERP素中的绝对排名
itemsarray商品子项数组

chatgpt_products.items[]

字段类型说明
typestring固定为 chatgpt_products_element
product_idstring商品 ID
titlestring商品标题
ratingobject商品评分
pricefloat商品价格
currencystring价格币种,ISO 货币代码
tagstring标签文本
urlstring商品链接
domainstring商品域名
imagesarray商品图片 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_ready
  • GET /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": "![image](https://example.com/1.jpg)",
 "items": [
 {
 "type": "images_element",
 "url": "https://example.com/product-1",
 "alt": "example image 1",
 "image_url": "https://example.com/1.jpg",
 "markdown": "![image](https://example.com/1.jpg)"
 }
 ]
 },
 {
 "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_code
  • status_message

建议按以下方式处理:

  1. 判断顶层 status_code
  2. 再遍历 tasks[] 检查每个任务状态
  3. 若任务 status_code >= 40000result 为空,应按失败处理
  4. 对未完成任务可结合 /v3/serp/chatgpt/ai_mode/tasks_ready 做轮询

使用建议

  • 该接口适合获取结构化较强的 AI 搜索结果,是文本、表格、图片、商品、本地商家等块级
  • 若需批量处理,建议从 /v3/serp/chatgpt/ai_mode/tasks_ready 拉取已完成任务列表
  • markdown 字段可直接用于展示、摘要提取或下游 NLP 处理
  • sourcessearch_results 可用于建立引用来源、结果可信度分析及站点监测

实用场景

  • 监控品牌问答:抓取品牌问题在 ChatGPT AI Mode 中的回答、来源站点和引用链接,评估品牌是否被正确提及。
  • 拆解 AI 回答结构:解析 chatgpt_textchatgpt_tablechatgpt_navigation_list 等模块,识别哪些形态更容易出现在 AI 搜索结果中。
  • 追踪商品推荐位:提取 chatgpt_products 中的商品标题、价格、评分和落地页,分析电商类的 AI 推荐格局。
  • 分析本地商业可见性:读取 chatgpt_local_businesses 中的商家名称、评分、地址和电话,评估本地门店在 AI 搜索中的展示机会。
  • 沉淀可用训练语料:将 markdownsourcessearch_results 结构化库,为 SEO 策略分析、生成和答案对比提供数据基础。

统一入口:官网 · LLM API · 控制台