Skip to content

Bing 页面排名与流量(实时)

本接口使用 POST 方法,请求路径为:

/v3/dataforseo_labs/bing/relevant_pages/live

用于获取指定域名下网页在 Bing 搜索结果中的排名分布、预估流量及排名变化数据。接口会分别返回自然搜索、付费搜索、精选摘要和本地搜索结果中的页面表现。

数据每周更新一次,最新更新时间可通过以下接口查询:

/v3/dataforseo_labs/status

请求地址

text
POST https://api.seermartech.cn/v3/dataforseo_labs/bing/relevant_pages/live

计费与限制

  • 每次请求按任务计费。
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
  • 请求体使用 UTF-8 编码的 JSON 格式。
  • 单个请求的任务参数放在通用请求数组中。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
  • 同时处理的请求数最多为 30 个。
  • 支持设置返回数量、结果过滤条件和排序规则。

请求参数

请求体是 JSON 数组:

json
[
  {
    "target": "example.com",
    "location_name": "United States",
    "language_name": "English",
    "item_types": ["organic"],
    "limit": 100,
    "offset": 0,
    "historical_serp_mode": "live",
    "ignore_synonyms": false,
    "filters": [
      ["metrics.organic.pos_1", "<>", 0]
    ],
    "order_by": [
      "metrics.organic.etv,desc"
    ],
    "tag": "bing-relevant-pages-demo"
  }
]

参数说明

参数类型说明
targetstring目标域名。请勿 https://www.,例如 example.com
location_namestring地区名。使用此参数时无需传 location_code。不传时返回所有可用地区的数据。本接口当前支持美国地区,示例值为 United States
location_codeinteger地区代码。使用此参数时无需传 location_name。美国地区代码为 2840
language_namestring语言名。使用此参数时无需传 language_code。示例值为 English
language_codestring语言代码。使用此参数时无需传 language_name。示例值为 en
item_typesarray指定返回的搜索结果类型。可选值 organicpaidfeatured_snippetlocal_pack。如果数组 organic 以外的类型,结果将数组中的第一个类型排序;未在数组中的类型不能用于过滤或排序。
limitinteger最多返回的页面数量。默认值为 100,最大值为 1000
offsetinteger结果偏移量。默认值为 0。例如设置为 10 时,将跳过前 10 条结果。
historical_serp_modestring历史排名数据模式。live:返回目标域名当前仍有排名的搜索结果;lost:返回目标域名曾经有排名、但最近一次检查已失去排名的搜索结果;all:返回以上两类结果。默认值为 live
ignore_synonymsboolean是否忽略高度相似的。设置为 true 时返回核心,排除高度相似的。默认值为 false
filtersarray结果过滤条件。最多支持 8 个过滤条件,多个条件之间需要使用 andor 连接。支持的运算符 regexnot_regex<<=>>==<>innot_inmatchnot_match
order_byarray结果排序规则。可使用与 filters 相同的字段,排序方向为 ascdesc,格式如 metrics.organic.etv,desc。单次请求最多设置 3 条排序规则。
tagstring用户自定义任务标识,最长 255 个字符。该值会原样返回在响应的 data 对象中。

地区和语言列表可通过以下接口获取:

text
GET https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages

过滤器示例

过滤页面自然排名第一或排名第二至第三的结果:

json
[
  {
    "target": "example.com",
    "location_name": "United States",
    "language_name": "English",
    "filters": [
      ["metrics.organic.pos_1", "<>", 0],
      "or",
      ["metrics.organic.pos_2_3", "<>", 0]
    ],
    "limit": 5
  }
]

响应结构

接口返回 JSON 数据 tasks 任务数组。

json
{
  "version": "0.1.20220216",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1601 sec.",
  "cost": 0.0105,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": " ವಿಶ-uuid",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.1500 sec.",
      "cost": 0.0105,
      "result_count": 1,
      "data": {
        "api": "dataforseo_labs",
        "function": "relevant_pages",
        "se_type": "bing",
        "target": "example.com",
        "language_name": "English",
        "location_code": 2840,
        "limit": 5
      },
      "result": [
        {
          "se_type": "bing",
          "target": "example.com",
          "location_code": 2840,
          "language_code": "en",
          "total_count": 1,
          "items_count": 1,
          "items": []
        }
      ]
    }
  ]
}

顶层响应字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger通用响应状态码。
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请求 URL 路径。
dataobject请求中提交的任务参数。
resultarray结果数组。

结果字段

字段类型说明
se_typestring搜索引擎类型,固定为 bing
targetstring请求中的目标域名。
location_codeinteger请求中的地区代码。无数据时为 null
language_codestring请求中的语言代码。无数据时为 null
total_countinteger数据库中与请求条件匹的结果总数。
items_countintegeritems 数组中返回的结果数量。
itemsarray页面及排名、流量数据。

items 页面字段

字段类型说明
se_typestring搜索引擎类型。
page_addressstring页面的绝对 URL。
metricsobject页面排名和流量指标,不同搜索结果类型的数据。

metrics 对象可能以下字段:

  • organic:自然搜索排名与流量数据。
  • paid:付费搜索排名与流量数据。
  • featured_snippet:Bing 精选摘要中的排名与流量数据。
  • local_pack:Bing 本地结果中的排名与流量数据。

各类型指标字段

organicpaidfeatured_snippetlocal_pack 对象均使用相同的排名分布字段:

字段类型说明
pos_1integer页面排名第 1 的搜索结果数量。
pos_2_3integer页面排名第 2 至第 3 的搜索结果数量。
pos_4_10integer页面排名第 4 至第 10 的搜索结果数量。
pos_11_20integer页面排名第 11 至第 20 的搜索结果数量。
pos_21_30integer页面排名第 21 至第 30 的搜索结果数量。
pos_31_40integer页面排名第 31 至第 40 的搜索结果数量。
pos_41_50integer页面排名第 41 至第 50 的搜索结果数量。
pos_51_60integer页面排名第 51 至第 60 的搜索结果数量。
pos_61_70integer页面排名第 61 至第 70 的搜索结果数量。
pos_71_80integer页面排名第 71 至第 80 的搜索结果数量。
pos_81_90integer页面排名第 81 至第 90 的搜索结果数量。
pos_91_100integer页面排名第 91 至第 100 的搜索结果数量。
etvfloat预估流量。根据页面排名的搜索量与点击率(CTR)计算,表示页面的预估月度流量。
countinteger含该页面的对应类型搜索结果总数。
estimated_paid_traffic_costfloat预估流量成本。表示通过 Bing 付费广告获取相同月度流量所需的预估成本。
is_newinteger新增排名数量。
is_upinteger排名上升的排名数量。
is_downinteger排名下降的排名数量。
is_lostinteger已丢失的排名数量,即上次检查时存在、最近一次检查时不再出现的排名。

  • organic.etv 表示自然搜索月度预估流量。
  • paid.etv 表示付费搜索月度预估流量。
  • featured_snippet.etv 表示精选摘要结果带来的月度预估流量。
  • local_pack.etv 表示本地结果带来的月度预估流量。
  • estimated_paid_traffic_cost 用于估算购买对应流量的广告成本,不等同于本接口的扣费。

curl 示例

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/dataforseo_labs/bing/relevant_pages/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "target": "example.com",
      "location_name": "United States",
      "language_name": "English",
      "filters": [
        ["metrics.organic.pos_1", "<>", 0],
        "or",
        ["metrics.organic.pos_2_3", "<>", 0]
      ],
      "limit": 5
    }
  ]'

Python 示例

python
import requests

url = "https://api.seermartech.cn/v3/dataforseo_labs/bing/relevant_pages/live"

payload = [
    {
        "target": "example.com",
        "location_name": "United States",
        "language_name": "English",
        "filters": [
            ["metrics.organic.pos_1", "<>", 0],
            "or",
            ["metrics.organic.pos_2_3", "<>", 0],
        ],
        "limit": 5,
    }
]

headers = {
    "Authorization": "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
}

response = requests.post(url, json=payload, headers=headers)
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";

const response = await axios.post(
  "https://api.seermartech.cn/v3/dataforseo_labs/bing/relevant_pages/live",
  [
    {
      target: "example.com",
      location_name: "United States",
      language_name: "English",
      filters: [
        ["metrics.organic.pos_1", "<>", 0],
        "or",
        ["metrics.organic.pos_2_3", "<>", 0],
      ],
      limit: 5,
    },
  ],
  {
    headers: {
      Authorization: "Bearer smt_live_YOUR_KEY",
      "Content-Type": "application/json",
    },
  }
);

if (response.data.status_code === 20000) {
  console.log(response.data);
} else {
  console.error(
    `请求失败,状态码:${response.data.status_code},信息:${response.data.status_message}`
  );
}

PHP 示例

php
<?php

$url = 'https://api.seermartech.cn/v3/dataforseo_labs/bing/relevant_pages/live';

$payload = json_encode([
    [
        'target' => 'example.com',
        'location_name' => 'United States',
        'language_name' => 'English',
        'filters' => [
            ['metrics.organic.pos_1', '<>', 0],
            'or',
            ['metrics.organic.pos_2_3', '<>', 0],
        ],
        'limit' => 5,
    ],
], JSON_UNESCAPED_UNICODE);

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer smt_live_YOUR_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $payload,
]);

$result = curl_exec($ch);
curl_close($ch);

print_r(json_decode($result, true));

实用场景

  • 识别高价值页面:按 metrics.organic.etv 排序,定位自然搜索流量贡献最高的页面,优制定维护和转化优化计划。
  • 发现排名下滑页面:使用 is_downis_lost 筛选排名下降或丢失的页面,及时排查质量、技术 SEO 和外链变化。
  • 挖掘页面增长机会:分析 pos_4_10pos_11_20 等排名区间,筛选接近首页或前 3 名的页面,集中链、更新和优化。
  • 评估自然搜索与广告价值:对比 organic.etvpaid.etvestimated_paid_traffic_cost,判断哪些自然流量页面较高的商业投放价值。
  • 监控 SERP 特殊结果表现:分析 featured_snippetlocal_pack 数据,识别适合争取精选摘要或本地搜索的页面。

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