主题
Bing 实时自然搜索结果(Regular)
本接口用于实时获取指定、搜索引擎及地理位置下的 Bing 搜索结果页面(SERP)数据。
请求方式: POST
接口路径: /v3/serp/bing/organic/live/regular
所有请求体使用 UTF-8 编码的 JSON 格式,并以数组形式提交。每次平台限流以认证说明中的 30/60/120 次/分钟规则为准。
计费说明
参考价约 ¥0.0216 / 次。每次请求按抓取的 SERP 数量计费;当 depth 大于 10 且搜索引擎返回 10 条结果时,可能产生额外费用。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
###填及主要参数
| 参数 | 类型 | 说明 |
|---|---|---|
keyword | string | 填。 搜索,最长 700 个字符。所有 %## 编码会被解码,字符 + 会被解码为空格。如果中需要使用 %,请写为 %25;需要使用 +,请写为 %2B。 |
location_code | integer | 搜索地理位置代码。当未指定 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 单独计费。 |
device | string | 设备类型,可选值为 desktop、mobile,默认值为 desktop。 |
附加参数
| 参数 | 类型 | 说明 |
|---|---|---|
location_name | string | 搜索地理位置的完整名称。当未指定 location_code 或 location_coordinate 时填。示例:London,England,United Kingdom。 |
language_name | string | 搜索语言的完整名称。当未指定 language_code 时填。示例:English。 |
os | string | 设备操作系统。device 为 desktop 时可选 windows、macos,默认值为 windows;device 为 mobile 时可选 android、ios,默认值为 android。 |
tag | string | 用户自定义任务标识,最长 255 个字符。可用于请求与响应,提交的值会原样返回在响应的 data 对象中。 |
target | string | 目标域名、子域名或网页地址。域名或子域名不得 https:// 和 www.。目标任务只返回 url 字段的 SERP素。支持使用 * 通符筛选结果。 |
stop_crawl_on_match | array | 停止抓取条件数组,最多 10 个目标对象。每个对象 match_type 和 match_value。当匹到指定条件时,响应将截至该结果(含该结果)的 SERP 数据。系统会对满足条件前抓取的每个 SERP 分别计费。 |
max_crawl_pages | integer | 最大抓取搜索结果页数,默认值为 1,最大值为 100。该参数与 depth合使用。 |
search_param | string | 搜索查询的附加参数。 |
url | string | 搜索查询的完整 URL。接口会从 URL 中解析所需参数。该方式处理复杂,且在 URL 中提供准确的语言和位置,通常不建议使用。 |
location_coordinate | string | 地理位置 GPS 坐标,格式为 纬度,经度,经纬度最多支持 7 位小数。例如:53.476225,-2.243572。使用此参数后,无需再传递 location_code 或 location_name。 |
target 示例
example.com:返回该网站首页结果。example.com*:返回该域名下所有以指定模式匹的页面。*example.com*:返回该域名及所有子域名下的页面。*example.com:返回不限定子域名的首页结果,例如https://en.example.com。example.com/example-page:返回匹该 URL 的结果。example.com/example-page*:返回以指定路径开头的所有 URL。
stop_crawl_on_match 示例
json
{
"stop_crawl_on_match": [
{
"match_type": "domain",
"match_value": "example.com"
}
]
}match_type
| 值 | 说明 |
|---|---|
domain | 匹指定域名或子域名 |
with_subdomains | 匹主域名及所有子域名 |
wildcard | 按通符模式匹 |
match_value
目标域名、子域名或通符值。域名或子域名不得请求协议。例如:
json
"match_value": "example.com"json
"match_value": "/blog/post-*"请求示例
cURL
bash
curl --location --request POST \
"https://api.seermartech.cn/v3/serp/bing/organic/live/regular" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"device": "desktop",
"os": "windows"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/serp/bing/organic/live/regular"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
}
# 每次请求只能提交一个任务
payload = [
{
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"device": "desktop",
"os": "windows",
}
]
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败,状态码:%s,消息:%s"
% (result.get("status_code"), result.get("status_message"))
)TypeScript
typescript
import axios from "axios";
axios
.post(
"https://api.seermartech.cn/v3/serp/bing/organic/live/regular",
[
{
language_code: "en",
location_code: 2840,
keyword: "albert einstein",
device: "desktop",
os: "windows",
},
],
{
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 任务数组。
顶层响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。成功通常为 20000。 |
status_message | string | 通用状态信息。 |
time | string | 请求执行耗时,单位为秒。 |
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 | 请求路径。 |
data | object | 与 POST 请求中提交的参数基本一致。 |
result | array | SERP 结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求中的。返回时会对 %## 进行解码,字符 + 会被解码为空格。 |
type | string | 搜索引擎类型。 |
se_domain | string | 搜索引擎域名。 |
location_code | integer | 地理位置代码。 |
language_code | string | 语言代码。 |
check_url | string | 搜索引擎结果页的直接 URL,可用于核验返回结果。 |
datetime | string | 获取结果的 UTC 时间,格式为 yyyy-mm-dd hh-mm-ss +00:00。 |
spell | object | 搜索引擎自动纠错信息。如果搜索引擎对进行了纠正,将返回纠正后的及纠错类型。 |
refinement_chips | object | 搜索结果筛选项。当前值为 null。 |
item_types | array | SERP 中出现的结果类型,例如 organic、paid。 |
se_results_count | integer | SERP 中的结果总数。 |
pages_count | integer | 实获取的搜索结果页数。 |
items_count | integer | items 数组中的结果数量。 |
items | array | SERP素数组。 |
自动纠错字段
| 字段 | 类型 | 说明 |
|---|---|---|
spell.keyword | string | 搜索引擎自动纠正后的,结果将基于该返回。 |
spell.type | string | 自动纠错类型。可能值为 including_results_for。 |
自然结果 organic
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 organic。 |
rank_group | integer | 同类型中的组排名。不同类型之间不计该排名。 |
rank_absolute | integer | SERP 中所有的绝对排名。 |
page | integer | 当前结果所在的搜索结果页码。 |
domain | string | 结果所属域名。 |
title | string | 搜索结果标题。 |
description | string | 搜索结果描述。 |
url | string | 搜索结果 URL。 |
breadcrumb | string | 搜索结果面屑路径。 |
付费结果 paid
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 paid。 |
rank_group | integer | 同类型广告中的组排名。 |
rank_absolute | integer | SERP 中所有的绝对排名。 |
page | integer | 当前广告所在的搜索结果页码。 |
domain | string | 广告所属域名。 |
title | string | 广告标题。 |
description | string | 广告描述。 |
url | string | 广告目标 URL。 |
breadcrumb | string | 广告面屑路径。 |
搜索 related_searches
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 素类型,固定为 related_searches。 |
rank_group | integer | 同类型中的组排名。 |
rank_absolute | integer | SERP 中所有的绝对排名。 |
page | integer | 当前所在的搜索结果页码。 |
items | array | 搜索词数组,通常 8 个与的查询。 |
响应示例
json
{
"version": "0.1.20220104",
"status_code": 20000,
"status_message": "Ok.",
"time": "9.1028 sec.",
"cost": 0.0216,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"status_code": 20000,
"status_message": "Ok.",
"time": "8.9432 sec.",
"cost": 0.0216,
"result_count": 1,
"path": [
"v3",
"serp",
"bing",
"organic",
"live",
"regular"
],
"data": {
"api": "serp",
"function": "live",
"se": "bing",
"se_type": "organic",
"language_code": "en",
"location_code": 2840,
"keyword": "albert einstein",
"device": "desktop",
"os": "windows"
},
"result": [
{
"se_results_count": 5099,
"pages_count": 1,
"items_count": 103,
"items": [
{
"type": "organic",
"rank_group": 1,
"rank_absolute": 1,
"page": 1,
"domain": "example.com",
"title": "示例标题",
"description": "示例搜索结果描述。",
"url": "https://example.com/page",
"breadcrumb": "example.com > page"
}
]
}
]
}
]
}状态码和错误信息可参考错误码文档。建议客户端对 HTTP 错误、通用状态码、任务级状态码及空结果进行分别处理。
实用场景
- 监控自然排名:按国家、城市、语言和设备实时抓取 Bing 排名,评估 SEO 项目的表现。
- 对比桌面端与移动端结果:分别提交
desktop和mobile任务,识别不同设备下的排名差异与 SERP 展现变化。 - 分析竞争对手可见度:使用
target精确筛选竞争域名及页面,统计在目标中的自然结果覆盖。 - 采集 SERP 结果类型:结合
organic、paid和related_searches素,分析自然结果、广告结果及搜索词的页面构成。 - 执行区域化搜索分析:通过
location_code、location_name或location_coordinate获取指定城市或坐标附近的搜索结果,支持本地 SEO 和门店业务评估。