主题
获取 Yahoo SERP Advanced 结果(按任务 ID)
接口说明
通过任务 ID 获取已创建任务的 Yahoo SERP Advanced 结果。
请求方式: GET请求地址:
https://api.seermartech.cn/v3/serp/wp/v2/task_get/advanced/$id
说明:该接口用于按任务 ID 获取结果。任务结果在生成后的 30 天 可重复获取,且不会重复计费。 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。
计费说明
本接口本身不会因重复获取结果而再次扣费,账户在创建任务时计费。 已完成任务的结果可在 30 天获取。
如果按异步任务提交价格估算,请以创建任务对应接口的 cost 字段为准;当前结果获取接口通常返回 cost: 0。
请求参数
路径参数
| 参数名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。可在任务创建后的 30 天用于随时获取结果。 |
沙箱调试
如需查看该端点可能返回的完整 SERP素结构,可调用沙箱地址:
https://sandbox.seermartech.cn/v3/serp/yahoo/organic/task_get/advanced/00000000-0000-0000-0000-000000000000
沙箱响应会返回 Yahoo Organic SERP Advanced 端点支持的类型,字段为模拟数据。 使用沙箱端点不会计费。
响应结构
接口返回 JSON,顶层 tasks 数组,每个任务对象中对应结果。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表请参考错误码文档 |
status_message | string | 通用状态信息 |
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 范围 |
status_message | string | 任务状态说明 |
time | string | 任务处理耗时,单位秒 |
cost | float | 该任务成本,单位 USD |
result_count | integer | result 数组中的结果数量 |
path | array | 请求路径 |
data | object | 与创建任务时传参数一致 |
result | array | 结果数组 |
result[] 通用字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 查询。返回时会对 %## 做解码,+ 会被解码为空格 |
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 | 搜索引擎自动纠错信息 |
refinement_chips | object | 搜索细化标签;该字段固定为 null |
item_types | array | 当前 SERP 中出现的结果类型列表 |
se_results_count | integer | SERP 总结果数 |
pages_count | integer | 抓取到的 SERP 页数 |
items_count | integer | items 数组中的数量 |
items | array | SERP 结果数组 |
spell 对象
当搜索引擎对进行了自动纠错时,会返回该对象。
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 搜索引擎纠正后的 |
type | string | 自动纠错类型 |
spell.type 可选值:
did_you_meanshowing_results_forno_results_found_forincluding_results_for
item_types 可选值
item_types 中可能以下结果类型:
featured_snippetimageslocal_packhotels_packorganicpaidpeople_also_askrelated_searchesshoppingrecipestop_storiesvideoai_overview
SERP素字段说明
以下为 items[] 中各类的字段定义。
1)organic 自然结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 organic |
rank_group | integer | 同类型结果排名 |
rank_absolute | integer | SERP部中的绝对排名 |
page | integer | 结果所在页码 |
position | string | 展示位置,可能为 left 或 right |
xpath | string | 素 XPath |
domain | string | 结果域名 |
title | string | 标题 |
url | string | 结果 URL |
cache_url | string | 页面缓存地址 |
related_search_url | string | 站点搜索链接 |
breadcrumb | string | 面屑路径 |
is_image | boolean | 是否图片 |
is_video | boolean | 是否视频 |
is_featured_snippet | boolean | 是否属于精选摘要 |
is_malicious | boolean | 是否被标记为恶意结果 |
is_web_story | boolean | 是否被标记为 Web Story |
description | string | 摘要描述 |
pre_snippet | string | 摘要前附加信息 |
extended_snippet | string | 摘要后附加信息 |
images | array | 结果中的图片列表 |
amp_version | boolean | 是否存在 AMP 版本 |
rating | object | 评分信息 |
price | object | 价格信息 |
highlighted | array | 描述中加粗高亮的词 |
links | array | 子链接(sitelinks),无则为 null |
faq | object | FAQ 扩展,无则为 null |
extended_people_also_search | array | 扩展的搜索 |
about_this_result | object | “此结果”信息;Yahoo 中该字段始终为 null |
related_result | array | 同域结果;Yahoo 中该字段始终为 null |
rectangle | object | 结果区域坐标;Yahoo 暂不支持矩形计算,因此固定为 null |
organic.images[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element |
alt | string | 图片 alt 文本 |
url | string | 页面 URL |
image_url | string | 图片 URL,可能指向原始资源或平台存储地址 |
organic.rating
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型:Max5、Percents、CustomMax |
value | float | 评分值 |
votes_count | integer | 评论/投票数量 |
rating_max | integer | 对应评分类型的最大值 |
organic.price
| 字段 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格 |
regular | float | 原价 |
max_value | float | 最大价格 |
currency | string | 货币代码,ISO 格式 |
is_price_range | boolean | 是否为价格区间 |
displayed_price | string | SERP 中展示的原始价格文本 |
organic.links[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 link_element |
title | string | 子链接标题 |
description | string | 子链接描述 |
url | string | 子链接 URL |
organic.faq
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 faq_box |
items | array | FAQ 项列表 |
organic.faq.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 faq_box_element |
title | string | 问题 |
description | string | 展开后的答案 |
links | array | FAQ 中的链接 |
organic.faq.items[].links[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 link_element |
title | string | 链接锚文本 |
url | string | 链接地址 |
rectangle 通用结构
Yahoo 搜索任务当前不支持 calculate_rectangles,因此以下中的 rectangle 均固定为 null,字段结构如下供容参考:
| 字段 | 类型 | 说明 |
|---|---|---|
x | integer | 左上角 x 坐标 |
y | integer | 左上角 y 坐标 |
width | integer | 素宽度(像素) |
height | integer | 素高度(像素) |
2)paid 付费广告结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 paid |
rank_group | integer | 同类型结果排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | 素 XPath |
domain | string | 广告展示域名 |
description | string | 描述 |
title | string | 标题 |
url | string | 广告链接 |
breadcrumb | string | 面屑 |
highlighted | array | 加粗高亮词 |
extra | object | 额外信息 |
description_rows | array | 扩展描述,无则为 null |
links | array | 广告附加链接,无则为 null |
price | object | 价格信息 |
rectangle | object | 结果区域坐标,Yahoo 中固定为 null |
paid.extra
| 字段 | 类型 | 说明 |
|---|---|---|
ad_aclk | string | 广告标识符 |
paid.links[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 link_element |
title | string | 链接标题 |
description | string | 链接描述 |
url | string | 链接地址 |
ad_aclk | string | 广告标识符 |
paid.price
字段结构与 organic.price 相同。
3)images 图片结果块
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
title | string | 标题 |
url | string | 结果链接 |
items | array | 图片项列表,无则为 null |
related_image_searches | array | 图片搜索建议,无则为 null |
rectangle | object | Yahoo 中固定为 null |
images.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element |
alt | string | 图片 alt |
url | string | 图片原始地址 |
image_url | string | 压缩图片地址 |
images.related_image_searches[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 related_image_searches_element |
title | string | 搜索词 |
alt | string | 图 alt |
url | string | 图原始地址 |
image_url | string | 图压缩地址 |
4)video 视频结果块
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 video |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
items | array | 视频项列表 |
rectangle | object | Yahoo 中固定为 null |
video.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 video_element |
source | string | 视频来源 |
title | string | 视频标题 |
timestamp | string | 发布时间,UTC 格式 |
url | string | 视频链接 |
5)shopping 购物结果块
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 shopping |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
title | string | 标题 |
items | array | 商品项列表 |
rectangle | object | Yahoo 中固定为 null |
shopping.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 shopping_element |
title | string | 商品标题 |
price | object | 价格信息 |
source | string | 信息来源 |
description | string | 描述 |
marketplace | string | 电商平台/商户聚合方 |
marketplace_url | string | 平台商品页 URL |
url | string | 结果 URL |
6)featured_snippet 精选摘要
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 featured_snippet |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
domain | string | 来源域名 |
title | string | 标题 |
featured_title | string | 摘要源页面标题 |
description | string | 摘要 |
timestamp | string | 发布时间,UTC 格式 |
url | string | 来源 URL |
images | array | 图片列表 |
table | object | 表格数据,无则为 null |
rectangle | object | Yahoo 中固定为 null |
featured_snippet.table
| 字段 | 类型 | 说明 |
|---|---|---|
table_header | array | 表头 |
table_content | array | 表格,每个数组代表一行 |
7)top_stories 热门新闻
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 top_stories |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
items | array | 新闻列表 |
rectangle | object | Yahoo 中固定为 null |
top_stories.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 top_stories_element |
source | string | 来源名称 |
domain | string | 来源域名 |
title | string | 标题 |
date | string | 发布日期 |
amp_version | boolean | 是否存在 AMP 版本 |
timestamp | string | 发布时间,UTC 格式 |
url | string | 链接 |
image_url | string | 图片地址 |
8)hotels_pack店结果块
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 hotels_pack |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
title | string | 标题 |
date_from | string | 住日期,格式 yyyy-mm-dd |
date_to | string | 离店日期,格式 yyyy-mm-dd |
items | array | 店列表 |
rectangle | object | Yahoo 中固定为 null |
hotels_pack.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 hotels_pack_element |
price | object | 指定日期的预订价格 |
title | string | 店/住宿名称 |
desription | string | 描述文本 |
hotel_identifier | string | 店唯一标识 |
domain | string | 域名 |
url | string | 链接 |
is_paid | boolean | 是否广告位 |
rating | object | 评分信息 |
9)local_pack 本地结果块
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 local_pack |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
title | string | 商户名称 |
description | string | 描述 |
domain | string | 域名 |
phone | string | 电话 |
url | string | 商户链接 |
is_paid | boolean | 是否广告 |
rating | object | 评分信息 |
cid | string | 本地商户唯一 ID |
rectangle | object | Yahoo 中固定为 null |
10)recipes 菜谱结果块
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 recipes |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
items | array | 菜谱项列表 |
rectangle | object | Yahoo 中固定为 null |
recipes.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 recipes_element |
title | string | 菜谱标题 |
url | string | 菜谱链接 |
domain | string | 域名 |
source | string | 来源 |
description | string | 摘要 |
time | string | 制作总时长 |
rating | object | 评分信息 |
11)people_also_ask 提问
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 people_also_ask |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
items | array | 问题列表 |
rectangle | object | Yahoo 中固定为 null |
people_also_ask.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 people_also_ask_element |
title | string | 问题文本 |
xpath | string | XPath |
expanded_element | array | 展开后的答案块 |
people_also_ask.items[].expanded_element[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 people_also_ask_expanded_element |
featured_title | string | 标题 |
url | string | URL |
domain | string | 域名 |
title | string | 标题 |
description | string | 摘要描述 |
timestamp | string | 发布时间,UTC 格式 |
table | object | 表格数据,无则为 null |
12)related_searches 搜索
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 related_searches |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
items | array | 搜索项,无则为 null |
rectangle | object | Yahoo 中固定为 null |
13)ai_overview AI 概览
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview |
rank_group | integer | 同类型排名 |
rank_absolute | integer | 绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
asynchronous_ai_overview | boolean | 是否异步加载 |
markdown | string | Markdown 格式 |
items | array | AI 概览中的项 |
rectangle | object | 若创建任务时未启用矩形计算则为 null;但 Yahoo 当前该能力不可用 |
说明:当前 Yahoo Organic SERP API 中,
ai_overview的完整暂不可用。
ai_overview.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview_element |
position | string | left 或 right |
title | string | 素标题 |
text | string | 素文本/描述 |
markdown | string | Markdown 格式 |
references | array | 生成该时可能参考的网页列表 |
ai_overview.items[].references[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview_reference |
source | string | 参考来源名称或标题 |
domain | string | 参考域名 |
url | string | 参考页面 URL |
title | string | 参考页面标题 |
text | string | 被引用文本片段 |
错误处理建议
- 顶层
status_code用于判断整个请求是否成功。 tasks[].status_code用于判断任务是否成功。- 建议对异常状态码、空结果、任务未完成等进行单独处理。
- 完整错误码与信息说明请参考错误码附录。
请求示例
cURL
bash
id="02261816-2027-0066-0000-c27d02864073"
curl --location --request GET "https://api.seermartech.cn/v3/serp/wp/v2/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/serp/wp/v2/task_get/advanced/{task_id}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json)TypeScript
typescript
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
const response = await fetch(
`https://api.seermartech.cn/v3/serp/wp/v2/task_get/advanced/${taskId}`,
{
method: "GET",
headers: {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
}
);
const data = await response.json;
console.log(data);响应示例
json
{
"version": "0.1.20220414",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1721 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "serp",
"function": "task_get",
"se": "yahoo",
"se_type": "organic",
"language_code": "en",
"location_name": "United States",
"keyword": "hotels in New York",
"device": "mobile",
"postback_data": "advanced",
"os": "android"
},
"result": [
{
"se_results_count": 0,
"pages_count": 1,
"items_count": 137,
"items": [
{
"type": "paid",
"title": "Upstate New York Resort - Official Site - Book Direct",
"domain": "www.bing.com",
"breadcrumb": "lakejoseph.com",
"url": "https://www.bing.com/aclick?ld=example",
"highlighted": [],
"extra": {
"ad_aclk": null
},
"description": "Find Your Perfect Room...",
"description_rows": null,
"links": [],
"price": null,
"rectangle": null
},
{
"type": "featured_snippet",
"rank_group": 1,
"rank_absolute": 1,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div/div/div/div/div/div/div/ol/li",
"domain": "www.youtube.com",
"title": "8 KNOTS You Need to Know - How to tie knots that you will",
"featured_title": null,
"description": "8 KNOTS You Need to Know...",
"timestamp": null,
"url": "https://www.youtube.com/watch?v=0yfFo0-1u1M",
"images": null,
"table": null,
"rectangle": null
},
{
"type": "organic",
"rank_group": 1,
"rank_absolute": 6,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/section/section/section/section",
"domain": "www.expedia.com",
"title": "Top New York Hotels from $127",
"url": "https://www.expedia.com/example",
"cache_url": null,
"related_search_url": null,
"breadcrumb": "www.expedia.com > New York Vacation Packages",
"is_image": false,
"is_video": false,
"is_featured_snippet": false,
"is_malicious": false,
"is_web_story": false,
"description": "Book your hotel in New York and pay later...",
"pre_snippet": null,
"extended_snippet": null,
"images": null,
"amp_version": false,
"rating": null,
"price": null,
"highlighted": null,
"links": [],
"faq": null,
"extended_people_also_search": null,
"about_this_result": null,
"related_result": null,
"timestamp": null,
"rectangle": null
},
{
"type": "ai_overview",
"rank_group": 1,
"rank_absolute": 1,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div/div/div/div/div/div/div/ol/li/div",
"asynchronous_ai_overview": false,
"markdown": null,
"items": [],
"references": null,
"rectangle": null
}
]
}
]
}
]
}使用建议
- 通过任务提交接口创建 Yahoo SERP 任务。
- 再通过已完成任务列表接口获取可读取的任务 ID。
- 使用本接口按
id拉取 Advanced 结果。 - 若需解析丰富 SERP素,建议根据
item_types分流处理不同items[].type。 - 若用于生产环境,建议同时记录
check_url、datetime、status_code与cost。
实用场景
- 回查排名页面结构:按任务 ID 获取完整 SERP素,判断自然结果、广告、精选摘要、视频等模块对排名的挤压。
- 识别搜索结果页功能位:解析
item_types和items[].type,快速判断某是否出现people_also_ask、top_stories、local_pack等机会模块。 - 监控品牌词广告占位:读取
paid素中的标题、链接、域名和附加链接,评估品牌词是否被竞品广告拦截。 - 提取本地与商业化信号:从
local_pack、shopping、hotels_pack中提取商户、价格、电话、评分等信息,用于本地 SEO 与商业报分析。 - 构建 SERP 特征数据库:持续保存
items明细、页码、绝对排名与时间戳,形成历史搜索结果特征库,支持趋势分析与策略复盘。