Skip to content

keywords_data/bing/keywords_for_site/live

POST /v3/keywords_data/bing/keywords_for_site/live

接口说明

POST /v3/keywords_data/bing/keywords_for_site/live

本接口用于获取指定域名或 URL 的列表,以及的搜索量、历史搜索趋势、平均每次点击费用(CPC)和付费搜索竞争度。

单次请求最多返回 3000 个。Live 模式会在同一次请求中直接返回结果,无需分别提交任务和轮询结果,适合需要即时获取数据的场景。

如不要求实时返回结果,可使用 Standard 模式。Standard 模式需要分别调用任务提交和结果获取接口,但参考价格更低。

历史数据最长支持 24 个月

text
POST https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live

请求限制

  • 所有请求体使用 UTF-8 编码的 JSON 格式。
  • 请求体为 JSON 数组。
  • 每次 Live 请求只能 1 个任务。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
  • 单次请求最多返回 3000 个。
  • 无论返回 1 个还是 3000 个,均按 1 次请求计费。

计费说明

参考价约 ¥0.5400 / 次

扣费以响应头 X-SeerMarTech-Charge-CNY 为准。


请求参数

请求体中的每个对象表示一个任务。以下参数应放置在 JSON 数组中。

参数类型说明
targetstring。目标网站的域名或 URL。
location_namestring搜索引擎地域的完整名称。当未指定 location_codelocation_coordinate 时填。使用此参数后,无需再指定另外两个地域参数。可通过 /v3/keywords_data/bing/locations 获取可用地域名称,例如 London,England,United Kingdom
location_codeinteger搜索引擎地域编码。当未指定 location_namelocation_coordinate 时填。使用此参数后,无需再指定另外两个地域参数。可通过 /v3/keywords_data/bing/locations 获取地域编码,例如 2840
location_coordinatestringGPS 坐标。当未指定 location_namelocation_code 时填。格式为 "纬度,经度",例如 52.6178549,-155.352142。数据将该坐标所属国家提供。
language_namestring搜索引擎语言的完整名称。当未指定 language_code 时填。支持:EnglishFrenchGerman
language_codestring搜索引擎语言编码。当未指定 language_name 时填。支持:enfrde
keywords_negativearray可选。需要从结果中排除的列表。最多支持 200 个词组,提交的会转换为小写。
devicestring可选。指定设备类型。可选值:allmobiledesktoptablet。默认值为 all
date_fromstring可选。数据时间范围的起始日期,格式为 yyyy-mm-dd,例如 "2020-01-01"。默认返回最近 12 个月的数据。最早可设置为当前日期往前 24 个月。若状态接口返回 actual_data=false,可设置为上上个月及更早日期;若返回 actual_data=true,可设置为上个月及更早日期。不建议针对过去一年的日期使用自定义时间范围。
date_tostring可选。数据时间范围的结束日期,格式为 yyyy-mm-dd,例如 "2020-03-15"。默认返回最近 12 个月的数据。最早可设置为当前日期往前两年,最晚可设置为当前日期往前一个月。不建议针对过去一年的日期使用自定义时间范围。
sort_bystring可选。结果排序字段,支持 search_volumecpccompetitionrelevance,结果按降序排列。默认值为 relevance
search_partnersboolean可选。是否合作伙伴网络数据。设置为 true 时,结果覆盖 Bing、Yahoo、AOL 及托管这些搜索服务的合作伙伴网站;默认值为 false,返回 Bing、AOL 和 Yahoo 搜索网络数据。
tagstring可选。用户自定义任务标识,最长 255 个字符。可用于识别任务并匹响应结果,提交的值会原样返回在响应的 data 对象中。

请求示例

json
[
  {
    "target": "https://example.com",
    "location_name": "United States",
    "language_name": "English",
    "device": "all",
    "sort_by": "relevance"
  }
]

响应说明

接口返回 JSON 数据 tasks 数组。

顶层字段

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

tasks 任务字段

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

result 结果字段

字段类型说明
keywordstring
location_codeinteger地域编码。
language_codestring语言编码。
search_partnersboolean是否合作伙伴网络数据。
devicestring / null设备类型。没有可用数据时为 null
competitionfloat / null付费搜索竞争度,基于搜索广告数据。可能的值:0.1(低)、0.5(中)、0.9(高)。没有数据时为 null
cpcfloat / null历史平均每次点击费用。原始数据以数值表示;没有数据时为 null
search_volumeinteger / null月均搜索量,表示根据目标地域和定位条件估算的搜索次数,结果会取整到最接近的数值。没有数据时为 null
categoriesarray / null产品和服务分类。该字段为历史容字段,当前始终为 null
monthly_searchesarray / null月度搜索量数组,表示指定地域过去最多 12 个月的搜索量。没有数据时为 null

monthly_searches 字段

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger当月平均搜索量,结果会取整到最接近的数值。

错误处理

建议根据顶层 status_code、任务级 status_codestatus_message 实现异常处理。错误码和状态消息可参考本平台的错误码文档。

重点检查以下:

-填参数缺失。

  • location_namelocation_codelocation_coordinate 未按要求提供。
  • language_namelanguage_code 同时缺失。
  • 日期范围出可用历史数据范围。
  • keywords_negative过 200 个词组。
  • 请求体未使用 JSON 数组格式。
  • 单次请求多个任务。

curl 示例

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "location_name": "United States",
      "language_name": "English",
      "target": "https://example.com"
    }
  ]'

Python 示例

python
import requests

url = "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live"

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

payload = [
    {
        "location_name": "United States",
        "language_name": "English",
        "target": "https://example.com",
    }
]

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";

const payload = [
  {
    location_name: "United States",
    language_name: "English",
    target: "https://example.com",
  },
];

axios
  .post(
    "https://api.seermartech.cn/v3/keywords_data/bing/keywords_for_site/live",
    payload,
    {
      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
{
  "version": "0.1.20200923",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "11.5961 sec.",
  "cost": 0.075,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "12345678-1234-1234-1234-123456789012",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "11.5961 sec.",
      "cost": 0.075,
      "result_count": 3,
      "path": [
        "v3",
        "keywords_data",
        "bing",
        "keywords_for_site",
        "live"
      ],
      "data": {
        "api": "keywords_data",
        "function": "keywords_for_site",
        "se": "bing",
        "language_code": "en",
        "location_code": 2840,
        "target": "https://example.com"
      },
      "result": [
        {
          "keyword": "tracking",
          "location_code": 2840,
          "language_code": "en",
          "search_partners": false,
          "device": "all",
          "competition": 0.9,
          "cpc": 0.12,
          "search_volume": 7800,
          "categories": null,
          "monthly_searches": [
            {
              "year": 2024,
              "month": 1,
              "search_volume": 7600
            }
          ]
        },
        {
          "keyword": "marketing",
          "location_code": 2840,
          "language_code": "en",
          "search_partners": false,
          "device": "all",
          "competition": 0.9,
          "cpc": 1.9,
          "search_volume": 6190,
          "categories": null,
          "monthly_searches": [
            {
              "year": 2024,
              "month": 1,
              "search_volume": 6100
            }
          ]
        },
        {
          "keyword": "seo",
          "location_code": 2840,
          "language_code": "en",
          "search_partners": false,
          "device": "all",
          "competition": 0.9,
          "cpc": 0.22,
          "search_volume": 5210,
          "categories": null,
          "monthly_searches": [
            {
              "year": 2024,
              "month": 1,
              "search_volume": 5200
            }
          ]
        }
      ]
    }
  ]
}

实用场景

  • 挖掘竞品网站:竞品域名,批量获取及搜索量,扩展 SEO和落地页规划。
  • 筛选高价值:结合搜索量、CPC 和付费竞争度,识别流量潜力与商业价值的。
  • 分析季节趋势:读取 monthly_searches 历史数据,判断的季节性波动,发布和营销排期。
  • 对比不同地域需求:切换 location_namelocation_code 或坐标参数,比较不同国家和地区的搜索需求。
  • 区分设备搜索行为:分别查询移动端、桌面端或平板数据,优化移动 SEO、桌面页面和设备定向广告策略。

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