Skip to content

Bing 批量流量估算(实时)

GET /v3/dataforseo_labs/locations_and_languages

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

/v3/dataforseo_labs/bing/bulk_traffic_estimation/live

接口最多可同时估算 1,000 个域名、子域名或网页的月度流量,并分别返回自然搜索、付费搜索、精选摘要和本地搜索的预估流量。

流量预估值通过以下方式计算:

> 预估流量 = 点击率(CTR)× 搜索量

系统会对目标在对应搜索结果类型中排名的所有进行汇总计算。

计费与请求限制

  • 每次请求单独计费。
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
  • 请求体使用 UTF-8 编码的 JSON 格式。
  • 单个请求体为 JSON 数组,数组中的每个代表一个任务。
  • 每分钟最多可发起 2,000 次 API 调用。
  • 同时进行的请求数量最多为 30 个。

请求参数

请求体格式:

json
[
  {
    "targets": [
      "example.com",
      "news.example.com",
      "https://www.example.org/page"
    ],
    "location_code": 2840,
    "language_code": "en",
    "item_types": [
      "organic",
      "paid"
    ],
    "ignore_synonyms": false,
    "tag": "traffic_batch_001"
  }
]

任务参数

参数类型说明
targetsarray分析的域名、子域名或网页地址,最多 1,000 个。域名和子域名不能 https://www.;网页使用 https://www. 的完整 URL。
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 以外的类型时,结果将优数组中的第一个类型排序。
ignore_synonymsboolean是否忽略高度相似的。设为 true 时统计核心;默认值为 false
tagstring自定义任务标识,最长 255 个字符。可用于请求与响应,提交的值会原样返回在响应的 data 对象中。

地区与语言查询

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

/v3/dataforseo_labs/locations_and_languages

当前本接口支持美国地区:

  • 地区名称:United States
  • 地区代码:2840
  • 语言名称:English
  • 语言代码:en

响应结构

接口返回 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请求 URL 路径。
dataobject请求中提交的任务参数。
resultarray当前任务的结果数组。

结果字段

字段类型说明
se_typestring搜索引擎类型,本接口返回 bing
location_codeinteger | null请求中的地区代码。无可用数据时为 null
language_codestring | null请求中的语言代码。无可用数据时为 null
total_countinteger数据库中与请求条件的结果总数。
items_countintegeritems 数组中返回的结果数量。
itemsarray含流量预估数据的目标列表。

items 字段

字段类型说明
se_typestring搜索引擎类型。
targetstring请求中的目标域名、子域名或网页地址。
metricsobject当前目标的流量指标。
metrics.organicobject自然搜索流量数据。
metrics.paidobject付费搜索流量数据。
metrics.featured_snippetobjectBing 搜索结果精选摘要中的流量数据。
metrics.local_packobject搜索结果本地搜索中的流量数据。

每类流量指标对象以下字段:

字段类型说明
etvfloat预估月度流量。该值根据目标排名的点击率与搜索量计算。
countinteger当前结果类型中该目标的搜索结果数量。

  • organic.count:该目标的自然搜索结果数量。
  • paid.count:该目标的付费搜索结果数量。
  • featured_snippet.count:该目标的精选摘要数量。
  • local_pack.count:该目标的本地搜索结果数量。

请求示例

cURL

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/dataforseo_labs/bing/bulk_traffic_estimation/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "targets": [
        "example.com",
        "cnn.com",
        "forbes.com"
      ],
      "location_code": 2840,
      "language_code": "en",
      "item_types": [
        "organic",
        "paid"
      ]
    }
  ]'

Python

python
import requests

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

payload = [
    {
        "targets": [
            "example.com",
            "cnn.com",
            "forbes.com"
        ],
        "location_name": "United States",
        "language_name": "English",
        "item_types": [
            "organic",
            "paid"
        ]
    }
]

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 payload = [
  {
    targets: [
      "example.com",
      "cnn.com",
      "forbes.com",
    ],
    location_name: "United States",
    language_name: "English",
    item_types: [
      "organic",
      "paid",
    ],
  },
];

axios({
  method: "post",
  url: "https://api.seermartech.cn/v3/dataforseo_labs/bing/bulk_traffic_estimation/live",
  headers: {
    Authorization: "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  data: payload,
})
  .then((response) => {
    // 处理响应数据
    console.log(response.data);
  })
  .catch((error) => {
    // 处理请求异常
    console.error(error.response?.data || error.message);
  });

响应示例

json
{
  "version": "0.1.20220216",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1286 sec.",
  "cost": 0.0103,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "01234567-89ab-cdef-0123-456789abcdef",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.1200 sec.",
      "cost": 0.0103,
      "result_count": 1,
      "path": [
        "v3",
        "dataforseo_labs",
        "bing",
        "bulk_traffic_estimation",
        "live"
      ],
      "data": {
        "api": "dataforseo_labs",
        "function": "bulk_traffic_estimation",
        "se_type": "bing",
        "targets": [
          "example.com",
          "cnn.com",
          "forbes.com"
        ],
        "location_code": 2840,
        "language_code": "en",
        "item_types": [
          "organic",
          "paid"
        ]
      },
      "result": [
        {
          "se_type": "bing",
          "location_code": 2840,
          "language_code": "en",
          "total_count": 3,
          "items_count": 3,
          "items": [
            {
              "se_type": "bing",
              "target": "example.com",
              "metrics": {
                "organic": {
                  "etv": 12500.5,
                  "count": 860
                },
                "paid": {
                  "etv": 320.2,
                  "count": 18
                }
              }
            }
          ]
        }
      ]
    }
  ]
}

错误处理

请根据以下字段判断请求和任务是否成功:

  • 顶层 status_code:判断整个请求是否成功。
  • tasks_error:判断是否存在任务级错误。
  • tasks[].status_code:判断单个任务是否成功。
  • tasks[].status_message:获取任务级错误说明。

建议在客户端实现异常处理机制,并对网络错误、鉴权失败、参数校验失败、频率限制和数据为空等进行区分处理。

实用场景

  • 批量评估竞争对手域名的 Bing 月度自然流量,快速建立竞品流量规模基线并支持市场份额分析。
  • 对比自然搜索与付费搜索流量,识别竞争对手更依赖 SEO 还是搜索广告投放。
  • 筛选精选摘要和本地搜索中的高网站,挖掘结构优化与本地 SEO 机会。
  • 批量分析域名、子域名和网页的流量表现,定位不同业务线或目录的搜索价值。
  • 定期记录目标网站的流量预估变化,用于 SEO 项目效果评估、竞品监控和异常波动预警。

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