主题
通过任务 ID 获取 Google AI Mode 高级 SERP 结果
GET /v3/serp/google/ai_mode/tasks_ready
本接口使用 GET 方法,通过任务 ID 获取 Google AI Mode 高级搜索结果:
GET https://api.seermartech.cn/v3/serp/google/ai_mode/task_get/advanced/$id
任务结果将在任务创建后的 30 天提供查询。任务提交后,后续通过本接口获取结果不会重复收取任务费用。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
路径参数
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,采用 UUID 格式。任务提交成功后,可在 30 天使用该 ID 查询结果。 |
请求示例
curl
bash
id="02261816-2027-0066-0000-c27d02864073"
curl --location --request GET \
"https://api.seermartech.cn/v3/serp/google/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"
response = requests.get(
f"https://api.seermartech.cn/v3/serp/google/ai_mode/task_get/advanced/{task_id}",
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
data = response.json()
if data.get("status_code") == 20000:
print(data)
else:
print(
f"请求失败,状态码:{data.get('status_code')},"
f"消息:{data.get('status_message')}"
)TypeScript
typescript
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
const response = await fetch(
`https://api.seermartech.cn/v3/serp/google/ai_mode/task_get/advanced/${taskId}`,
{
method: "GET",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
);
const result = await response.json();
console.log(result);返回结构
接口返回 JSON 对象,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。20000 表示成功。 |
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 | 创建任务时提交的参数。 |
result | array | SERP 结果数组。 |
tasks[].data 字段
data 对象通常创建任务时使用的参数,例如:
| 字段 | 类型 | 说明 |
|---|---|---|
api | string | API 类型,例如 serp。 |
function | string | API 操作,例如 task_get。 |
se | string | 搜索引擎,例如 google。 |
se_type | string | 搜索结果类型,例如 ai_mode。 |
language_name | string | 搜索语言名称。 |
location_name | string | 搜索地域名称。 |
keyword | string | 查询。 |
device | string | 设备类型,例如 desktop。 |
os | string | 操作系统,例如 windows。 |
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。 |
spell | object | 搜索引擎自动纠错信息。未发生纠错时为 null。 |
refinement_chips | object | 搜索细化选项。无时为 null。 |
item_types | array | SERP 中的结果类型。当前可能 ai_overview。 |
se_results_count | integer | SERP 中的结果总数。 |
items_count | integer | items 数组中的结果数量。 |
items | array | SERP 中的结果。 |
rectangle | object | 结果在 SERP 页面中的坐标和尺寸。当创建任务时未将 calculate_rectangles 设置为 true 时为 null。 |
spell 自动纠错字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 搜索引擎纠正后的,结果将基于该返回。 |
type | string | 自动纠错类型。可能值:did_you_mean、showing_results_for、no_results_found_for、including_results_for。 |
refinement_chips 搜索细化字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 refinement_chips。 |
xpath | string | 素在页面中的 XPath。 |
items | array | 搜索细化项。 |
options | array | 搜索细化选项。 |
refinement_chips.items 与 options素
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | items 中固定为 refinement_chips_element;options 中固定为 refinement_chips_option。 |
title | string | 细化选项标题。 |
url | string | 含细化参数的搜索 URL。 |
domain | string | 结果所在域名。 |
items 结果
AI Overview 基础字段
当类型为 ai_overview 时,字段如下:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview。 |
rank_group | integer | 同类型在 SERP 分组中的排名。不同类型之间不会影响该排名。 |
rank_absolute | integer | 素在整个 SERP 中的绝对排名。 |
page | integer | 素所在的 SERP 页码。 |
position | string | 素在 SERP 中的对齐方式:left 或 right。 |
xpath | string | 素的 XPath。 |
asynchronous_ai_overview | boolean | 是否异步加载 AI Overview。true 表示异步加载,false 表示从缓存加载。 |
markdown | string | 以 Markdown 格式返回的 AI Overview。 |
items | array | AI Overview部的。 |
links | array | AI Overview 中展示的网站链接。无链接时为 null。 |
images | array | AI Overview 中展示的图片。无图片时为 null。 |
references | array | 用于生成 AI Overview 的网页引用。 |
ai_overview.items 通用字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 部类型。常见值 ai_overview_element、ai_overview_video_element、ai_overview_table_element、ai_overview_expanded_element、ai_overview_shopping、ai_overview_paid。 |
position | string | 素对齐方式:left 或 right。 |
title | string | 素标题。 |
text | string | 素正文或描述。 |
markdown | string | Markdown 格式的。 |
链接字段
links 数组中的结构如下:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 link_element。 |
title | string | 链接标题或锚文本。 |
description | string | 链接描述。 |
url | string | 链接 URL。 |
domain | string | 链接所在域名。 |
图片字段
images 数组中的结构如下:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element。 |
alt | string | 图片的替代文本。 |
url | string | 与图片的 URL,通常为来源页面或落地页。 |
image_url | string | 图片 URL。 |
引用字段
references 数组中的结构如下:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview_reference。 |
source | string | 引用来源名称或标题。 |
domain | string | 引用来源域名。 |
url | string | 引用页面 URL。 |
title | string | 引用页面标题。 |
text | string | 用于生成 AI Overview 的页面文本片段。 |
视频
当 type 为 ai_overview_video_element 时,以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
position | string | 视频对齐方式:left 或 right。 |
title | string | 视频标题。 |
snippet | string | 视频补信息。 |
url | string | 视频页面 URL。 |
domain | string | 视频所在网站域名。 |
image_url | string | 视频缩略图 URL。 |
source | string | 视频来源名称。 |
date | string | 视频发布或收录日期,例如 Apr 26, 2024。 |
timestamp | string | 视频发布时间或收录时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。 |
表格
当 type 为 ai_overview_table_element 时,以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
position | string | 表格对齐方式:left 或 right。 |
markdown | string | Markdown 格式的表格。 |
table | object | 表格结构。 |
table.table_header | array | 表头。 |
table.table_content | array | 表格正文。每个数组表示一行。 |
references | array | 与表格的网页引用。 |
展开
当 type 为 ai_overview_expanded_element 时,以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
position | string | 素对齐方式:left 或 right。 |
title | string | 展开标题。 |
text | string | 展开补文本。 |
components | array | 展开中的组件列表。 |
components 组件字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview_expanded_component。 |
title | string | 组件标题。 |
text | string | 组件文本。 |
markdown | string | Markdown 格式的组件文本。 |
images | array | 组件中的图片;无图片时为 null。 |
links | array | 组件中的站点链接;无链接时为 null。 |
references | array | 组件的附加引用。 |
商品
当 type 为 ai_overview_shopping 时,商品 items 数组。
商品字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview_shopping_element。 |
product_id | string | Google Shopping 中的商品唯一标识符。 |
data_docid | string | SERP 数据的唯一标识符。 |
gid | string | Google Shopping局商品标识符。 |
title | string | 商品标题。 |
url | string | 含细化参数的搜索 URL。 |
domain | string | 商品所在域名。 |
rating | object | 商品评分。无评分时为 null。 |
price | object | 商品价格信息。无价格时为 null。 |
seller | string | 搜索结果中展示的商品卖家名称。 |
snippet | string | 商品补信息。 |
marketplace | string | 商户账户提供方,例如 by Google。 |
marketplace_url | string | 商户账户提供方 URL。 |
image_url | string | 商品图片 URL。 |
rating 评分字段
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型:Max5、Percents 或 CustomMax。 |
value | float | 评分值。 |
votes_count | integer | 评价数量。 |
rating_max | integer | 当前评分类型的最大值。 |
price 价格字段
| 字段 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格。 |
regular | float | 常规价格。 |
max_value | float | 价格区间的最大值。 |
currency | string | 价格使用的货币 ISO 代码。 |
is_price_range | boolean | 是否为价格区间。 |
displayed_price | string | 搜索结果中原样展示的价格字符串。 |
付费
当 type 为 ai_overview_paid 时, AI Overview 中的付费或广告信息。
| 字段 | 类型 | 说明 |
|---|---|---|
position | string | 素对齐方式:left 或 right。 |
text | string | 付费结果前的引导文本。 |
markdown | string | Markdown 格式的付费。 |
items | array | 广告数组。 |
ai_overview_paid.items 字段
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview_paid_element。 |
title | string | 广告标题。 |
url | string | 广告落地页 URL。 |
domain | string | 广告落地页域名。 |
ad_aclk | string | 广告点击追踪参数,可用于获取广告 URL。 |
website_name | string | 广告主网站展示名称。 |
breadcrumb | string | 广告中展示的面屑路径。 |
snippet | string | 广告描述文本。 |
images | array | 广告图片;无图片时为 null。 |
references | array | 与广告的附加引用。 |
矩形坐标字段
当创建任务时将 calculate_rectangles 设置为 true,结果可能 rectangle 对象:
| 字段 | 类型 | 说明 |
|---|---|---|
x | integer | 素左上角的横坐标。 |
y | integer | 素左上角的纵坐标。 |
width | integer | 素宽度,单位为像素。 |
height | integer | 素高度,单位为像素。 |
坐标原点位于屏幕左上角。如果未启用矩形坐标计算,rectangle 返回 null。
响应示例
json
{
"version": "0.1.20260223",
"status_code": 20000,
"status_message": "Ok.",
"time": "12.8697 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "02261816-2027-0066-0000-c27d02864073",
"status_code": 20000,
"status_message": "Ok.",
"time": "12.8697 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"serp",
"google",
"ai_mode",
"task_get",
"advanced"
],
"data": {
"api": "serp",
"function": "task_get",
"se": "google",
"se_type": "ai_mode",
"language_name": "English",
"location_name": "London,England,United Kingdom",
"keyword": "iphone 16 price comparison",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "iphone 16 price comparison",
"type": "ai_mode",
"se_domain": "google.com",
"location_code": 1006886,
"language_code": "en",
"check_url": "https://www.google.com/search?q=iphone+16+price+comparison",
"datetime": "2026-02-23 12:57:46 +00:00",
"spell": null,
"refinement_chips": null,
"item_types": [
"ai_overview"
],
"se_results_count": 0,
"items_count": 1,
"items": [
{
"type": "ai_overview",
"rank_group": 1,
"rank_absolute": 1,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div",
"asynchronous_ai_overview": false,
"markdown": "AI Overview,以 Markdown 格式返回。",
"items": [
{
"type": "ai_overview_element",
"position": "left",
"title": "Price Comparison",
"text": "AI Overview部文本。",
"markdown": "AI Overview部 Markdown。",
"links": null,
"images": null,
"references": null
},
{
"type": "ai_overview_table_element",
"position": "left",
"markdown": "| Model | 128GB | 256GB |\n|---|---:|---:|",
"table": {
"table_header": [
"Model",
"128GB",
"256GB"
],
"table_content": [
[
"Example Model",
"$599",
"$699"
]
]
},
"references": null
}
],
"links": null,
"images": null,
"references": null
}
],
"rectangle": null
}
]
}
]
}状态码与异常处理
建议根据顶层 status_code 和任务级 tasks[].status_code 分别处理请求状态:
20000:请求成功。40000及以上:通常表示任务或请求发生错误,应结合status_message定位原因。- 当
tasks_error大于0时,应逐项检查任务状态。 - 当
result为null或为空数组时,不应直接读取 SERP素字段。 - 任务结果在任务提交后的 30 天可查询,过期后可能无法获取结果。
接口
可通过以下接口获取已完成任务,再使用任务 ID 查询高级结果:
GET /v3/serp/google/ai_mode/tasks_ready
查询已完成任务后,调用:
GET /v3/serp/google/ai_mode/task_get/advanced/$id
实用场景
- 监测 AI Overview 展示:批量获取目标的 AI Overview 文本、结构化模块和引用来源,评估品牌在生成式搜索结果中的可见度。
- 分析搜索结果引用来源:提取
references中的来源域名、页面标题和文本片段,识别竞争对手及高频引用页面。 - 追踪商品价格与购物结果:读取商品标题、卖家、评分、价格和图片信息,构建竞品价格监测与电商 SERP 分析报表。
- 解析 AI Overview结构:区分文本、表格、视频、展开和付费模块,为搜索结果特征统计及优化提供依据。
- 核验不同地域和设备的搜索表现:结合、语言、地域、设备与
check_url,对比不同市场的 AI 搜索结果差异,支持 SEO 决策。