Skip to content

Bing 搜索量历史数据(实时)

POST /v3/keywords_data/bing/search_volume_history/live

接口说明

POST /v3/keywords_data/bing/search_volume_history/live

本接口用于实时获取最多 1000 个的历史搜索量数据。返回结果支持按月、周或日聚合,并可按设备类型筛选。

Live 模式会在同一次 POST 请求中直接返回结果,无需提交任务、再通过 GET 接口轮询。若不要求实时获取结果,可使用 Standard 模式;Standard 模式需要分别调用任务提交和结果获取接口,但参考价更低。

历史数据最长可查询过去 24 个月。

请求限制

  • 单次请求只能 1 个任务。
  • 每个任务的 keywords 数组最多 1000 个。
  • 单个最多 100 个字符。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
  • 无论请求中 1 个还是 1000 个,均按请求计费。
  • 会被转换为小写,并在结果中分别返回。
  • 请求体使用 UTF-8 编码的 JSON 格式。
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

参考价格

参考价约 ¥0.5400 / 次。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

POST 请求体是 JSON 数组,且每次只能一个任务对象:

json
[
  {
    "location_name": "United States",
    "language_name": "English",
    "keywords": [
      "average page rpm adsense",
      "adsense blank ads how long",
      "leads and prospects"
    ]
  }
]

任务参数

参数类型说明
keywordsarray要查询的列表。最多 1000 个,每个最多 100 个字符。
location_namestring条件填搜索引擎位置的完整名称。未指定 location_codelocation_coordinate 时填。使用此参数后,无需同时传另外两个位置参数。示例:London,England,United Kingdom
location_codeinteger条件填搜索引擎位置代码。未指定 location_namelocation_coordinate 时填。示例:2840
location_coordinatestring条件填位置的 GPS 坐标,格式为 "纬度,经度"。未指定 location_namelocation_code 时填。返回指定坐标所属国家的数据。示例:52.6178549,-155.352142
language_namestring条件填搜索引擎语言的完整名称。未指定 language_code 时填。
language_codestring条件填搜索引擎语言代码。未指定 language_name 时填。
devicearray指定要查询的设备类型。可选值:mobiledesktoptabletnon_smartphones。不传时返回所有可用设备类型的数据。
periodstring返回数据的时间聚合粒度。可选值:monthlyweeklydaily。默认值为 monthly
date_fromstring查询时间范围的开始日期,格式为 yyyy-mm-dd,例如 "2020-01-01"
date_tostring查询时间范围的结束日期,格式为 yyyy-mm-dd,例如 "2020-03-15"
tagstring自定义任务标识,用于将请求与结果进行匹,最多 255 个字符。该值会原样返回在响应的 data 对象中。

位置与语言参数说明

location_namelocation_codelocation_coordinate 三只能选择一。

language_namelanguage_code 二只能选择一。

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

text
GET /v3/keywords_data/bing/search_volume_history/locations_and_languages

时间范围规则

period

说明
monthly按月返回,最多覆盖过去 24 个月。
weekly按周返回,最多覆盖过去 15 周。
daily按日返回,最多覆盖过去 45 天。

date_from

  • 最早可设置为距当前日期 24 个月的日期。
  • 如果 Bing 状态接口返回的 actual_datafalse,可将开始日期设置为上上个月或更早。
  • 如果 actual_datatrue,可将开始日期设置为上个月或更早。
  • 日期格式为 yyyy-mm-dd

date_to

  • 最早可设置为距当前日期两年的日期。
  • 最晚可设置为当前日期的次日。
  • 日期格式为 yyyy-mm-dd

通常不建议使用自定义时间范围。如果同时省略 date_fromdate_to

  • period=monthly:返回过去 24 个月;
  • period=weekly:返回过去 15 周;
  • period=daily:返回过去 45 天。

响应字段

接口返回 JSON 对象 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger请求级状态码。
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请求路径信息。
dataobject请求中提交的任务参数。
resultarray搜索量历史数据。

result 子字段

字段类型说明
keywordstring请求中的。
location_codeinteger位置代码。无数据时为 null
language_codestring语言代码。无数据时为 null
devicestring请求中指定的设备类型。无数据时为 null
periodstring数据时间粒度,默认值为 monthly
searchesobject按设备类型组织的历史搜索量数据。如果未传 device,则返回所有可用设备类型。

searches 设备字段

字段类型说明
desktoparray桌面设备的历史搜索量数据。
non_smartphonesarray非智能手机或功能手机的历史搜索量数据。
mobilearray移动设备的历史搜索量数据。
tabletarray平板设备的历史搜索量数据。

每个设备数组中的数据项以下字段:

字段类型说明
yearinteger年份。
monthinteger月份。
dayinteger日期中的日。按月或按周聚合时,部分日期字段可能不适用。
search_volumeinteger对应时间段的搜索量。

请求示例

curl

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/keywords_data/bing/search_volume_history/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "location_name": "United States",
      "language_name": "English",
      "keywords": [
        "average page rpm adsense",
        "adsense blank ads how long",
        "leads and prospects"
      ],
      "period": "monthly",
      "device": [
        "desktop",
        "mobile"
      ]
    }
  ]'

Python

python
import requests

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

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

payload = [
    {
        "location_name": "United States",
        "language_name": "English",
        "keywords": [
            "average page rpm adsense",
            "adsense blank ads how long",
            "leads and prospects",
        ],
        "period": "monthly",
    }
]

response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()

result = response.json()
if result.get("status_code") == 20000:
    print(result)
else:
    print(
        "请求失败:{} {}".format(
            result.get("status_code"),
            result.get("status_message"),
        )
    )

TypeScript

typescript
const url =
  "https://api.seermartech.cn/v3/keywords_data/bing/search_volume_history/live";

const response = await fetch(url, {
  method: "POST",
  headers: {
    Authorization: "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify([
    {
      location_name: "United States",
      language_name: "English",
      keywords: [
        "average page rpm adsense",
        "adsense blank ads how long",
        "leads and prospects",
      ],
      period: "monthly",
    },
  ]),
});

const result = await response.json();

if (result.status_code === 20000) {
  console.log(result);
} else {
  console.error(result.status_code, result.status_message);
}

响应示例

json
{
  "version": "0.1.20240626",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "12.9494 sec.",
  "cost": 0.5400,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "01234567-89ab-cdef-0123-456789abcdef",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "12.9000 sec.",
      "cost": 0.5400,
      "result_count": 1,
      "path": [
        "v3",
        "keywords_data",
        "bing",
        "search_volume_history",
        "live"
      ],
      "data": {
        "api": "keywords_data",
        "function": "search_volume_history",
        "se": "bing",
        "location_code": 2840,
        "language_code": "en",
        "keywords": [
          "average page rpm adsense"
        ],
        "period": "monthly"
      },
      "result": [
        {
          "keyword": "average page rpm adsense",
          "location_code": 2840,
          "language_code": "en",
          "device": null,
          "period": "monthly",
          "searches": {
            "desktop": [
              {
                "year": 2024,
                "month": 1,
                "day": 1,
                "search_volume": 120
              }
            ],
            "non_smartphones": [
              {
                "year": 2024,
                "month": 1,
                "day": 1,
                "search_volume": 10
              }
            ],
            "mobile": [
              {
                "year": 2024,
                "month": 1,
                "day": 1,
                "search_volume": 80
              }
            ],
            "tablet": [
              {
                "year": 2024,
                "month": 1,
                "day": 1,
                "search_volume": 15
              }
            ]
          }
        }
      ]
    }
  ]
}

实用场景

  • 分析季节性趋势:按月、周或日对比搜索量变化,识别旺季与淡季并优化发布节奏。
  • 拆分设备端搜索需求:分别比较桌面、移动端、平板和非智能手机的搜索量,为移动端 SEO 和页面适提供依据。
  • 评估增长潜力:批量查询候选的历史搜索量,筛选持续增长趋势的词用于规划。
  • 制定区域化 SEO 策略:按国家、城市或坐标获取搜索量历史数据,比较不同市场的需求并安排本地化资源。
  • 监控业务波动:定期请求核心的历史数据,发现搜索需求异常变化并判断市场或行业趋势。

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