主题
通过任务 ID 获取 Naver 自然搜索结果(高级版)
接口信息
GET https://api.seermartech.cn/v3/serp/naver/organic/task_get/advanced/$id
$id 为创建任务时返回的任务 ID。
计费说明
- 在提交任务时计费。
- 任务结果可在提交后的 30 天获取。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。 - 任务 ID过 30 天后将无法继续获取结果。
请求参数
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识符,UUID 格式。任务提交后 30 天可使用该 ID 随时查询结果。 |
请求示例
cURL
bash
task_id="02261816-2027-0066-0000-c27d02864073"
curl --location --request GET \
"https://api.seermartech.cn/v3/serp/naver/organic/task_get/advanced/${task_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/naver/organic/task_get/advanced/{task_id}"
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
data = response.json()
if data.get("status_code") != 20000:
print(
f"请求失败,状态码:{data.get('status_code')},"
f"消息:{data.get('status_message')}"
)
else:
print(data)TypeScript
typescript
import axios from "axios";
const taskId = "02231256-2604-0066-2000-57133b8fc54e";
axios
.get(
`https://api.seermartech.cn/v3/serp/naver/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.response?.data || error.message);
});响应说明
接口返回 JSON 数据,顶层 tasks 数组。每个任务对象中任务状态、请求参数及 SERP 结果。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。完整状态码请参考错误码文档。建议客户端对异常和错误状态进行统一处理。 |
status_message | string | 通用状态信息。 |
time | string | 接口执行耗时,例如 0.2266 sec.。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务对象数组。 |
任务对象字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 结果数组。 |
data 字段
data含创建任务时提交的参数,例如:
| 字段 | 类型 | 说明 |
|---|---|---|
api | string | API 类型,例如 serp。 |
function | string | API 方法,例如 task_get。 |
se | string | 搜索引擎,例如 naver。 |
se_type | string | 搜索结果类型,例如 organic。 |
keyword | string | 查询。 |
priority | integer | 任务优级。 |
tag | string | 自定义任务标签。 |
pingback_url | string | 任务完成后的回调地址。 |
device | string | 设备类型,例如 desktop。 |
os | string | 操作系统,例如 windows。 |
SERP 结果字段
result 数组中的每个结果对象以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | POST 请求中的。返回时会对 URL 编码进行解码,+ 会解码为空格。 |
type | string | POST 请求中的搜索结果类型。 |
se_domain | string | POST 请求中的搜索引擎域名。 |
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 中出现的结果类型。可能 images、local_pack、map、organic、paid、related_searches、video。 |
se_results_count | integer | SERP 中的结果总数。 |
pages_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、including_results_for。 |
SERP素通用字段
以下通常通用排名字段:
organic_element_in_serppaid_element_in_serprelated_searches_element_in_serplocal_pack_element_in_serpmap_element_in_serpvideo_element_in_serpimages_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,例如 organic、paid、related_searches、local_pack、map、video 或 images。 |
rank_group | integer | 同类型中的分组排名。不同类型之间不会影响该字段。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
page | integer | 素所在的 SERP 页码。 |
position | string | 素在 SERP 中的对齐方式,可选值:left、right。 |
xpath | string | 素在 SERP 页面中的 XPath。 |
rectangle | object | 素摘要区域的坐标和尺寸。由于 Naver 任务暂不支持 calculate_rectangles 参数,该字段始终为 null。 |
rectangle 字段
| 字段 | 类型 | 说明 |
|---|---|---|
x | integer | 摘要区域左上角的 X 坐标。 |
y | integer | 摘要区域左上角的 Y 坐标。 |
width | integer | 素宽度,单位为像素。 |
height | integer | 素高度,单位为像素。 |
自然结果:organic_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
domain | string | SERP 中显示的域名。 |
title | string | 结果标题。 |
url | string | 结果 URL。 |
cache_url | string | 页面缓存 URL。 |
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 | 结果描述之后的附加信息。 |
amp_version | boolean | 是否存在 AMP 版本。 |
rating | object | 结果评分信息。无评分时为 null。 |
highlighted | array | 结果描述中以粗体突出显示的。 |
links | array | 站点链接,未提供时为 null。 |
faq | object | FAQ 扩展,未提供时为 null。 |
extended_people_also_search | array | 搜索扩展,未提供时为 null。 |
timestamp | string | 结果发布时间,UTC 格式。 |
rectangle | object | 结果摘要区域的位置和尺寸,Naver 当前始终为 null。 |
评分对象:rating
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可选值:Max5、Percents、CustomMax。 |
value | integer | 评分值。 |
votes_count | integer | 评价或投票数量。 |
rating_max | integer | 当前评分类型对应的最大值。 |
站点链接:links
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 link_element。 |
title | string | 链接标题。 |
description | string | 链接描述。 |
url | string | 站点链接 URL。 |
FAQ 扩展:faq
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 faq_box。 |
items | array | FAQ 问答项数组。 |
FAQ 项字段:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 faq_box_element。 |
title | string | 问题标题。 |
description | string | 展开后的答案。 |
links | array | FAQ 项中的链接。 |
FAQ 链接字段:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 link_element。 |
title | string | 链接锚文本。 |
url | string | 链接 URL。 |
搜索扩展:extended_people_also_search
该字段表示自然结果附带的搜索词扩展。通常用户点击结果后返回搜索结果页时,搜索引擎可能展示此扩展。
付费结果:paid_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
domain | string | 广告结果中的域名。 |
description | string | 广告描述。 |
title | string | 广告标题。 |
url | string | 广告结果 URL。 |
breadcrumb | string | 广告面屑路径。 |
highlighted | array | 描述中突出显示的。 |
extra | object | 广告附加信息。 |
links | array | 广告站点链接,未提供时为 null。 |
rectangle | object | 广告摘要区域的位置和尺寸,Naver 当前始终为 null。 |
extra 字段:
| 字段 | 类型 | 说明 |
|---|---|---|
ad_aclk | string | 广告标识符。 |
description | string | 广告描述。 |
description_rows | array | 扩展描述,没有时为 null。 |
links | array | 广告站点链接。 |
ad_aclk | string | 广告链接标识符。 |
搜索:related_searches_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 related_searches。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
page | integer | 所在 SERP 页码。 |
position | string | 对齐方式,可选值:left、right。 |
xpath | string | 素 XPath。 |
items | array | 搜索项,没有时为 null。 |
rectangle | object | 素位置和尺寸,Naver 当前始终为 null。 |
本地结果:local_pack_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 本地商户或地点名称。 |
description | string | 商户或地点描述。 |
domain | string | 本地结果域名。 |
phone | string | 电话号码。 |
url | string | URL。 |
is_paid | boolean | 是否为广告结果。 |
rating | object | 商户评分信息。 |
cid | string | 商户唯一 ID。 |
rectangle | object | 素位置和尺寸,Naver 当前始终为 null。 |
地图:map_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 map。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
page | integer | 所在 SERP 页码。 |
position | string | 对齐方式,可选值:left、right。 |
xpath | string | 素 XPath。 |
title | string | 地图结果标题。 |
url | string | 地图 URL。 |
rectangle | object | 素位置和尺寸,Naver 当前始终为 null。 |
视频:video_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 video。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
page | integer | 所在 SERP 页码。 |
position | string | 对齐方式,可选值:left、right。 |
xpath | string | 素 XPath。 |
items | array | 视频条目,没有时为 null。 |
rectangle | object | 素位置和尺寸,Naver 当前始终为 null。 |
视频条目字段:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 video_element。 |
source | string | 视频来源。 |
title | string | 视频标题。 |
timestamp | string | 视频发布时间,UTC 格式。 |
url | string | 视频 URL。 |
图片:images_element_in_serp
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images。 |
rank_group | integer | 同类型中的分组排名。 |
rank_absolute | integer | 在整个 SERP 中的绝对排名。 |
page | integer | 所在 SERP 页码。 |
position | string | 对齐方式,可选值:left、right。 |
xpath | string | 素 XPath。 |
title | string | 图片模块标题。 |
url | string | 图片模块 URL。 |
items | array | 图片条目,没有时为 null。 |
rectangle | object | 素位置和尺寸,Naver 当前始终为 null。 |
图片条目字段:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element。 |
alt | string | 图片的 alt 文本。 |
url | string | 图片 URL。可能指向原始资源,也可能指向本平台存储地址。 |
响应示例
json
{
"version": "0.1.20210304",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2266 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "02261816-2027-0066-0000-c27d02864073",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1800 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"serp",
"naver",
"organic",
"task_get",
"advanced"
],
"data": {
"api": "serp",
"function": "task_get",
"se": "naver",
"se_type": "organic",
"keyword": "iphone",
"priority": 2,
"tag": "some_string_123",
"device": "desktop",
"os": "windows"
},
"result": [
{
"keyword": "iphone",
"type": "organic",
"se_domain": "naver.com",
"location_code": 2410,
"language_code": "ko",
"check_url": "https://search.naver.com/search.naver?query=iphone",
"datetime": "2019-11-15 12:57:46 +00:00",
"spell": null,
"refinement_chips": null,
"item_types": [
"organic",
"paid",
"related_searches",
"local_pack",
"map",
"video",
"images"
],
"se_results_count": 0,
"pages_count": 1,
"items_count": 7,
"items": [
{
"type": "organic",
"rank_group": 1,
"rank_absolute": 1,
"page": 1,
"position": "left",
"xpath": "/body/div/div/div/div/section",
"domain": "www.apple.com",
"title": "iPhone - Apple (KR)",
"url": "https://www.apple.com/kr/iphone/",
"cache_url": null,
"breadcrumb": "www.apple.com/kr/iphone",
"is_image": false,
"is_video": false,
"is_featured_snippet": false,
"is_malicious": false,
"is_web_story": false,
"description": "세상에서 가장 강력한 개인용 기기, iPhone 을 만나볼까요?",
"pre_snippet": null,
"extended_snippet": null,
"amp_version": false,
"rating": null,
"highlighted": null,
"links": null,
"faq": null,
"extended_people_also_search": null,
"timestamp": null,
"rectangle": null
},
{
"type": "paid",
"rank_group": 1,
"rank_absolute": 2,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div/div/div/div/ul/li",
"domain": "adcr.naver.com",
"title": "IPHONE LG헬로모바일",
"url": "https://adcr.naver.com/",
"breadcrumb": "direct.lghellovision.net",
"description": "0원부터 만나는 아이폰 시리즈",
"highlighted": null,
"extra": {
"ad_aclk": null,
"description": "0원부터 만나는 아이폰 시리즈",
"description_rows": null,
"links": null
},
"rectangle": null
},
{
"type": "related_searches",
"rank_group": 1,
"rank_absolute": 21,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div/div/section/div/div",
"items": null,
"rectangle": null
},
{
"type": "images",
"rank_group": 1,
"rank_absolute": 2,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/section/div/div",
"title": null,
"url": null,
"items": null,
"rectangle": null
},
{
"type": "video",
"rank_group": 1,
"rank_absolute": 12,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div/div/section/div/div",
"items": null,
"rectangle": null
},
{
"type": "local_pack",
"rank_group": 1,
"rank_absolute": 11,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div/div/div/div/section/div/div/div/ul/li",
"title": "A 바비레드 강남본점",
"description": "큐브스이크와 크림파스타가 맛있는 강남역介绍 장소",
"domain": "map.naver.com",
"phone": null,
"url": "https://map.naver.com/",
"is_paid": false,
"rating": null,
"cid": "21607745",
"rectangle": null
},
{
"type": "map",
"rank_group": 1,
"rank_absolute": 2,
"page": 1,
"position": "left",
"xpath": "/html/body/div/div/div/div/div/div",
"title": "서울특별시",
"url": "https://map.naver.com/",
"rectangle": null
}
]
}
]
}
]
}状态码
| 状态码 | 含义 |
|---|---|
20000 | 请求成功。 |
40000 及以上 | 任务或接口处理失败,应结合 status_message 判断原因。 |
完整错误码请参考本平台错误码文档。客户端应对任务不存在、任务已过期、结果尚未生成及目标搜索引擎异常等进行容错处理。
实用场景
- 监控自然排名:按、地区和设备获取 Naver 自然结果,评估目标页面的排名变化与 SEO 优化效果。
- 分析 SERP 特征占位:统计图片、视频、地图、本地结果、付费结果和搜索模块的出现,调整覆盖和 SERP 竞争策略。
- 识别竞争对手页面:提取自然结果中的域名、标题、描述和 URL,建立竞争对手排名与结构单。
- 挖掘本地 SEO 机会:读取本地结果、商户名称、电话、评分和
cid,分析门店类的地图与本地搜索。 - 评估广告与自然结果:同时获取付费结果和自然结果的排名、描述及链接,比较品牌中的 SEO 与 SEM 展现。