Skip to content

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 为准。

请求参数

###填及主要参数

参数类型说明
keywordstring填。 搜索,最长 700 个字符。所有 %## 编码会被解码,字符 + 会被解码为空格。如果中需要使用 %,请写为 %25;需要使用 +,请写为 %2B
location_codeinteger搜索地理位置代码。当未指定 location_namelocation_coordinate 时填。使用此参数后,无需再传递另外两个位置参数。可通过 /v3/serp/bing/locations 获取可用位置列表。例如:2840
language_codestring搜索语言代码。当未指定 language_name 时填。使用此参数后,无需再传递 language_name。可通过 /v3/serp/bing/languages 获取可用语言列表。例如:en
depthintegerSERP 解析深度,即返回的结果数量。默认值为 10,最大值为 200。每个最多 10 条结果的 SERP 单独计费。
devicestring设备类型,可选值为 desktopmobile,默认值为 desktop

附加参数

参数类型说明
location_namestring搜索地理位置的完整名称。当未指定 location_codelocation_coordinate 时填。示例:London,England,United Kingdom
language_namestring搜索语言的完整名称。当未指定 language_code 时填。示例:English
osstring设备操作系统。devicedesktop 时可选 windowsmacos,默认值为 windowsdevicemobile 时可选 androidios,默认值为 android
tagstring用户自定义任务标识,最长 255 个字符。可用于请求与响应,提交的值会原样返回在响应的 data 对象中。
targetstring目标域名、子域名或网页地址。域名或子域名不得 https://www.。目标任务只返回 url 字段的 SERP素。支持使用 * 通符筛选结果。
stop_crawl_on_matcharray停止抓取条件数组,最多 10 个目标对象。每个对象 match_typematch_value。当匹到指定条件时,响应将截至该结果(含该结果)的 SERP 数据。系统会对满足条件前抓取的每个 SERP 分别计费。
max_crawl_pagesinteger最大抓取搜索结果页数,默认值为 1,最大值为 100。该参数与 depth合使用。
search_paramstring搜索查询的附加参数。
urlstring搜索查询的完整 URL。接口会从 URL 中解析所需参数。该方式处理复杂,且在 URL 中提供准确的语言和位置,通常不建议使用。
location_coordinatestring地理位置 GPS 坐标,格式为 纬度,经度,经纬度最多支持 7 位小数。例如:53.476225,-2.243572。使用此参数后,无需再传递 location_codelocation_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 任务数组。

顶层响应字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger通用状态码。成功通常为 20000
status_messagestring通用状态信息。
timestring请求执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务总数。
tasks_errorintegertasks 数组中返回错误的任务数量。
tasksarray任务结果数组。

任务字段

字段类型说明
idstring任务唯一标识,UUID 格式。
status_codeinteger任务状态码,通常在 1000060000 范围。
status_messagestring任务状态说明。
timestring任务执行耗时。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量。
patharray请求路径。
dataobject与 POST 请求中提交的参数基本一致。
resultarraySERP 结果数组。

result 字段

字段类型说明
keywordstring请求中的。返回时会对 %## 进行解码,字符 + 会被解码为空格。
typestring搜索引擎类型。
se_domainstring搜索引擎域名。
location_codeinteger地理位置代码。
language_codestring语言代码。
check_urlstring搜索引擎结果页的直接 URL,可用于核验返回结果。
datetimestring获取结果的 UTC 时间,格式为 yyyy-mm-dd hh-mm-ss +00:00
spellobject搜索引擎自动纠错信息。如果搜索引擎对进行了纠正,将返回纠正后的及纠错类型。
refinement_chipsobject搜索结果筛选项。当前值为 null
item_typesarraySERP 中出现的结果类型,例如 organicpaid
se_results_countintegerSERP 中的结果总数。
pages_countinteger实获取的搜索结果页数。
items_countintegeritems 数组中的结果数量。
itemsarraySERP素数组。

自动纠错字段

字段类型说明
spell.keywordstring搜索引擎自动纠正后的,结果将基于该返回。
spell.typestring自动纠错类型。可能值为 including_results_for

自然结果 organic

字段类型说明
typestring素类型,固定为 organic
rank_groupinteger同类型中的组排名。不同类型之间不计该排名。
rank_absoluteintegerSERP 中所有的绝对排名。
pageinteger当前结果所在的搜索结果页码。
domainstring结果所属域名。
titlestring搜索结果标题。
descriptionstring搜索结果描述。
urlstring搜索结果 URL。
breadcrumbstring搜索结果面屑路径。

付费结果 paid

字段类型说明
typestring素类型,固定为 paid
rank_groupinteger同类型广告中的组排名。
rank_absoluteintegerSERP 中所有的绝对排名。
pageinteger当前广告所在的搜索结果页码。
domainstring广告所属域名。
titlestring广告标题。
descriptionstring广告描述。
urlstring广告目标 URL。
breadcrumbstring广告面屑路径。
字段类型说明
typestring素类型,固定为 related_searches
rank_groupinteger同类型中的组排名。
rank_absoluteintegerSERP 中所有的绝对排名。
pageinteger当前所在的搜索结果页码。
itemsarray搜索词数组,通常 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 项目的表现。
  • 对比桌面端与移动端结果:分别提交 desktopmobile 任务,识别不同设备下的排名差异与 SERP 展现变化。
  • 分析竞争对手可见度:使用 target 精确筛选竞争域名及页面,统计在目标中的自然结果覆盖。
  • 采集 SERP 结果类型:结合 organicpaidrelated_searches素,分析自然结果、广告结果及搜索词的页面构成。
  • 执行区域化搜索分析:通过 location_codelocation_namelocation_coordinate 获取指定城市或坐标附近的搜索结果,支持本地 SEO 和门店业务评估。

统一入口:官网 · LLM API · 控制台