主题
Bing 自然搜索实时高级结果接口
POST /v3/serp/bing/organic/live/advanced
接口说明
实时 SERP 接口用于获取指定关键词、搜索引擎和地区下的实时搜索结果,最多可返回前 100 条结果。高级版结果会补更多 SERP素明细精选摘要、图片、新闻、视频、本地结果、搜索、AI Overview 等扩展模块。
- 请求方式:
POST - 接口路径:
/v3/serp/bing/organic/live/advanced - 完整地址:
https://api.seermartech.cn/v3/serp/bing/organic/live/advanced
计费说明
每次请求都会产生扣费。
- 实扣费以响应头
X-SeerMarTech-Charge-CNY为准 - 当
depth大于10且搜索引擎返回 10 条结果时,可能产生额外费用 calculate_rectangles=true时会额外收费,参考价约¥0.0320 / 次- 账户支持最高
2000次/分钟 API 调用 - 每次 Live SERP 请求只能提交
1个任务
请求格式
所有 POST 数据使用 UTF-8 编码的 JSON,并且请求体为 JSON 数组格式:
json
[
{
"keyword": "flight ticket new york san francisco",
"location_code": 2840,
"language_code": "en"
}
]主要参数
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 填。,最长支持 700 个字符。所有 %## 会被解码,字符 + 会被解码为空格。如需传 %,请写为 %25;如需传 +,请写为 %2B。 |
location_code | integer | 当未传 location_name 或 location_coordinate 时填。搜索地区代码。使用该字段时无需再传 location_name 或 location_coordinate。地区列表可通过 /v3/serp/bing/locations 获取。示例:2840 |
language_code | string | 当未传 language_name 时填。搜索语言代码。使用该字段时无需再传 language_name。语言列表可通过 /v3/serp/bing/languages 获取。示例:en |
depth | integer | 可选。SERP 解析深度,即返回结果数量。默认 10,最大 200。每 10 条结果按一个 SERP 单位计费;若设置 10,在搜索引擎返回更多结果时可能产生额外费用。 |
device | string | 可选。设备类型,可选值:desktop、mobile。默认 desktop。 |
附加参数
| 字段名 | 类型 | 说明 |
|---|---|---|
location_name | string | 当未传 location_code 或 location_coordinate 时填。搜索地区名。使用该字段时无需再传 location_code 或 location_coordinate。地区列表可通过 /v3/serp/bing/locations 获取。示例:London,England,United Kingdom |
language_name | string | 当未传 language_code 时填。搜索语言名。使用该字段时无需再传 language_code。语言列表可通过 /v3/serp/bing/languages 获取。示例:English |
os | string | 可选。设备操作系统。若 device=desktop,可选 windows、macos,默认 windows;若 device=mobile,可选 android、ios,默认 android。 |
tag | string | 可选。自定义任务标识,最长 255 个字符。响应中会在 data 对象里原样返回,便于业务对账与结果匹。 |
target | string | 可选。限定返回指定域名、子域名或页面 URL 的 SERP素。域名或子域名不要带 https:// 和 www.。 url 字段的 SERP素会被纳结果。支持使用 * 通符。 |
stop_crawl_on_match | array | 可选。停止抓取条件数组,最多支持 10 个目标对象。命中指定条件后,返回结果截至该命中项为止。会按抓取到命中条件前的 SERP 数量计费。 |
max_crawl_pages | integer | 可选。最多抓取的搜索结果页数。默认 1,最大 100。该参数与 depth 结合决定最终抓取范围。 |
search_param | string | 可选。搜索引擎附加查询参数。 |
calculate_rectangles | boolean | 可选。是否计算高级结果中各 SERP素的像素位置与尺寸。默认 false。开启后会返回 rectangle 信息,并产生额外费用。 |
browser_screen_width | integer | 可选。浏览器屏幕宽度,用于计算像素排名。范围 240-9999。需合 calculate_rectangles=true 使用。默认:桌面端 1920;Android 移动端 360;iOS 移动端 375。 |
browser_screen_height | integer | 可选。浏览器屏幕高度,用于计算像素排名。范围 240-9999。需合 calculate_rectangles=true 使用。默认:桌面端 1080;Android 移动端 640;iOS 移动端 812。 |
browser_screen_resolution_ratio | integer | 可选。浏览器分辨率比例,用于计算像素排名。范围 0.5-3。需合 calculate_rectangles=true 使用。默认:桌面端 1;Android/iOS 移动端 3。 |
url | string | 可选。可直接传搜索结果页 URL,本接口会自动拆解字段。但这种方式处理难度更高,并要求 URL 中已准确语言和地区信息,通常不建议使用。 |
location_coordinate | string | 当未传 location_name 或 location_code 时填。GPS 坐标,格式为 "latitude,longitude",经纬度最多支持 7 位小数。示例:53.476225,-2.243572 |
target 参数示例
| 写法 | 含义 |
|---|---|
example.com | 返回站点首页结果,如 https://example.com、https://www.example.com/ |
example.com* | 返回该域名下所有页面 |
*example.com* | 返回该域名及所有子域名、页面 |
*example.com | 返回任意子域名下的首页结果,如 https://en.example.com |
example.com/example-page | 返回指定精确 URL |
example.com/example-page* | 返回所有以该路径前缀开头的页面 |
stop_crawl_on_match 对象结构
| 字段名 | 类型 | 说明 |
|---|---|---|
match_type | string | 当设置 stop_crawl_on_match 时填。匹类型,可选值:domain、with_subdomains、wildcard |
match_value | string | 当设置 stop_crawl_on_match 时填。目标域名、子域名或通符表达式。不要带请求协议。示例:"match_value": "example.com"、"match_value": "/blog/post-*" |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/serp/bing/organic/live/advanced" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"language_code": "en",
"location_code": 2840,
"keyword": "flight ticket new york san francisco"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/serp/bing/organic/live/advanced"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"language_code": "en",
"location_code": 2840,
"keyword": "flight ticket new york san francisco"
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
async function main {
const response = await axios.post(
"https://api.seermartech.cn/v3/serp/bing/organic/live/advanced",
[
{
language_code: "en",
location_code: 2840,
keyword: "flight ticket new york san francisco",
},
],
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
}
);
console.log(response.data);
}
main.catch(console.error);响应说明
接口返回 JSON 数据,顶层 tasks 数组,每个任务对应一次获取结果。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码。完整错误码见 /v3/appendix/errors |
status_message | string | 通用状态信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次请求总费用 |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 返回错误的任务数量 |
tasks | array | 任务结果数组 |
任务级字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000 |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时 |
cost | float | 任务费用 |
result_count | integer | result 数组中的数量 |
path | array | URL 路径 |
data | object | 与请求中提交的参数基本一致 |
result | array | 获取结果数组 |
result 结果字段
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求中的;返回时 %## 会被解码,+ 会被解码为空格 |
type | string | 搜索类型 |
se_domain | string | 搜索引擎域名 |
location_code | integer | 地区代码 |
language_code | string | 语言代码 |
check_url | string | 搜索结果直达链接,可用于人工校验结果准确性 |
datetime | string | 抓取时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00 |
spell | object | 搜索引擎自动纠错信息;如无则为 null |
refinement_chips | object | 搜索细分建议;如无则为 null |
item_types | array | 当前 SERP 中出现的结果类型 |
se_results_count | integer | SERP 总结果数 |
pages_count | integer | 实抓取到的页数 |
items_count | integer | items 数组中的数量 |
items | array | SERP素列表 |
item_types 可能值
answer_box、carousel、events、featured_snippet、hotels_pack、images、jobs、local_pack、map、organic、paid、people_also_ask、people_also_search、questions_and_answers、recipes、related_searches、shopping、top_stories、video、ai_overview
SERP素字段说明
不同 type 的字段结构不同,以下保留核心字段说明。
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 | 缓存页 URL |
related_search_url | string | 搜索 URL |
breadcrumb | string | 面屑 |
website_name | 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 | 附加站点链接 |
faq | object | FAQ 扩展 |
extended_people_also_search | array | 回退搜索结果后出现的搜索扩展 |
about_this_result | object | “此结果”信息。Bing 中始终为 null |
related_result | array | 同域名结果。Bing 中始终为 null |
timestamp | string | 发布时间,UTC 格式 |
rectangle | object | 像素坐标与尺寸;在 calculate_rectangles=true 时返回 |
images 子项
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 images_element |
alt | string | 图片 alt 文本 |
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 | 页面展示的原始价格文本 |
links 子项
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 link_element |
title | string | 链接标题 |
description | string | 链接描述 |
url | string | 链接 URL |
faq 子项
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 faq_box |
items | array | FAQ 项目列表 |
FAQ 项目:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 faq_box_element |
title | string | 问题 |
description | string | 回答 |
links | array | FAQ 中的链接 |
2)paid 广告结果
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 paid |
rank_group | integer | 同类型分组排名 |
rank_absolute | integer | SERP局绝对排名 |
page | integer | 所在页码 |
position | string | left 或 right |
xpath | string | 素 XPath |
domain | string | 广告域名 |
description | string | 广告描述 |
title | string | 广告标题 |
url | string | 广告落地页 |
breadcrumb | string | 面屑 |
highlighted | array | 高亮词 |
extra | object | 扩展信息,如 ad_aclk |
description_rows | array | 扩展描述行 |
links | array | 附加链接 |
price | object | 价格信息 |
rectangle | object | 像素坐标与尺寸 |
3)answer_box 答案框
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 answer_box |
rank_group | integer | 同类型分组排名 |
rank_absolute | integer | SERP局绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
text | array | 文本,无则为 null |
links | array | 链接列表 |
rectangle | object | 像素坐标与尺寸 |
4)related_searches 搜索
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 related_searches |
rank_group | integer | 同类型分组排名 |
rank_absolute | integer | SERP局绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
items | array | 搜索项 |
rectangle | object | 像素坐标与尺寸 |
5)people_also_search 用户也在搜
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 people_also_search |
rank_group | integer | 同类型分组排名 |
rank_absolute | integer | SERP局绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
title | string | 模块标题 |
items | array | 扩展项 |
rectangle | object | 像素坐标与尺寸 |
6)local_pack 本地结果
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 local_pack |
rank_group | integer | 同类型分组排名 |
rank_absolute | integer | SERP局绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
title | string | 商户名称 |
description | string | 描述 |
domain | string | 域名 |
phone | string | 电话 |
url | string | 页面 URL |
is_paid | boolean | 是否广告 |
rating | object | 评分信息 |
cid | string | 本地商户唯一 ID |
is_claimed | boolean | 是否已认领 |
rectangle | object | 像素坐标与尺寸 |
7)hotels_pack店结果
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 hotels_pack |
rank_group | integer | 同类型分组排名 |
rank_absolute | integer | SERP局绝对排名 |
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 | 像素坐标与尺寸 |
子项 hotels_pack_element含:price、title、description、hotel_identifier、domain、url、is_paid、rating、rectangle 等字段。
8)carousel 轮播模块
字段:type、rank_group、rank_absolute、page、position、xpath、title、items、rectangle。 子项 carousel_element 一般:title、subtitle。
9)events 活动结果
字段:type、rank_group、rank_absolute、page、position、xpath、title、url、items、rectangle。 子项 events_element 一般:title、description、url。
10)featured_snippet 精选摘要
字段:type、rank_group、rank_absolute、page、position、xpath、domain、title、featured_title、description、timestamp、url、images、table、rectangle。
说明:
images:图片列表table:表格结果,table_header与table_content
11)images 图片结果
字段:type、rank_group、rank_absolute、page、position、xpath、title、url、items、related_image_searches、rectangle。
图片子项 images_element:
alturlimage_url
图片搜索子项 related_image_searches_element:
titlealturlimage_url
12)shopping 购物结果
字段:type、rank_group、rank_absolute、page、position、xpath、title、items、rectangle。
购物子项 shopping_element 常见字段:
titlepricesourcedescriptionmarketplacemarketplace_urlurl
13)jobs 职位结果
字段:type、rank_group、rank_absolute、page、position、xpath、title、url、items、rectangle。
职位子项 jobs_element 常见字段:
titledescriptionlocationauthorjob_posted_timetimestampcontract_typesalaryurl
14)map 地图结果
字段:type、rank_group、rank_absolute、page、position、xpath、title、url、rectangle。
15)people_also_ask 用户还问
字段:type、rank_group、rank_absolute、page、position、xpath、items、rectangle。
子项 people_also_ask_element:
titlexpathexpanded_element
展开项 people_also_ask_expanded_element:
featured_titleurldomaintitledescriptiontimestamptablerectangle
16)questions_and_answers 问答结果
子项 questions_and_answers_element 常见字段:
urlquestion_textanswer_textsourcedomainrectangle
17)recipes 菜谱结果
子项 recipes_element 常见字段:
titleurldomainsourcedescriptiontimeratingrectangle
18)top_stories 热门新闻
子项 top_stories_element 常见字段:
sourcedomaintitledateamp_versiontimestampurlimage_urlbadgesrectangle
19)video 视频结果
子项 video_element 常见字段:
sourcetitletimestampurlrectangle
20)ai_overview AI 概览
ai_overview 用于返回搜索结果中的 AI 概览模块。
顶层常见字段:
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 固定为 ai_overview |
rank_group | integer | 同类型分组排名 |
rank_absolute | integer | SERP局绝对排名 |
page | integer | 页码 |
position | string | left 或 right |
xpath | string | XPath |
markdown | string | Markdown 格式 |
items | array | AI 概览项 |
references | array | 参考来源 |
rectangle | object | 像素坐标与尺寸 |
可能出现的 AI 子类型:
ai_overview_elementai_overview_video_elementai_overview_videos_elementai_overview_images_elementai_overview_organic_elementai_overview_reference
常见字段:
- 文本类:
title、text - 图片类:
images、image_url - 视频类:
snippet、source、date、timestamp - 引用类:
source、domain、url、title、text - 自然结果类:
title、url、domain、snippet、breadcrumb、website_name、links、highlighted
rectangle 像素坐标对象
当 calculate_rectangles=true 时,多数 SERP素会返回 rectangle:
| 字段名 | 类型 | 说明 |
|---|---|---|
x | integer | 左上角相对于屏幕原点的 X 坐标 |
y | integer | 左上角相对于屏幕原点的 Y 坐标 |
width | integer | 素宽度(像素) |
height | integer | 素高度(像素) |
响应示例
json
{
"version": "0.1.20200129",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2347 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "serp",
"function": "task_get",
"se": "bing",
"se_type": "organic",
"language_name": "English",
"location_name": "United States",
"keyword": "flight ticket new york san francisco",
"tag": "tag2",
"device": "desktop",
"os": "windows"
},
"result": [
{
"se_results_count": 99148,
"pages_count": 1,
"items_count": 110,
"items": [
{
"type": "organic",
"rank_group": 1,
"rank_absolute": 2,
"page": 1,
"position": "left",
"xpath": "/html/body/div/main/ol/li",
"domain": "www.imdb.com",
"title": "Star Wars Cast(1977-Present) - IMDb",
"url": "https://www.imdb.com/list/ls070679507/",
"breadcrumb": "https://www.imdb.com/list/ls070679507",
"website_name": "IMDb",
"is_image": false,
"is_video": false,
"is_featured_snippet": false,
"is_malicious": false,
"is_web_story": false,
"description": "Star Wars Cast (1977-Present) 1. Mark Hamill...",
"rectangle": {
"x": 160,
"y": 571,
"width": 648,
"height": 986
}
},
{
"type": "images",
"rank_group": 1,
"rank_absolute": 4,
"page": 1,
"position": "left",
"xpath": "/html/body/div/main/ol/li",
"title": "Images of Star Wars Cast",
"url": "https://www.bing.com/images/search?q=star+wars+cast",
"items": [],
"related_image_searches": [],
"rectangle": {
"x": 160,
"y": 571,
"width": 648,
"height": 986
}
},
{
"type": "top_stories",
"rank_group": 1,
"rank_absolute": 7,
"page": 1,
"position": "left",
"xpath": "/html/body/div/main/ol/li",
"title": "News about Star Wars Cast",
"items": [],
"rectangle": {
"x": 160,
"y": 571,
"width": 648,
"height": 986
}
},
{
"type": "ai_overview",
"rank_group": 1,
"rank_absolute": 1,
"page": 1,
"position": "left",
"xpath": "XPatha2ffe97b-67c8-4aca-a1a3-e96ef3817da8",
"markdown": null,
"items": [
{
"type": "ai_overview_element",
"title": "示例标题",
"text": "示例文本",
"images": [],
"references": []
}
],
"references": [],
"rectangle": {
"x": 165,
"y": 197,
"width": 149,
"height": 141
}
}
]
}
]
}
]
}错误处理
- 请根据顶层
status_code和任务级status_code判断请求是否成功 - 完整错误码与状态说明请参考:
/v3/appendix/errors - 建议业务侧实现完善的异常处理机制:
- 请求参数校验失败
- 认证失败
- 频控限
- 平台返回空结果
- 单任务执行失败但整体请求成功
使用建议
- 优使用
location_code+language_code,比传名称更稳定。 - 如需做页面可视化排名分析,再开启
calculate_rectangles,不成本。 - 如果只心某个域名的,可使用
target缩小返回范围。 - 若需控制抓取页数与成本,应结合
depth和max_crawl_pages一起设计。 - Bing 下
about_this_result与related_result当前通常返回null,解析时请做好容。
实用场景
- 监控实时排名:抓取 Bing 自然结果与绝对排名,及时发现目标页面波动,支持日报、预警和竞品追踪。
- 识别 SERP 机会位:分析
featured_snippet、people_also_ask、top_stories、images等模块,判断优化应优争取哪些搜索展现位。 - 评估本地搜索:提取
local_pack、map、hotels_pack等本地模块,帮助连锁门店、、生活服务品牌评估区域可见度。 - 筛选域名级竞争结果:结合
target或结果中的domain字段,定位竞品在指定下的出现位置与页面类型,支持竞争报分析。 - 计算像素级可见性:启用
calculate_rectangles后获取屏幕坐标与尺寸,用于研究首屏占位、模块遮挡和真实可见。