主题
获取 Haosou 自然搜索高级结果(按任务 ID)
接口说明
通过任务 id 获取 Haosou(360 搜索)自然搜索结果的高级版数据。
请求方式
GET https://api.seermartech.cn/v3/serp/haosou/organic/task_get/advanced/$id
计费说明
账户在创建任务时扣费,任务结果在随后 30 天可反复获取。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。可在任务创建后的 30 天随时用于获取结果。 |
返回说明
接口返回 JSON 数据,顶层 tasks 数组,每个任务对象中任务状态、请求参数回显以及结果数据。
沙箱测试
可使用以下沙箱地址查看本接口支持的 SERP素结构,返回为模拟数据,不产生扣费:
https://sandbox.本平台.com/v3/serp/haosou/organic/task_get/advanced/00000000-0000-0000-0000-000000000000
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。建议在系统中实现完整的异常与错误处理逻辑。 |
status_message | string | 通用状态信息。 |
time | string | 接口执行时间,单位秒。 |
cost | float | 当前请求总成本,单位 USD。获取已创建任务结果通常为 0。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | 返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks[] 字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,范围通常为 10000-60000。 |
status_message | string | 任务状态信息。 |
time | string | 任务执行时间,单位秒。 |
cost | float | 该任务成本,单位 USD。 |
result_count | integer | result 数组中的结果数量。 |
path | array | 请求路径。 |
data | array | 创建任务时传的参数回显。 |
result | array | 搜索结果数组。 |
result[] 字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 创建任务时的。返回时会对编码后的 %## 做解码,+ 会解码为空格。 |
type | string | 创建任务时指定的搜索类型。 |
se_domain | string | 搜索引擎域名。 |
location_code | integer | 对于 Haosou,该值始终为 0,因为位置参数会被忽略。 |
language_code | string | 创建任务时指定的语言代码。 |
check_url | string | 搜索结果直达链接,可用于人工校验结果准确性。 |
datetime | string | 抓取结果时间,格式如 2019-11-15 12:57:46 +00:00。 |
spell | array | 搜索引擎自动纠错信息。 |
item_types | array | 当前 SERP 中出现的结果类型。 |
se_results_count | integer | SERP 总结果数。 |
items_count | integer | items 数组中的返回数量。 |
items | array | SERP 中的结果项。 |
spell 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 搜索引擎纠正后的。 |
type | string | 纠错类型,可选值:did_you_mean、showing_results_for、no_results_found_for。 |
item_types 可选值
local_packmaporganicpaidrelated_searchesvideoimages
SERP素字段说明
本接口会根据搜索结果返回不同类型的 items[]素。以下为各类型字段结构。
1)organic 自然结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 organic。 |
rank_group | integer | 同类型结果排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 结果所在列,可能为 left 或 right。 |
xpath | string | 该在页面中的 XPath。 |
domain | string | 结果域名。 |
title | string | 标题。 |
url | string | 落地页链接。 |
cache_url | string | 页面缓存链接。 |
breadcrumb | string | 面屑或展示 URL。 |
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 | 摘要后附加信息。 |
amp_version | boolean | 是否有 AMP 版本。 |
rating | array | 评分信息。 |
highlighted | array | 摘要中加粗高亮的词。 |
links | array/null | 站点链接,无则为 null。 |
faq | array/null | FAQ 扩展,无则为 null。 |
timestamp | string | 发布时间。 |
rectangle | array/null | 结果在页面上的像素位置与尺寸;若创建任务时未启用 calculate_rectangles=true,则为 null。 |
organic.rating
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可能为 Max5、Percents、CustomMax。 |
value | integer | 评分值。 |
votes_count | integer | 评价数。 |
rating_max | integer | 当前评分类型的满分值。 |
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 | 链接地址。 |
2)paid 付费广告结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 paid。 |
rank_group | integer | 同类型结果排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
position | string | 结果位置,left 或 right。 |
xpath | string | 页面 XPath。 |
domain | string | 广告显示域名。 |
description | string | 广告描述。 |
title | string | 广告标题。 |
url | string | 广告目标 URL。 |
breadcrumb | string | 广告展示路径。 |
highlighted | array | 描述中高亮词。 |
extra | array | 额外广告信息。 |
description_rows | array/null | 扩展描述,无则为 null。 |
links | array/null | 广告附加链接,无则为 null。 |
rectangle | array/null | 页面像素位置与尺寸。 |
paid.extra
| 字段 | 类型 | 说明 |
|---|---|---|
ad_aclk | string | 广告标识符。 |
paid.links[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 link_element。 |
title | string | 链接标题。 |
description | string | 链接描述。 |
url | string | 链接地址。 |
ad_aclk | string | 广告标识符。 |
3)related_searches 搜索
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 related_searches。 |
rank_group | integer | 同类型排名。 |
rank_absolute | integer | 绝对排名。 |
position | string | left 或 right。 |
xpath | string | 页面 XPath。 |
items | array/null | 搜索项,无则为 null。 |
rectangle | array/null | 页面像素位置与尺寸。 |
4)local_pack 本地结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 local_pack。 |
rank_group | integer | 同类型排名。 |
rank_absolute | integer | 绝对排名。 |
position | string | left 或 right。 |
xpath | string | 页面 XPath。 |
title | string | 商家或地点标题。 |
description | string | 结果描述。 |
domain | string | 域名。 |
phone | string | 电话号码。 |
url | string | 链接。 |
is_paid | boolean | 是否为广告。 |
rating | array | 评分信息。 |
cid | string | 本地商户唯一标识。 |
rectangle | array/null | 页面像素位置与尺寸。 |
5)map 地图结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 map。 |
rank_group | integer | 同类型排名。 |
rank_absolute | integer | 绝对排名。 |
position | string | left 或 right。 |
xpath | string | 页面 XPath。 |
title | string | 地图标题。 |
url | string | 地图链接。 |
rectangle | array/null | 页面像素位置与尺寸。 |
6)video 视频结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 video。 |
rank_group | integer | 同类型排名。 |
rank_absolute | integer | 绝对排名。 |
position | string | left 或 right。 |
xpath | string | 页面 XPath。 |
items | array/null | 视频子项列表。 |
rectangle | array/null | 页面像素位置与尺寸。 |
video.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 video_element。 |
source | string | 视频来源站点。 |
title | string | 视频标题。 |
timestamp | string | 发布时间,格式如 2019-11-15 12:57:46 +00:00。 |
url | string | 视频链接。 |
7)images 图片结果
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images。 |
rank_group | integer | 同类型排名。 |
rank_absolute | integer | 绝对排名。 |
position | string | left 或 right。 |
xpath | string | 页面 XPath。 |
title | string | 图片模块标题。 |
url | string | 链接。 |
items | array/null | 图片子项列表。 |
rectangle | array/null | 页面像素位置与尺寸。 |
images.items[]
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element。 |
alt | string | 图片 alt 文本。 |
url | string | 图片 URL;可能指向原始资源,也可能指向平台存储地址。 |
rectangle 字段结构
适用于支持页面坐标的 SERP素。
| 字段 | 类型 | 说明 |
|---|---|---|
x | integer | 左上角 x 坐标,SERP 左上角为原点。 |
y | integer | 左上角 y 坐标,SERP 左上角为原点。 |
width | integer | 素宽度,像素。 |
height | integer | 素高度,像素。 |
错误处理建议
- 检查顶层
status_code与status_message - 再逐个检查
tasks[].status_code - 若
tasks[].status_code >= 40000或result为空,应按失败任务处理 - 建议为任务结果拉取、时、空结果、任务不存在等建立重试与告警机制
请求示例
cURL
bash
TASK_ID="02261816-2027-0066-0000-c27d02864073"
curl --location --request GET "https://api.seermartech.cn/v3/serp/haosou/organic/task_get/advanced/${TASK_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/haosou/organic/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/haosou/organic/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.20210105",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0819 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "serp",
"function": "task_get",
"se": "haosou",
"se_type": "organic",
"keyword": "marketing",
"language_code": "zh_CN",
"priority": 2,
"device": "desktop",
"os": "windows"
},
"result": [
{
"se_results_count": 1240000,
"items_count": 10,
"items": [
{
"type": "organic",
"domain": "www.so.com",
"title": "有有!广州最有调的7家精啤,周末走起~",
"url": "https://www.sohu.com/a/202258087_391248",
"cache_url": null,
"breadcrumb": "www.sohu.com/a/202258087_391248",
"is_image": false,
"is_video": false,
"is_featured_snippet": false,
"is_malicious": false,
"is_web_story": false,
"description": "2017年11月4日 - 用老板的话说, 啤也有限量版和小众款...",
"pre_snippet": null,
"extended_snippet": null,
"amp_version": false,
"rating": null,
"highlighted": [],
"links": [],
"faq": null,
"timestamp": null,
"rectangle": null
},
{
"type": "paid",
"rank_group": 1,
"rank_absolute": 2,
"position": "left",
"xpath": "/html/body/div/div/div/ul/li/div/div/div/div/ul/li",
"title": "176精品,1.76复古新开迷失版本传奇网站...",
"domain": "e.so.com",
"breadcrumb": null,
"url": "https://e.so.com/search/eclk?...",
"highlighted": null,
"extra": {
"ad_aclk": null
},
"description": "广告 最齐1新开迷失版本传奇网站网站...",
"description_rows": null,
"links": null,
"rectangle": null
},
{
"type": "images",
"rank_group": 1,
"rank_absolute": 3,
"position": "left",
"xpath": "/html/body/div/div/div/ul/li",
"title": "啤_360图片",
"url": "https://image.so.com/i?...",
"items": [],
"rectangle": null
},
{
"type": "video",
"rank_group": 1,
"rank_absolute": 4,
"position": "left",
"xpath": "/html/body/div/div/div/ul/li/div",
"items": [],
"rectangle": null
},
{
"type": "map",
"rank_group": 1,
"rank_absolute": 5,
"position": "left",
"xpath": "/html/body/div/div/div/ul/li/div",
"title": "北京市_360地图",
"url": "https://ditu.so.com/?t=map&src=onebox&new=1&k=%E5%8C%97%E4%BA%AC%E5%B8%82",
"rectangle": null
},
{
"type": "related_searches",
"rank_group": 1,
"rank_absolute": 6,
"position": "left",
"xpath": "/html/body/div/div/div/div/dl",
"items": [],
"rectangle": null
},
{
"type": "organic",
"rank_group": 2,
"rank_absolute": 7,
"position": "left",
"xpath": "/html/body/div/div/div/ul/li",
"domain": "www.so.com",
"title": "【十大北京购物中心_北京购物广场排行】",
"url": "https://www.maigoo.com/maigoo/6362bjgwzx_index.html",
"cache_url": null,
"breadcrumb": "www.maigoo.com/maigoo/6362bjgwzx_ind...",
"is_image": false,
"is_video": false,
"is_featured_snippet": false,
"is_malicious": false,
"is_web_story": false,
"description": "010-84260898,集大型时尚购物商场...",
"pre_snippet": null,
"extended_snippet": null,
"amp_version": false,
"rating": null,
"highlighted": [],
"links": null,
"faq": null,
"timestamp": null,
"rectangle": null
},
{
"type": "local_pack",
"rank_group": 1,
"rank_absolute": 10,
"position": "left",
"xpath": "/html/body/div/div/div/ul/li/div/div/div/div/ul/li",
"title": "北京银座和谐广场购物中心",
"description": "1. 北京银座和谐广场购物中心 地址:北京市丰台区万丰路68号...",
"domain": null,
"phone": null,
"url": null,
"is_paid": false,
"rating": null,
"cid": null,
"rectangle": null
}
]
}
]
}
]
}使用建议
- 若你是异步采集流程,建议调用
/v3/serp/haosou/organic/tasks_ready获取已完成任务,再逐个调用本接口拉取高级结果。 - 若你已保存任务
id,可直接通过本接口按 ID 查询。 - 高级结果适合用于解析自然结果、广告、本地结果、图片、视频、地图、搜索等多种 SERP素。
- 若需要页面布局分析,可在创建任务时启用
calculate_rectangles=true,随后从rectangle中读取页面坐标和尺寸。
实用场景
- 抓取真实排名:获取
organic结果中的rank_absolute、domain、url,监控目标站点在 360 搜索中的位置。 - 识别 SERP 竞争结构:分析
item_types与items,判断页面中广告、图片、视频、本地是否挤占自然结果流量。 - 监控品牌词投放:读取
paid广告,识别品牌词下是否出现竞品投放,品牌防御与 SEM 协同。 - 挖掘本地搜索机会:利用
local_pack、map数据识别地理意图的,支持门店 SEO 与本地商家优化。 - 复核页面展现形态:结合
xpath、rectangle、is_image、faq、links等字段,评估结果富媒体化程度,指导标题、摘要和结构化优化。