Skip to content

获取指定任务的高级版 SERP 结果

GET /v3/serp///task_get/advanced/{id}

接口说明

通过任务 ID 获取指定搜索引擎、指定结果类型的高级版 SERP 抓取结果。

  • 请求方式:GET
  • 请求地址:https://api.seermartech.cn/v3/serp///task_get/advanced/$id

说明:

  • :搜索引擎名称,例如 google
  • :结果类型,例如 organic
  • $id:任务唯一标识,UUID 格式

计费说明

本接口本身不会重复扣费。在创建任务时计费,任务创建后可在 30 天多次获取结果

  • 参考价请以创建任务时的接口计费为准
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准

请求参数

路径参数

字段类型说明
idstring任务 ID,UUID 格式
该 ID 在本平台唯一,可在任务创建后 30 天 随时用于获取结果

沙箱测试

如需查看本接口可能返回的 SERP 特性和扩展,可调用沙箱地址:

https://sandbox.seermartech.cn/v3/serp/google/organic/task_get/advanced/00000000-0000-0000-0000-000000000000

说明:

  • 沙箱返回该端点下所有可用类型的示例结构
  • 字段为模拟数据
  • 调用沙箱接口不计费

响应结构

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

顶层字段

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

建议在业务侧实现完整的异常与错误处理逻辑。扣费请以 cost 字段为准。

tasks[] 字段

字段类型说明
idstring任务 ID,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000
status_messagestring任务状态信息
timestring任务执行耗时
costfloat单任务成本,单位 USD
result_countintegerresult 数组中的结果数
patharray请求路径
dataobject创建任务时提交的参数
resultarraySERP 结果数组

result[] 通用字段

字段类型说明
keywordstring创建任务时提交的;返回时会解码 %##,并将 + 解码为空格
typestringPOST 任务中的搜索类型
se_domainstring搜索引擎域名
location_codeinteger地区代码
language_codestring语言代码
check_urlstring对应搜索结果页直达地址,可用于结果校验
datetimestring结果抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
spellobject搜索引擎自动纠错信息
refinement_chipsobject搜索细化标签
item_typesarray当前 SERP 中出现的结果类型列表
se_results_countintegerSERP 总结果数
pages_countinteger返回的 SERP 页数
items_countintegeritems 数组中的数量
itemsarraySERP素列表

spell 字段

字段类型说明
keywordstring自动纠正后的
typestring自动纠错类型

spell.type 可选值:

  • did_you_mean
  • showing_results_for
  • no_results_found_for
  • including_results_for

refinement_chips 字段

字段类型说明
typestring固定为 refinement_chips
xpathstring素 XPath
itemsarray细化项列表

refinement_chips.items[]

字段类型说明
typestring固定为 refinement_chips_element
titlestring标题
urlstring带筛选参数的搜索 URL
domainstringSERP 中的域名
optionsarray进一步细化选项

options[]

字段类型说明
typestring固定为 refinement_chips_option
titlestring标题
urlstring带筛选参数的搜索 URL
domainstringSERP 中的域名

item_types 可选值

item_types 表示当前 SERP 中出现的结果类型,可能:

  • answer_box
  • app
  • carousel
  • multi_carousel
  • featured_snippet
  • google_flights
  • google_reviews
  • third_party_reviews
  • google_posts
  • images
  • jobs
  • knowledge_graph
  • local_pack
  • hotels_pack
  • map
  • organic
  • paid
  • people_also_ask
  • related_searches
  • people_also_search
  • shopping
  • top_stories
  • twitter
  • video
  • events
  • mention_carousel
  • recipes
  • top_sights
  • scholarly_articles
  • popular_products
  • podcasts
  • questions_and_answers
  • find_results_on
  • stocks_box
  • visual_stories
  • commercial_units
  • local_services
  • google_hotels
  • math_solver
  • currency_box
  • product_considerations
  • found_on_web
  • short_videos
  • refine_products
  • explore_brands
  • perspectives
  • discussions_and_forums
  • compare_sites
  • courses
  • ai_overview

SERP素字段说明

高级版结果会在 items[] 中返回多种 SERP素。以下保留常见与核心结构;余特殊遵循同样的对象嵌套规则,并会 type、排名、位置、XPath、字段及可选 rectangle 信息。

通用排名字段

多数 items[]素都以下字段:

字段类型说明
typestring素类型
rank_groupinteger同类型分组排名
rank_absoluteinteger在整个 SERP 中的绝对排名
pageinteger所在搜索结果页码
positionstring页面位置,通常为 leftright
xpathstring素 XPath
rectangleobject素在 SERP 中的位置与尺寸;若创建任务时未设置 calculate_rectangles=true,则返回 null

rectangle

字段类型说明
xinteger左上角 x 坐标
yinteger左上角 y 坐标
widthinteger宽度(像素)
heightinteger高度(像素)

1) organic 自然结果

字段类型说明
typestring固定为 organic
domainstring结果域名
titlestring标题
urlstring结果链接
cache_urlstring缓存页链接
related_search_urlstring站点搜索链接
breadcrumbstring面屑
website_namestring站点名称
is_imageboolean是否图片
is_videoboolean是否视频
is_featured_snippetboolean是否为精选摘要来源
is_maliciousboolean是否被标记为恶意
is_web_storyboolean是否为 Web Story
descriptionstring摘要描述
pre_snippetstring摘要前附加信息
extended_snippetstring摘要后附加信息
imagesarray图片数组,无则为 null
amp_versionboolean是否存在 AMP 版本
ratingobject评分信息,无则为 null
priceobject价格信息,无则为 null
highlightedarray摘要中加粗
linksarraysitelinks,无则为 null
faqobjectFAQ 扩展,已废弃,始终返回 null
extended_people_also_searcharray返回 SERP 后可能出现的扩展搜索
about_this_resultobject“此结果”面板信息
related_resultarray同域结果
timestampstring发布时间,UTC 格式
rectangleobject素位置与尺寸

images[]

字段类型说明
typestring固定为 images_element
altstring图片 alt
urlstring页面 URL
image_urlstring图片地址

rating

字段类型说明
rating_typestring评分类型:Max5PercentsCustomMax
valuefloat评分值
votes_countinteger评价数
rating_maxinteger满分值

price

字段类型说明
currentfloat当前价格
regularfloat原价
max_valuefloat最高价格
currencystring币种 ISO 代码
is_price_rangeboolean是否价格区间
displayed_pricestringSERP 展示的原始价格文本
字段类型说明
typestring固定为 link_element
titlestringsitelink 标题
descriptionstring描述
urlstring链接地址
domainstring域名

about_this_result

字段类型说明
typestring固定为 about_this_result_element
urlstring结果 URL
sourcestring信息来源
source_infostring附加说明
source_urlstring来源页
languagestring结果语言
locationstring结果地区
search_termsarray匹的搜索词
related_termsarray搜索词

2) paid 广告结果

字段类型说明
typestring固定为 paid
titlestring广告标题
domainstring广告域名
website_namestring网站名称
descriptionstring描述
urlstring落地页地址
breadcrumbstring面屑
is_imageboolean是否含图片
is_videoboolean是否含视频
imagesarray图片数组
highlightedarray加粗词
extraobject附加信息,例如 ad_aclk
description_rowsarray扩展描述行
linksarray广告附加链接
priceobject价格信息
ratingobject评分信息
rectangleobject素位置与尺寸

字段类型说明
typestring固定为 featured_snippet
domainstring来源域名
titlestring结果标题
featured_titlestring精选摘要来源标题
descriptionstring摘要
timestampstring发布时间
urlstring来源链接
imagesarray图片数组
tableobject摘要表格
rectangleobject素位置与尺寸

4) people_also_ask 问题

字段类型说明
typestring固定为 people_also_ask
itemsarray问题列表
rectangleobject素位置与尺寸

items[]

字段类型说明
typestring固定为 people_also_ask_element
titlestring问题标题
seed_questionstring触发扩展的种子问题
xpathstringXPath
expanded_elementarray展开后的回答

展开项可能:

  • people_also_ask_expanded_element
  • people_also_ask_ai_overview_expanded_element

AI 扩展结构与 ai_overview 基本一致,可能:

  • title
  • text
  • markdown
  • links
  • images
  • references
  • asynchronous_ai_overview

5) ai_overview AI 概览

字段类型说明
typestring固定为 ai_overview
asynchronous_ai_overviewboolean是否异步加载
markdownstringAI 概览的 Markdown
itemsarray组成
referencesarray额外参考来源
rectangleobject素位置与尺寸

items[] 可能以下类型:

  • ai_overview_element
  • ai_overview_video_element
  • ai_overview_table_element
  • ai_overview_expanded_element

ai_overview_element

字段类型说明
positionstring位置
titlestring标题
textstring文本
markdownstringMarkdown
linksarray引用链接
imagesarray图片
referencesarray参考来源

ai_overview_reference

字段类型说明
typestring固定为 ai_overview_reference
sourcestring来源名称
domainstring来源域名
urlstring来源页面地址
titlestring来源标题
textstring被引用文本片段

6) knowledge_graph 知识图谱

注意:在移动端结果中,knowledge_graph 项目可能被打断,因此响应中可能出现多个 knowledge_graph 块。

字段类型说明
typestring固定为 knowledge_graph
titlestring实体名称
subtitlestring副标题
descriptionstring描述
card_idstring卡片 ID
urlstring官方或链接
image_urlstring主图
logo_urlstringLogo
cidstring搜索引擎定义的实体 ID
itemsarray知识图谱组件
rectangleobject素位置与尺寸

组件可能:

  • knowledge_graph_images_item
  • knowledge_graph_list_item
  • knowledge_graph_ai_overview_item
  • knowledge_graph_description_item
  • knowledge_graph_row_item
  • knowledge_graph_carousel_item
  • knowledge_graph_part_item
  • knowledge_graph_expanded_item
  • knowledge_graph_shopping_item
  • knowledge_graph_hotels_booking_item

这些结构通常会:

  • title
  • text
  • data_attrid
  • linklinks
  • items
  • table
  • images
  • timestamp
  • rectangle

7) 常见

以下也会出现在 items[] 中,字段模式与上述结构一致,通常标题、链接、子项目、评分、价格、时间、图片、坐标等信息:

  • answer_box
  • carousel
  • multi_carousel
  • related_searches
  • people_also_search
  • local_pack
  • hotels_pack
  • top_stories
  • twitter
  • map
  • google_flights
  • google_reviews
  • third_party_reviews
  • google_posts
  • video
  • app
  • images
  • shopping
  • jobs
  • events
  • mention_carousel
  • recipes
  • top_sights
  • scholarly_articles
  • popular_products
  • podcasts
  • questions_and_answers
  • find_results_on
  • stocks_box
  • visual_stories
  • commercial_units
  • local_services
  • google_hotels
  • math_solver
  • currency_box
  • courses
  • product_considerations
  • short_videos
  • found_on_web
  • refine_products
  • explore_brands
  • perspectives
  • discussions_and_forums
  • compare_sites

如果你需要做强类型解析,建议按 type 分发解析器,并为以下字段设计可选结构:

  • items
  • links
  • images
  • rating
  • price
  • table
  • graph
  • expanded_element
  • references
  • rectangle

错误处理建议

请重点处理以下:

  • 顶层 status_code 非成功状态
  • tasks_error > 0
  • tasks[].status_code >= 40000
  • tasks[].result 为空
  • 结果中部分嵌套对象为 null

建议根据 /v3/appendix/errors 对状态码进行分类处理。

请求示例

cURL

bash
id="02261816-2027-0066-0000-c27d02864073"

curl --location --request GET "https://api.seermartech.cn/v3/serp/{{low_se_name}}/{{low_se_type}}/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/{{low_se_name}}/{{low_se_type}}/task_get/advanced/{task_id}"

headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
data = response.json

print(data)

TypeScript

typescript
import axios from "axios";

const taskId = "02231256-2604-0066-2000-57133b8fc54e";

axios({
 method: "get",
 url: `https://api.seermartech.cn/v3/serp/{{low_se_name}}/{{low_se_type}}/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);
 });

响应示例

下面是精简后的响应结构示例,展示主要层级与常见:

json
{
 "version": "0.1.20200129",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.3059 sec.",
 "cost": 0.003,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "id": "02261816-2027-0066-0000-c27d02864073",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.1023 sec.",
 "cost": 0,
 "result_count": 1,
 "path": [
 "v3",
 "serp",
 "google",
 "organic",
 "task_get",
 "advanced"
 ],
 "data": {
 "api": "serp",
 "function": "task_get",
 "se": "google",
 "se_type": "organic",
 "language_name": "English",
 "location_name": "United States",
 "keyword": "flight ticket new york san francisco",
 "tag": "tag2",
 "device": "desktop",
 "os": "windows"
 },
 "result": [
 {
 "keyword": "flight ticket new york san francisco",
 "type": "organic",
 "se_domain": "google.com",
 "location_code": 2840,
 "language_code": "en",
 "datetime": "2024-04-26 00:00:00 +00:00",
 "item_types": [
 "organic",
 "paid",
 "people_also_ask",
 "featured_snippet",
 "ai_overview",
 "knowledge_graph"
 ],
 "se_results_count": 85600000,
 "pages_count": 1,
 "items_count": 6,
 "items": [
 {
 "type": "organic",
 "rank_group": 26,
 "rank_absolute": 30,
 "page": 1,
 "position": "left",
 "domain": "www.t-mobile.com",
 "title": "Apple iPhone 12 Pro 5G | 4 colors in 512GB, 256GB & 128GB",
 "url": "https://www.t-mobile.com/cell-phone/apple-iphone-12-pro",
 "breadcrumb": "https://www.t-mobile.com › Phones › Apple",
 "website_name": "T-Mobile",
 "description": "Get a great deal on the 5G-ready Apple iPhone 12 Pro.",
 "rating": {
 "rating_type": "Max5",
 "value": 4,
 "votes_count": 231,
 "rating_max": 5
 },
 "price": {
 "current": 30,
 "regular": null,
 "max_value": 899.99,
 "currency": "USD",
 "is_price_range": true,
 "displayed_price": "US$30.00 to US$899.99"
 },
 "about_this_result": {
 "type": "about_this_result_element",
 "url": "https://www.t-mobile.com/cell-phone/apple-iphone-12-pro",
 "source": "Wikipedia",
 "language": "English"
 },
 "rectangle": {
 "x": 180,
 "y": 5814,
 "width": 652,
 "height": 363
 }
 },
 {
 "type": "paid",
 "rank_group": 1,
 "rank_absolute": 1,
 "page": 1,
 "position": "left",
 "title": "Cheap Flights to Boston - Roundtrip starting from $97",
 "domain": "www.expedia.com",
 "website_name": "Expedia",
 "url": "https://www.expedia.com/Cheap-Flights-To-Boston.d178239.Travel-Guide-Flights",
 "description": "How can Expedia help you save?",
 "extra": {
 "ad_aclk": "DChcSEwjvwqLQ0MT8AhVH7FEKHWo_D70YABAAGgJ3cw"
 },
 "rating": {
 "rating_type": "Max5",
 "value": 4.8,
 "votes_count": 803,
 "rating_max": 5
 }
 },
 {
 "type": "people_also_ask",
 "rank_group": 1,
 "rank_absolute": 3,
 "page": 1,
 "position": "left",
 "items": [
 {
 "type": "people_also_ask_element",
 "title": "What is the difference between HIDS and NIDS?"
 }
 ]
 },
 {
 "type": "featured_snippet",
 "rank_group": 1,
 "rank_absolute": 10,
 "page": 1,
 "position": "left",
 "domain": "www.rome.net",
 "title": "Rome Metro - Lines, hours, fares and Rome metro maps",
 "description": "Most important metro stations...",
 "timestamp": "2020-09-11 14:42:55 +00:00",
 "url": "https://www.rome.net/metro"
 },
 {
 "type": "knowledge_graph",
 "rank_group": 1,
 "rank_absolute": 1,
 "page": 1,
 "position": "right",
 "title": "Eminem",
 "subtitle": "American rapper",
 "description": "Marshall Bruce Mathers III, known professionally as Eminem...",
 "card_id": "/m/01vsgrn",
 "url": "http://www.eminem.com/"
 },
 {
 "type": "ai_overview",
 "rank_group": 1,
 "rank_absolute": 1,
 "page": 1,
 "position": "left",
 "asynchronous_ai_overview": false,
 "markdown": "AI overview content in markdown",
 "items": [
 {
 "type": "ai_overview_element",
 "title": "Overview",
 "text": "The BMW M4 F82 is a high-performance coupe..."
 }
 ]
 }
 ]
 }
 ]
 }
 ]
}

使用建议

1. 推荐流程

  1. 通过任务创建接口提交抓取任务
  2. 通过 /v3/serp///tasks_ready 获取已完成任务
  3. 使用本接口按 id 拉取高级版完整结果

2. 结果解析建议

由于高级版 SERP 会返回大量异构,建议:

  • items[].type 建立分类型解析逻辑
  • null 值做容
  • 对 AI 概览、知识图谱、PAA、购物、地图、本地等特殊模块单独建模
  • 如果需要页面可视化分析,可在创建任务时启用 calculate_rectangles

实用场景

  • 监控版位结构:识别自然结果、广告、精选摘要、AI 概览等模块占比,评估目标词真实可见性。
  • 解析 SERP 特征机会:提取 people_also_askrelated_searchesfeatured_snippet 等模块,选题与问答布局。
  • 追踪竞品形态:分析竞品在自然结果、购物、知识图谱、本地中的出现方式,支持 SEO 与投放联动优化。
  • 评估 AI 概览影响:抓取 ai_overview 及引用来源,判断品牌或站点是否 AI 回答链路。
  • 构建搜索可视化报告:结合 rank_absolutepositionrectangle 生成页面布局报告,量化不同模块对点击机会的挤压程度。

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