Skip to content

历史搜索量(旧版)

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

POST https://api.seermartech.cn/v3/dataforseo_labs/historical_search_volume/live

> 本接口为旧版容接口。本平台仍支持该请求与响应结构。新版本接口请参考 /v3/dataforseo_labs/google/historical_search_volume/live/

接口说明

本接口根据、地区和语言组合,返回 Google 与 Bing 的历史搜索量、当前每次点击费用(CPC)、付费搜索竞争度、广告展示次数及 SERP 信息。

  • 支持查询自 2019 年初 起的历史搜索量,可用时间范围取决于、地区和语言组合。
  • 数据来源于平台数据库,基础数据来自 Google Ads API 和 Bing Ads API。
  • 指标通常在数据源完成更新后每月更新一次。
  • Google 可能会重新修订某个月份的搜索量,因此历史数据也可能随之更新。 平台限流以认证说明中的 30/60/120 次/分钟规则为准。
  • 所有 POST 请求体使用 UTF-8 编码的 JSON 格式,并以 JSON 数组传递任务。

计费说明

每个请求按任务计费。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

响应中的 cost 字段(平台原始 USD 成本兼容字段)表示本次任务的计费金额,金额口径以本平台返回值和响应头为准。

请求参数

参数类型说明
keywordsarray要查询的列表。最多 700 个;每个最多 80 个字符、10 个单词。会转换为小写。若部分未出现在结果中,表示数据库中没有对应数据;未返回的不会计费。
location_namestring条件填地区完整名称。未指定 location_code 时填,例如 United Kingdom
location_codeinteger条件填地区代码。未指定 location_name 时填,例如 2840
language_namestring条件填语言完整名称。未指定 language_code 时填,例如 English
language_codestring条件填语言代码。未指定 language_name 时填,例如 en
include_serp_infoboolean是否返回每个的 SERP 数据结果数量、检查 URL 和 SERP 特征。默认值为 false
order_byarray结果排序规则。支持升序 asc 和降序 desc,多个排序规则最多设置 3 个。排序字段与排序方向使用逗号分隔,例如 search_volume,desc。默认按性排序。relevance 是系统排序标识,不会出现在结果字段中。
tagstring用户自定义任务标识,最多 255 个字符。该值会原样返回在响应任务的 data 对象中。

location_namelocation_code 二选一;language_namelanguage_code 二选一。

可通过以下接口查询可用的地区和语言:

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

请求示例

curl

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

Python

python
import requests

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

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

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(
        f"请求失败,错误码:{result.get('status_code')},"
        f"错误信息:{result.get('status_message')}"
    )

TypeScript

typescript
import axios from "axios";

const requestData = [
  {
    location_name: "United States",
    language_name: "English",
    include_serp_info: true,
    keywords: [
      "average page rpm adsense",
      "adsense blank ads how long",
      "leads and prospects"
    ]
  }
];

axios.post(
  "https://api.seermartech.cn/v3/dataforseo_labs/historical_search_volume/live",
  requestData,
  {
    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请求执行耗时,例如 0.1091 sec.
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务数量。
tasks_errorinteger返回错误的任务数量。
tasksarray任务结果数组。

任务字段

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

完整错误码可参考 /v3/appendix/errors。建议客户端对请求级和任务级错误分别进行处理。

result 字段

字段类型说明
location_codeinteger请求中使用的地区代码。
language_codestring请求中使用的语言代码。
items_countintegeritems 数组中的结果数量。
itemsarray及指标。

items 字段

基础字段

字段类型说明
keywordstring。返回时会对编码进行解码,+ 会解码为空格。
location_codeinteger / null对应的地区代码。无数据时为 null
keyword_infoobjectGoogle 指标。
keyword_propertiesobject附加信息。
impressions_infoobject广告展示次数数据。
bing_keyword_infoobjectBing 指标。部分地区和语言不提供 Bing 数据。
serp_infoobject / nullSERP 数据。未将 include_serp_info 设置为 true,或数据库中没有该的 SERP 数据时为 null

keyword_info

字段类型说明
last_updated_timestring数据更新时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
competitionfloat付费搜索竞争度,取值范围为 0 至 1。
cpcfloat历史平均每次点击费用。
search_volumeinteger平均月搜索量,表示指定在 Google 中的近似搜索次数。
categoriesarray产品和服务分类。
monthly_searchesarray过去 12 个月、面向指定地区的月度搜索量。

monthly_searches 子项:

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger该月份的平均搜索量。

keyword_properties

字段类型说明
core_keywordstring / null相似分组中的核心。为 null 时,表示数据库中没有符合条件的核心。
keyword_difficultyinteger难度,取值范围为 0 至 100,用于衡量自然搜索结果前 10 名的难度。该指标综合分析 SERP 前 10 个页面的链接特征等因素。

impressions_info

该对象基于最高出价 999 计算,用于降低账户因素对展示次数估算的影响。daily_impressions 通常可作为 Google 搜索量的补参考。

字段类型说明
last_updated_timestring展示次数数据更新时间,UTC 格式。
bidinteger最高 CPC 出价。本接口通常返回 999
match_typestring匹类型,可取 exactbroadphrase
ad_position_minfloat最低广告排名。
ad_position_maxfloat最高广告排名。
ad_position_averagefloat平均广告排名。
cpc_minfloat在出价为 999 时估算的最低 CPC。该值不是 CPC; CPC 请读取 keyword_info.cpc
cpc_maxfloat在出价为 999 时估算的最高 CPC。该值不是 CPC。
cpc_averagefloat在出价为 999 时估算的平均 CPC。该值不是 CPC。
daily_impressions_minfloat估算的最低日展示次数,可作为搜索量的补参考。
daily_impressions_maxfloat估算的最高日展示次数。
daily_impressions_averagefloat估算的平均日展示次数。
daily_clicks_minfloat最低日点击次数。
daily_clicks_maxfloat最高日点击次数。
daily_clicks_averagefloat平均日点击次数。
daily_cost_minfloat最低日广告费用估算值。
daily_cost_maxfloat最高日广告费用估算值。
daily_cost_averagefloat平均日广告费用估算值。

bing_keyword_info

Bing 数据对部分地区和语言可用。

字段类型说明
last_updated_timestringBing 数据更新时间,UTC 格式。
search_volumeinteger过去一个月在 Bing 中的搜索次数。
monthly_searchesarray指定地区下的 Bing 月度搜索量。

monthly_searches 子项:

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger月度平均搜索量。

serp_info

当请求参数 include_serp_infotrue 且数据库中存在对应 SERP 数据时返回。

字段类型说明
check_urlstring对应的搜索结果页 URL,可用于人工核验结果。
serp_item_typesarraySERP 中出现的结果类型。结果数据针对 organicpaidfeatured_snippetlocal_pack 返回。
se_results_countstring搜索结果总数。
last_updated_timestringSERP 数据更新时间,UTC 格式。
previous_updated_timestring / null上一次 SERP 数据更新时间。

响应示例

json
{
  "version": "0.1.20220131",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1091 sec.",
  "cost": 0.0102,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "01234567-89ab-cdef-0123-456789abcdef",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.0850 sec.",
      "cost": 0.0102,
      "result_count": 1,
      "path": [
        "v3",
        "dataforseo_labs",
        "historical_search_volume",
        "live"
      ],
      "data": {
        "api": "dataforseo_labs",
        "function": "historical_search_volume",
        "keywords": [
          "phone",
          "watch"
        ],
        "language_name": "English",
        "location_code": 2840,
        "include_serp_info": true
      },
      "result": [
        {
          "location_code": 2840,
          "language_code": "en",
          "items_count": 2,
          "items": [
            {
              "keyword": "phone",
              "location_code": 2840,
              "keyword_info": {
                "last_updated_time": "2022-01-17 15:57:45 +00:00",
                "competition": 0.9874966013067319,
                "cpc": 3.128769,
                "search_volume": 450000,
                "categories": [],
                "monthly_searches": [
                  {
                    "year": 2021,
                    "month": 12,
                    "search_volume": 450000
                  }
                ]
              },
              "keyword_properties": {
                "core_keyword": null,
                "keyword_difficulty": 100
              },
              "impressions_info": {
                "last_updated_time": "2021-12-30 21:53:30 +00:00",
                "bid": 999,
                "match_type": "exact",
                "ad_position_min": 1.12,
                "ad_position_max": 1.0,
                "ad_position_average": 1.06,
                "cpc_min": 13.11,
                "cpc_max": 16.02,
                "cpc_average": 14.57,
                "daily_impressions_min": 3682.42,
                "daily_impressions_max": 4500.73,
                "daily_impressions_average": 4091.57,
                "daily_clicks_min": 118.16,
                "daily_clicks_max": 144.42,
                "daily_clicks_average": 131.29,
                "daily_cost_min": 1721.19,
                "daily_cost_max": 2103.68,
                "daily_cost_average": 1912.43
              },
              "bing_keyword_info": {
                "last_updated_time": "2021-12-19 12:26:54 +00:00",
                "search_volume": 54530,
                "monthly_searches": []
              },
              "serp_info": {
                "check_url": "https://www.google.com/search?q=phone&num=100&hl=en&gl=US",
                "serp_item_types": [
                  "organic",
                  "paid",
                  "featured_snippet"
                ],
                "se_results_count": "3430000000",
                "last_updated_time": "2022-01-13 20:59:31 +00:00",
                "previous_updated_time": null
              }
            }
          ]
        }
      ]
    }
  ]
}

实用场景

  • 追踪历史趋势:按地区和语言获取自 2019 年以来的月度搜索量,识别季节性需求并规划发布时间。
  • 筛选付费搜索机会:结合搜索量、竞争度和 CPC,优选择流量潜力较高且投放成本可控的。
  • 评估自然排名难度:使用 keyword_difficulty 衡量自然搜索结果前 10 名的难度,制定 SEO优级。
  • 预测广告与点击:结合展示次数、点击次数、广告排名和日成本估算,制定搜索广告预算。
  • 对比 Google 与 Bing 需求:同时分析 keyword_infobing_keyword_info,发现不同搜索引擎及市场中的流量差异。

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