主题
Bing 自然搜索结果实时高级接口
POST /v3/serp/bing/organic/live/advanced
本接口使用 POST 方法,路径为:
POST https://api.seermartech.cn/v3/serp/bing/organic/live/advanced
本接口实时获取指定、搜索引擎位置、语言和设备下的 Bing 搜索结果,最多解析前 200 个结果,并返回自然结果、广告、精选摘要、图片、视频、本地结果、购物、问答、AI 摘要等 SERP素的完整结构化数据。
所有请求体使用 UTF-8 编码的 JSON 数组格式。每次请求只能提交一个任务;平台限流以认证说明中的 30/60/120 次/分钟规则为准。
认证
请求头使用 Bearer Token:
http
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json计费说明
- 每次请求均会产生费用。
depth大于10时,如果搜索引擎返回 10 条结果,可能产生额外费用。- 启用
calculate_rectangles计算像素位置时,将产生额外费用,参考价约 ¥0.0144 / 次。 - 实扣费以响应头
X-SeerMarTech-Charge-CNY为准。
请求参数
核心参数
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
keyword | string | 是 | 要查询的,最多 700 个字符。请求中的 %## 编码会被解码,+ 会被解码为空格。如需查询 %,请写成 %25;如需保留 +,请写成 %2B。 |
location_code | integer | 条件填 | 搜索位置代码。未指定 location_name 或 location_coordinate 时填。使用此参数时,不应同时传另外两个位置参数。可通过位置查询接口获取可用代码,例如 2840。 |
language_code | string | 条件填 | 搜索语言代码。未指定 language_name 时填。使用此参数时,不应同时传 language_name,例如 en。 |
depth | integer | 否 | 解析的结果数量,默认 10,最大 200。 |
device | string | 否 | 设备类型,可选 desktop 或 mobile,默认 desktop。 |
位置和语言列表可通过以下容路径查询:
/v3/serp/wp/locations/v3/serp/wp/languages
附加参数
| 参数 | 类型 | 说明 |
|---|---|---|
location_name | string | 搜索位置的完整名称。未指定 location_code 或 location_coordinate 时填,例如 London,England,United Kingdom。 |
language_name | string | 搜索语言的完整名称。未指定 language_code 时填,例如 English。 |
os | string | 操作系统。desktop 可选 windows、macos,默认 windows;mobile 可选 android、ios,默认 android。 |
tag | string | 用户自定义任务标识,最多 255 个字符。该值会原样返回在响应的 data 对象中。 |
target | string | 目标域名、子域名或网页。域名和子域名不得 https:// 或 www.。支持 * 通符,可用于筛选目标 URL 的结果。 |
stop_crawl_on_match | array | 满足指定目标后停止抓取。最多 10 个目标对象;每个对象 match_type 和 match_value。 |
max_crawl_pages | integer | 最多抓取的结果页数,默认 1,最大 100。与 depth合使用。 |
search_param | string | Bing 搜索查询的附加参数。 |
calculate_rectangles | boolean | 是否计算 SERP素的像素位置,默认 false。启用后返回 rectangle 对象并产生额外费用。 |
browser_screen_width | integer | 浏览器屏幕宽度,范围 240-9999。默认值:桌面端 1920、Android 移动端 360、iOS 移动端 375。需将 calculate_rectangles 设为 true。 |
browser_screen_height | integer | 浏览器屏幕高度,范围 240-9999。默认值:桌面端 1080、Android 移动端 640、iOS 移动端 812。需将 calculate_rectangles 设为 true。 |
browser_screen_resolution_ratio | number | 浏览器屏幕分辨率比例,范围 0.5-3。默认值:桌面端 1,移动端 3。需将 calculate_rectangles 设为 true。 |
url | string | 搜索查询的完整 URL。接口会从 URL 中解析、语言和位置等参数。此方式处理复杂,且在 URL 中提供准确的语言和位置,通常不建议使用。 |
location_coordinate | string | GPS 坐标,格式为 纬度,经度,每个坐标最多 7 位小数,例如 53.476225,-2.243572。使用此参数时,不应同时传 location_code 或 location_name。 |
target 通符规则
| 示例 | 匹范围 |
|---|---|
example.com | 匹网站首页 URL |
example.com* | 匹该域名下以指定字符串开头的所有页面 |
*example.com* | 匹整个域名、所有页面及子域名 |
*example.com | 匹任意子域名下的网站首页 |
example.com/example-page | 匹一致的 URL |
example.com/example-page* | 匹以指定路径开头的所有 URL |
stop_crawl_on_match 子参数
| 参数 | 类型 | 说明 |
|---|---|---|
match_type | string | 匹方式。可选:domain(指定域名或子域名)、with_subdomains(主域名及子域名)、wildcard(通符模式)。 |
match_value | string | 要匹的域名、子域名或通符值。不得请求协议,例如 example.com 或 /blog/post-*。 |
示例:
json
"stop_crawl_on_match": [
{
"match_type": "domain",
"match_value": "example.com"
}
]系统会持续抓取,直到满足数组中的停止条件;在此之前抓取到的每个 SERP 都可能计费用。
请求示例
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",
"device": "desktop",
"depth": 10
}
]'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",
}
payload = [
{
"language_code": "en",
"location_code": 2840,
"keyword": "flight ticket new york san francisco",
"device": "desktop",
"depth": 10,
}
]
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败:",
result.get("status_code"),
result.get("status_message"),
)TypeScript
typescript
import axios from "axios";
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",
device: "desktop",
depth: 10,
},
],
{
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
},
);
console.log(response.data);响应结构
接口返回 JSON 对象,顶层 tasks 数组。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。20000 表示成功。 |
status_message | string | 通用状态消息。 |
time | string | 请求执行耗时,例如 0.2347 sec.。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
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 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求路径信息。 |
data | object | 创建任务时提交的参数。 |
result | array | SERP 结果数组。 |
SERP 结果字段
结果数据
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求。返回时会解码 %##,并将 + 解码为空格。 |
type | string | 搜索引擎类型。 |
se_domain | string | 搜索引擎域名。 |
location_code | integer | 位置代码。 |
language_code | string | 语言代码。 |
check_url | string | 实使用的搜索结果 URL,可用于核验结果准确性。 |
datetime | string | 结果采集时间,UTC 格式,例如 2019-11-15 12:57:46 +00:00。 |
spell | object/null | 搜索引擎自动纠错信息;无纠错时为 null。 |
refinement_chips | object/null | 搜索筛选标签;无数据时为 null。 |
item_types | array | 当前 SERP 中出现的类型。 |
se_results_count | integer | 搜索引擎返回的结果总数。 |
pages_count | integer | 实抓取的结果页数。 |
items_count | integer | items 数组中的结果数量。 |
items | array | SERP素数组。 |
item_types 可能:
text
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素字段
多数 SERP素以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型。 |
rank_group | integer | 同类型的组排名。不同类型不会计此排名。 |
rank_absolute | integer | 素在整个 SERP 中的绝对排名。 |
page | integer | 素所在的结果页码。 |
position | string | 素在页面中的位置,可为 left 或 right。 |
xpath | string | 素在 SERP 页面中的 XPath。 |
rectangle | object/null | 素在屏幕中的像素坐标和尺寸。未启用 calculate_rectangles 时为 null。 |
rectangle 字段
| 字段 | 类型 | 说明 |
|---|---|---|
x | integer | 素左上角的横坐标。 |
y | integer | 素左上角的纵坐标。 |
width | integer | 素宽度,单位为像素。 |
height | integer | 素高度,单位为像素。 |
主要结果类型
organic:自然结果
| 字段 | 类型 | 说明 |
|---|---|---|
domain | string | 结果域名。 |
title | string | 结果标题。 |
url | string | 结果 URL。 |
cache_url | string/null | 缓存页面 URL。 |
related_search_url | string/null | 搜索 URL。 |
breadcrumb | string | 面屑路径。 |
website_name | string | 网站名称。 |
description | string | 结果描述。 |
pre_snippet | string/null | 描述前附加的信息。 |
extended_snippet | string/null | 描述后附加的信息。 |
is_image | boolean | 是否图片。 |
is_video | boolean | 是否视频。 |
is_featured_snippet | boolean | 是否为精选摘要。 |
is_malicious | boolean | 是否被标记为恶意结果。 |
is_web_story | boolean | 是否为网页。 |
amp_version | boolean | 是否存在 AMP 版本。 |
images | array/null | 结果图片。 |
rating | object/null | 评分信息。 |
price | object/null | 商品或服务价格信息。 |
highlighted | array | 描述中加粗显示的词语。 |
links | array/null | 站点链接。 |
faq | object/null | FAQ 扩展。 |
extended_people_also_search | array/null | 搜索扩展。 |
about_this_result | object/null | “此结果”信息;Bing 中始终为 null。 |
related_result | array/null | 同域名结果;Bing 中始终为 null。 |
timestamp | string/null | 结果发布时间,UTC 格式。 |
paid:付费广告
除通用排名字段外,还可能:
| 字段 | 类型 | 说明 |
|---|---|---|
domain | string | 广告域名。 |
title | string | 广告标题。 |
description | string | 广告描述。 |
url | string | 广告 URL。 |
breadcrumb | string | 广告面屑。 |
highlighted | array | 描述中的高亮词。 |
extra | object | 广告附加信息。 |
extra.ad_aclk | string/null | 广告标识。 |
description_rows | array/null | 扩展描述。 |
links | array/null | 广告站点链接。 |
price | object/null | 广告商品或服务价格。 |
answer_box:答案框
| 字段 | 类型 | 说明 |
|---|---|---|
text | array/null | 答案文本。 |
links | array/null | 答案框中的链接。 |
featured_snippet:精选摘要
| 字段 | 类型 | 说明 |
|---|---|---|
domain | string | 来源域名。 |
title | string | 搜索结果标题。 |
featured_title | string | 精选摘要来源页面标题。 |
description | string | 摘要。 |
timestamp | string/null | 来源发布时间。 |
url | string | 来源 URL。 |
images | array/null | 摘要中的图片。 |
table | object/null | 摘要中的表格。 |
table 对象:
table_header:表头数组table_content:表格数组
local_pack:本地结果
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 商家名称。 |
description | string | 商家描述。 |
domain | string | 商家域名。 |
phone | string/null | 电话号码。 |
url | string | 商家 URL。 |
is_paid | boolean | 是否为广告。 |
rating | object/null | 商家评分。 |
cid | string/null | Bing 分的商家唯一标识。 |
is_claimed | boolean | 商家信息是否已被所有或代表认领。 |
map:地图结果
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 地图结果标题。 |
url | string | 地图结果 URL。 |
hotels_pack:结果
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 店模块标题。 |
date_from | string | 住日期,格式为 YYYY-MM-DD。 |
date_to | string | 离店日期,格式为 YYYY-MM-DD。 |
items | array | 店结果数组。 |
子项可能:
title、desription、hotel_identifier、domain、url、is_paid、rating、price 和 rectangle。
hotel_identifier 为唯一标识;price含 current、regular、max_value、currency、is_price_range 和 displayed_price。
shopping:购物结果
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 购物模块或商品标题。 |
items | array | 商品结果数组。 |
source | string | 信息来源。 |
description | string | 商品描述。 |
marketplace | string | 商户所在的电商平台。 |
marketplace_url | string | 商品在平台中的页面 URL。 |
url | string | 结果 URL。 |
购物子项通常 title、price、source、description、marketplace、marketplace_url 和 url。
images:图片结果
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 图片模块标题。 |
url | string | 图片搜索页面 URL。 |
items | array | 图片项目数组。 |
related_image_searches | array/null | 图片搜索词和图片。 |
图片项目:
typealturlimage_url
video:视频结果
| 字段 | 类型 | 说明 |
|---|---|---|
items | array | 视频结果数组。 |
视频项目可能 source、title、timestamp 和 url。
carousel:轮播模块
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 轮播模块标题。 |
items | array | 轮播项目数组。 |
轮播项目:
typetitlesubtitlerectangle
events:事件结果
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 事件模块标题。 |
url | string | 模块 URL。 |
items | array | 事件项目数组。 |
事件项目 type、title、description 和 url。
jobs:职位结果
| 字段 | 类型 | 说明 |
|---|---|---|
title | string/null | 职位模块标题。 |
url | string/null | 模块 URL。 |
items | array | 职位项目数组。 |
职位项目可能:
title、description、location、author、job_posted_time、timestamp、contract_type、salary、url 和 rectangle。
recipes:食谱结果
| 字段 | 类型 | 说明 |
|---|---|---|
items | array | 食谱项目数组。 |
食谱项目可能:
title、url、domain、source、description、time、rating 和 rectangle。
related_searches:搜索
| 字段 | 类型 | 说明 |
|---|---|---|
items | array/null | 搜索项目。 |
rectangle | object/null | 素像素位置。 |
people_also_search:用户还搜索了
| 字段 | 类型 | 说明 |
|---|---|---|
title | string | 模块标题。 |
items | array/null | 搜索项目。 |
people_also_ask:用户还问了
| 字段 | 类型 | 说明 |
|---|---|---|
items | array/null | 问题项目数组。 |
每个问题项目可能:
typetitlexpathexpanded_element
展开后的项目可能 featured_title、url、domain、title、description、timestamp 和 table。
questions_and_answers:问答结果
| 字段 | 类型 | 说明 |
|---|---|---|
items | array/null | 问答项目数组。 |
问答项目:
url、question_text、answer_text、source、domain 和 rectangle。
top_stories:热门新闻
| 字段 | 类型 | 说明 |
|---|---|---|
items | array/null | 新闻项目数组。 |
新闻项目可能:
source、domain、title、date、amp_version、timestamp、url、image_url、badges 和 rectangle。
AI 摘要结果
ai_overview
当 SERP含 AI 摘要时,结果中会出现 ai_overview 对象。
| 字段 | 类型 | 说明 |
|---|---|---|
markdown | string/null | AI 摘要的 Markdown。 |
items | array | AI 摘要中的项目。 |
references | array | 生成摘要时参考的网页。 |
AI 摘要项目可能以下类型:
ai_overview_element:普通摘要,title、text、images和referencesai_overview_video_element:视频,position、title、snippet、url、domain、image_url、source、date和timestampai_overview_videos_element:视频集合,itemsai_overview_images_element:图片集合,url、title和itemsai_overview_organic_element:自然结果,title、url、domain、snippet、breadcrumb、website_name、links、highlighted和references
引用对象 ai_overview_reference含:
| 字段 | 类型 | 说明 |
|---|---|---|
source | string | 引用来源名称或标题。 |
domain | string | 引用来源域名。 |
url | string | 引用页面 URL。 |
title | string | 引用页面标题。 |
text | string | 用于生成 AI 摘要的页面文本片段。 |
价格对象
自然结果、广告、购物、等可能 price 对象:
| 字段 | 类型 | 说明 |
|---|---|---|
current | float | 当前价格。 |
regular | float | 未折扣的常规价格。 |
max_value | float | 价格范围中的最高价格。 |
currency | string | 价格货币的 ISO 代码。 |
is_price_range | boolean | 是否为价格区间。 |
displayed_price | string | SERP 中原始展示的价格文本。 |
评分对象
rating 对象可能出现在自然结果、本地结果、或食谱中:
| 字段 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,可为 Max5、Percents 或 CustomMax。 |
value | float | 评分值。 |
votes_count | integer | 评价数量。 |
rating_max | 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": [
{
"id": "00000000-0000-0000-0000-000000000000",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2347 sec.",
"cost": 0,
"result_count": 1,
"data": {
"language_code": "en",
"location_code": 2840,
"keyword": "flight ticket new york san francisco",
"device": "desktop"
},
"result": [
{
"keyword": "flight ticket new york san francisco",
"type": "bing",
"se_domain": "bing.com",
"location_code": 2840,
"language_code": "en",
"check_url": "https://www.bing.com/search?q=flight+ticket+new+york+san+francisco",
"datetime": "2024-01-15 12:57:46 +00:00",
"item_types": [
"organic",
"people_also_ask",
"related_searches"
],
"se_results_count": 99148,
"pages_count": 1,
"items_count": 3,
"items": [
{
"type": "organic",
"rank_group": 1,
"rank_absolute": 1,
"page": 1,
"position": "left",
"domain": "example.com",
"title": "Flight tickets and travel information",
"url": "https://example.com/flights",
"description": "Flight ticket information and booking options.",
"is_image": false,
"is_video": false,
"is_featured_snippet": false,
"is_malicious": false,
"is_web_story": false,
"amp_version": false,
"rectangle": null
},
{
"type": "people_also_ask",
"rank_group": 1,
"rank_absolute": 2,
"page": 1,
"position": "left",
"items": [],
"rectangle": null
},
{
"type": "related_searches",
"rank_group": 1,
"rank_absolute": 3,
"page": 1,
"position": "left",
"items": [],
"rectangle": null
}
]
}
]
}
]
}状态码与异常处理
- 顶层
status_code和任务级status_code均应单独检查。 20000表示请求成功。- 状态码表示参数错误、认证失败、任务处理失败或搜索结果抓取异常。
- 建议客户端同时记录
status_code、status_message、任务id和请求参数,以便重试、告警和问题追踪。 - 错误码请参考
/v3/appendix/errors。
实用场景
- 监测自然排名:按国家、城市、语言和设备实时采集前 100 至 200 条结果,评估网站排名变化与 SEO 优化效果。
- 识别 SERP 展示机会:统计精选摘要、问答、图片、视频、热门新闻和 AI 摘要等特殊结果,指导结构和富媒体优化。
- 分析竞争对手可见度:通过
target精确筛选竞争域名、子域名或 URL,比较在不同和地区的搜索表现。 - 评估本地搜索覆盖:使用位置代码或 GPS 坐标采集本地结果、地图和商家评分,支持门店 SEO 与区域市场分析。
- 还原搜索结果视觉位置:启用
calculate_rectangles获取 SERP素的像素坐标和尺寸,分析首屏占位、广告覆盖和移动端展示差异。