主题
按任务 ID 获取 ChatGPT SERP Advanced 结果
接口说明
GET https://api.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/{id}
根据任务 ID 获取 ChatGPT AI Mode 的高级 SERP 结果。
任务发布后即可在 30 天随时获取结果,获取结果本身不额外收费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
请求路径参数如下:
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。任务发布成功后,可在 30 天使用该 ID 获取结果。 |
响应说明
接口返回 JSON 对象 tasks 数组。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。详细说明请参考错误码文档。建议客户端实现完善的异常和错误处理机制。 |
status_message | string | 通用状态说明。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks素字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。 |
status_code | integer | 任务状态码,通常位于 10000–60000 范围。详细说明请参考错误码文档。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求 URL 路径。 |
data | object | POST 创建任务时提交的参数。 |
result | array | SERP 结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 创建任务时提交的。返回时会对 URL 编码进行解码,+ 会被解码为空格。 |
type | string | 创建任务时提交的搜索类型。 |
se_domain | string | 创建任务时提交的搜索引擎域名。 |
location_code | integer | 创建任务时提交的地区代码。 |
language_code | string | 创建任务时提交的语言代码。 |
check_url | string | 对应搜索引擎结果页的直接 URL,可用于核验返回结果。 |
datetime | string | 获取结果的日期和时间,UTC 格式:yyyy-MM-dd HH:mm:ss +00:00。示例: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 SERP 结果数组。 |
item_types 可能以下值:
chatgpt_textchatgpt_tablechatgpt_navigation_listchatgpt_imageschatgpt_local_businesseschatgpt_products
search_results素
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_search_result。 |
url | string | 搜索结果 URL。 |
domain | string | 搜索结果域名。 |
title | string | 搜索结果标题。 |
description | string | 搜索结果描述。 |
breadcrumb | string | 面屑路径。 |
sources素
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_source。 |
title | string | 来源标题。 |
snippet | string | 来源摘要或描述。 |
domain | string | SERP 中显示的来源域名。 |
url | string | 来源 URL。 |
thumbnail | string | 来源缩略图 URL。 |
source_name | string | 来源名称。 |
publication_date | string | 发布日期,格式为 年-月-日 时:分:秒 +UTC 时差。示例:2019-11-15 12:57:46 +00:00。 |
markdown | string | 以 Markdown 格式返回的来源。 |
items素类型
chatgpt_text
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_text。 |
rank_group | integer | 同类型中的分组排名。不同类型不会影响该字段的排名。 |
rank_absolute | integer | 所有 SERP素中的绝对排名。 |
markdown | string | 文本,采用 Markdown 格式。 |
sources | array | 文本引用的来源数组,字段结构同上。 |
chatgpt_table
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_table。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 所有 SERP素中的绝对排名。 |
text | string | 表格文本。 |
markdown | string | Markdown 格式的表格。 |
table | object | 表格结构。 |
table.table_header | array | 表头。 |
table.table_content | array | 表格,每个数组代表一行。 |
chatgpt_navigation_list
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_navigation_list。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 所有 SERP素中的绝对排名。 |
title | string | 导航列表标题。 |
sources | array | 导航列表引用的来源数组,字段结构同上。 |
markdown | string | Markdown 格式的。 |
chatgpt_images
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_images。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 所有 SERP素中的绝对排名。 |
markdown | string | Markdown 格式的。 |
items | array | 图片数组。 |
图片字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element。 |
alt | string | 图片替代文本。 |
url | string | 页面 URL。 |
image_url | string | 图片 URL。若原始来源不可用,则可能返回本平台存储的图片地址。 |
markdown | string | Markdown 格式的图片。 |
chatgpt_local_businesses
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_local_businesses。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 所有 SERP素中的绝对排名。 |
markdown | string | Markdown 格式的。 |
items | array | 本地商家数组。 |
本地商家字段
| 字段 | 类型 | 说明 |
|---|---|---|
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。 |
rating.value | float | 平均评分。 |
rating.votes_count | integer | 评分数量。 |
rating.rating_max | integer | 当前评分类型的最大值。 |
chatgpt_products
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_products。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 所有 SERP素中的绝对排名。 |
items | array | 商品数组。 |
商品字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 chatgpt_products_element。 |
product_id | string | 商品 ID。 |
title | string | 商品标题。 |
rating | object | 商品评分信息,字段结构同本地商家评分。 |
price | float | 商品价格。 |
currency | string | 商品价格币种,使用 ISO 货币代码。 |
tag | string | 商品标签或简要卖点。 |
url | string | 商品结果 URL。 |
domain | string | 商品所在域名。 |
images | array | 商品图片 URL 数组。如果没有图片,则为 null。 |
沙箱测试
可使用沙箱接口查看该端点支持的 SERP 特征及扩展字段。沙箱返回的数据为模拟数据,不会产生费用。
text
https://api.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/00000000-0000-0000-0000-000000000000请求示例
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"PHP
php
<?php
$task_id = '02261816-2027-0066-0000-c27d02864073';
$url = 'https://api.seermartech.cn/v3/serp/chatgpt/ai_mode/task_get/advanced/' . $task_id;
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer smt_live_YOUR_KEY',
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
$result = json_decode($response, true);
print_r($result);TypeScript
typescript
import axios from "axios";
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
axios
.get(
`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.response?.data || error.message);
});Python
python
import requests
task_id = "02231256-2604-0066-0000-c27d02864073"
url = (
"https://api.seermartech.cn/v3/serp/chatgpt/"
f"ai_mode/task_get/advanced/{task_id}"
)
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
response.raise_for_status()
result = response.json()
# 处理接口返回结果
print(result)C#
csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
public class Example
{
public static async Task Main()
{
var taskId = "02261816-2027-0066-0000-c27d02864073";
using var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Bearer",
"smt_live_YOUR_KEY"
);
var url =
"https://api.seermartech.cn/v3/serp/chatgpt/" +
$"ai_mode/task_get/advanced/{taskId}";
var response = await httpClient.GetAsync(url);
var content = await response.Content.ReadAsStringAsync();
response.EnsureSuccessStatusCode();
// 处理 JSON 响应
Console.WriteLine(content);
}
}响应示例
以下示例展示响应结构。markdown、来源列表及部分 items已使用摘要表示。
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.1500 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": "example keyword",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "example keyword",
"type": "ai_mode",
"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": [
{
"type": "chatgpt_search_result",
"url": "https://example.com/page",
"domain": "example.com",
"title": "示例搜索结果",
"description": "示例搜索结果描述",
"breadcrumb": "example.com › page",
"sources": []
}
],
"sources": [],
"se_results_count": 1,
"item_types": [
"chatgpt_text",
"chatgpt_table",
"chatgpt_images",
"chatgpt_local_businesses",
"chatgpt_products"
],
"items_count": 5,
"items": [
{
"type": "chatgpt_text",
"rank_group": 1,
"rank_absolute": 1,
"markdown": "Markdown 格式的文本结果",
"sources": []
},
{
"type": "chatgpt_table",
"rank_group": 2,
"rank_absolute": 2,
"text": "表格文本",
"markdown": "| 列 1 | 列 2 |",
"table": {
"table_header": ["列 1", "列 2"],
"table_content": [
["值 1", "值 2"]
]
}
},
{
"type": "chatgpt_images",
"rank_group": 3,
"rank_absolute": 3,
"markdown": "",
"items": [
{
"type": "images_element",
"alt": "示例图片",
"url": "https://example.com/page",
"image_url": "https://example.com/image.jpg",
"markdown": ""
}
]
},
{
"type": "chatgpt_local_businesses",
"rank_group": 4,
"rank_absolute": 4,
"markdown": "本地商家结果",
"items": [
{
"type": "chatgpt_local_businesses_element",
"title": "示例商家",
"description": "商家描述",
"address": "示例地址",
"phone": "示例电话",
"reviews_count": 30,
"rating": {
"rating_type": "Max5",
"value": 4.2,
"votes_count": 30,
"rating_max": 5
}
}
]
},
{
"type": "chatgpt_products",
"rank_group": 5,
"rank_absolute": 5,
"items": [
{
"type": "chatgpt_products_element",
"product_id": "123456789",
"title": "示例商品",
"rating": {
"rating_type": "Max5",
"value": 4.8,
"votes_count": 36000,
"rating_max": 5
},
"price": 1199.99,
"currency": "USD",
"tag": "商品卖点",
"url": "https://example.com/product",
"domain": "example.com",
"images": [
"https://example.com/product.jpg"
]
}
]
}
]
}
]
}
]
}错误处理
请根据以下字段判断请求或任务是否成功:
- 顶层
status_code - 任务级
tasks[].status_code - 对应的
status_message
通常,20000 表示请求成功。状态码应结合错误码文档处理。对于任务级错误,还应检查 result 是否为空。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
实用场景
- 监测在 ChatGPT AI Mode 中的回答,评估品牌、产品或页面是否被 AI 搜索结果提及。
- 分析 AI 回答引用的来源页面,识别高频被引用的竞品、媒体和权威站点,为建设和外链策略提供依据。
- 提取 AI 搜索中的文本、表格、图片和导航列表,建立统一的 SERP 特征数据仓库,支持长期趋势分析。
- 跟踪本地商家在 AI 搜索中的展示信息,比较商家评分、评论量、地址和描述,本地 SEO 优化。
- 采集 AI 搜索中的商品、价格和评分信息,开展竞品商品监测、价格分析及电商优化。