Skip to content

Google 历史搜索量查询

接口说明

该接口用于实时查询 Google 的历史搜索量数据,并返回以下信息:

  • 历史搜索量
  • 当前平均点击成本(CPC)
  • 付费搜索竞争度
  • SERP 信息
  • 可选的点击流归因指标
  • 属性、难度与外链均值数据

历史搜索量最早可追溯至 2019 年初,获取结果基于「 + 地域 + 语言」组合返回。

数据源: 本平台数据库 底层数据基于 Google Ads API。指标通常按月更新;如果平台数据源对某个月的搜索量进行了回写修正,本接口也会同步更新对应数值。

请求方式

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

计费说明

该接口按请求计费。 是否扣费、金额以及最终价格,请以响应中的 cost 字段为准。

启用 include_clickstream_data=true 后,请求价格会变为双倍

调用限制

  • 每分钟最多可发起 2000 次 API 调用
  • 最多支持 30 个并发请求
  • POST 请求体为 UTF-8 编码的 JSON
  • 请求体格式为 JSON 数组[{ ... }]

支持的地域与语言

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

/v3/dataforseo_labs/locations_and_languages


请求参数

字段类型说明
keywordsarray。数组。最多 700 个;每个最长 80 个字符;每个短语最多 10 个单词。系统会自动转为小写。返回结果中每个会单独输出。如果某些未出现在结果中,表示数据库中不存在该数据;这类未返回的不会计费
location_namestring地域名。未传 location_code 时填。location_namelocation_code 二选一。示例:United Kingdom
location_codeinteger地域编码。未传 location_name 时填。location_namelocation_code 二选一。示例:2840
language_namestring语言名。未传 language_code 时填。language_namelanguage_code 二选一。示例:English
language_codestring语言编码。未传 language_name 时填。language_namelanguage_code 二选一。示例:en
include_serp_infoboolean是否在结果中每个对应的 SERP 信息。设为 true 时,会返回 serp_info 对象,搜索结果数量、 URL、SERP 特征等。默认值:false
include_clickstream_databoolean是否返回基于点击流的扩展指标。设为 true 时,响应中会 clickstream_keyword_infokeyword_info_normalized_with_clickstreamkeyword_info_normalized_with_bing。默认值:false开启后价格翻倍
tagstring自定义任务标识,可用于请求与结果匹。最长 255 字符。响应中的 data 对象会原样返回该值。

响应结构

接口返回 JSON,对象中 tasks 数组。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表见 /v3/appendix/errors
status_messagestring通用状态信息
timestring执行耗时,单位秒
costfloat本次请求总费用
tasks_countintegertasks 数组中的任务数
tasks_errorinteger返回错误的任务数
tasksarray任务结果数组

tasks[] 字段

字段类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码
status_messagestring任务状态信息
timestring任务执行耗时
costfloat该任务费用
result_countintegerresult 数组数
patharray请求路径
dataobject原样返回请求参数
resultarray获取结果

result[] 字段

字段类型说明
se_typestring搜索引擎类型
location_codeinteger请求中的地域编码
language_codestring请求中的语言编码
items_countintegeritems 数组中的结果数
itemsarray结果列表

items[] 字段

字段类型说明
se_typestring搜索引擎类型
keywordstring。返回时会对 %## 做解码,+ 会被解码为空格
location_codeinteger请求中的地域编码;无数据时为 null
language_codestring请求中的语言编码
search_partnersboolean是否 Google 合作搜索网络数据。true 表示 Google 及合作伙伴站点;false 表示 Google 搜索站点
keyword_infoobject基础指标
clickstream_keyword_infoobject / null点击流数据,需 include_clickstream_data=true
keyword_propertiesobject属性
serp_infoobject / nullSERP 数据;未开启 include_serp_info 或无数据时为 null
avg_backlinks_infoobject对应前 10 自然结果的平均外链数据
keyword_info_normalized_with_bingobject使用 Bing 搜索量归一化后的搜索量数据
keyword_info_normalized_with_clickstreamobject使用点击流数据归一化后的搜索量数据

字段详解

keyword_info

字段类型说明
se_typestring搜索引擎类型
last_updated_timestring数据更新时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
competitionfloat竞争度,范围 01,基于 Google Ads 数据
competition_levelstring付费搜索竞争等级,可选:LOWMEDIUMHIGH;未知时为 null
cpcfloat历史平均点击成本,单位为平台币种 USD
search_volumeinteger平均月搜索量
low_top_of_page_bidfloat首页顶部广告位较低出价参考值
high_top_of_page_bidfloat首页顶部广告位较高出价参考值
categoriesarray产品/服务分类列表
monthly_searchesarray月度搜索量明细
search_volume_trendobject搜索量趋势变化

monthly_searches[]

字段类型说明
yearinteger
monthinteger
search_volumeinteger该月搜索量

search_volume_trend

字段类型说明
monthlyinteger相比上月的搜索量变化百分比
quarterlyinteger相比上季度的搜索量变化百分比
yearlyinteger相比上年的搜索量变化百分比

clickstream_keyword_info

include_clickstream_data=true 时返回。

字段类型说明
search_volumeinteger基于点击流计算的平均月搜索量
last_updated_timestring点击流数据更新时间,UTC 格式
gender_distributionobject按性别划分的点击流分布
age_distributionobject按年龄划分的点击流分布
monthly_searchesarray月度点击流搜索量

gender_distribution

字段类型说明
femaleinteger点击流数据中的女性用户数
maleinteger点击流数据中的男性用户数

age_distribution

字段类型说明
18-24integer18-24 岁用户数
25-34integer25-34 岁用户数
35-44integer35-44 岁用户数
45-54integer45-54 岁用户数
55-64integer55-64 岁用户数

keyword_properties

字段类型说明
se_typestring搜索引擎类型
core_keywordstring分组中的核心词;若无法识别同义词分组则为 null
synonym_clustering_algorithmstring同义词识别算法。可选:keyword_metricstext_processing;无法识别时为 null
keyword_difficultyinteger自然搜索前 10 排名难度,范围 0-100
detected_languagestring系统识别出的语言
is_another_languageboolean语言是否与请求语言不一致

serp_info

include_serp_info=false 或数据库无该 SERP 数据,则为 null

字段类型说明
se_typestring搜索引擎类型
check_urlstring直达搜索结果页的校验 URL
serp_item_typesarraySERP 中出现的结果类型
se_results_countstring搜索结果总数
last_updated_timestring最近一次 SERP 数据更新时间
previous_updated_timestring上一次 SERP 数据更新时间

serp_item_types 可能的类型:

answer_box, app, carousel, multi_carousel, featured_snippet, google_flights, google_reviews, third_party_reviews, google_posts, images, jobs, knowledge_graph, local_pack, hotels_pack, map, organic, paid, people_also_ask, related_searches, people_also_search, shopping, top_stories, twitter, video, events, mention_carousel, recipes, top_sights, scholarly_articles, popular_products, podcasts, questions_and_answers, find_results_on, stocks_box, visual_stories, commercial_units, local_services, google_hotels, math_solver, currency_box, product_considerations, found_on_web, short_videos, refine_products, explore_brands, perspectives, discussions_and_forums, compare_sites, courses, ai_overview

注意:返回明细结果适用于 organicpaidfeatured_snippetlocal_pack


该对象表示对应 Google 自然结果前 10 名页面的平均外链表现。

字段类型说明
se_typestring搜索引擎类型
backlinksfloat平均外链数
dofollowfloat平均 dofollow 外链数
referring_pagesfloat平均引用页面数
referring_domainsfloat平均引用域名数
referring_main_domainsfloat平均主域名数
rankfloat平均 rank 值
main_domain_rankfloat平均主域 rank 值
last_updated_timestring外链数据更新时间

keyword_info_normalized_with_bing

字段类型说明
last_updated_timestring数据集更新时间
search_volumeinteger当前搜索量
is_normalizedboolean是否已基于 Bing 数据归一化
monthly_searchesarray月度搜索量

keyword_info_normalized_with_clickstream

字段类型说明
last_updated_timestring数据集更新时间
search_volumeinteger当前搜索量
is_normalizedboolean是否已基于点击流数据归一化
monthly_searchesarray月度搜索量

上述两个对象中的 monthly_searches[] 结构一致:

字段类型说明
yearinteger
monthinteger
search_volumeinteger当月搜索量

请求示例

cURL

bash
curl --location --request POST "https://api.seermartech.cn/v3/dataforseo_labs/google/historical_search_volume/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
 {
 "keywords": ["phone", "watch"],
 "language_name": "English",
 "location_code": 2840,
 "include_serp_info": true
 }
]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/dataforseo_labs/google/historical_search_volume/live"
payload = [
 {
 "keywords": ["phone", "watch"],
 "location_name": "United States",
 "language_name": "English",
 "include_serp_info": True
 }
]
headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}

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

TypeScript

typescript
import axios from "axios";

const postArray = [
 {
 keywords: ["phone", "watch"],
 language_name: "English",
 location_code: 2840,
 include_serp_info: true
 }
];

axios({
 method: "post",
 url: "https://api.seermartech.cn/v3/dataforseo_labs/google/historical_search_volume/live",
 headers: {
 Authorization: "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
 },
 data: postArray
})
 .then((response) => {
 // 输出接口结果
 console.log(response.data);
 })
 .catch((error) => {
 console.error(error);
 });

响应示例

json
{
 "version": "0.1.20240801",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.1100 sec.",
 "cost": 0.0102,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "api": "dataforseo_labs",
 "function": "historical_search_volume",
 "se_type": "google",
 "language_name": "English",
 "location_code": 2840,
 "keywords": ["phone", "watch"],
 "include_serp_info": true
 },
 "result": [
 {
 "items": [
 {
 "se_type": "google",
 "keyword": "phone",
 "location_code": 2840,
 "language_code": "en",
 "search_partners": false,
 "keyword_info": {
 "search_volume_trend": {
 "monthly": 22,
 "quarterly": 22,
 "yearly": 0
 }
 },
 "clickstream_keyword_info": null,
 "keyword_properties": {
 "se_type": "google",
 "core_keyword": null,
 "synonym_clustering_algorithm": "text_processing",
 "keyword_difficulty": 83,
 "detected_language": "en",
 "is_another_language": false
 },
 "serp_info": {
 "se_type": "google",
 "check_url": "https://www.google.com/search?q=phone&num=100&hl=en&gl=US&gws_rd=cr&ie=UTF-8&oe=UTF-8&glp=1&uule=w+CAIQIFISCQs2MuSEtepUEUK33kOSuTsc",
 "serp_item_types": ["organic", "paid"],
 "se_results_count": 19880000000,
 "last_updated_time": "2024-07-15 00:43:34 +00:00",
 "previous_updated_time": "2024-05-18 22:29:28 +00:00"
 },
 "avg_backlinks_info": {
 "se_type": "google",
 "backlinks": 6835.7,
 "dofollow": 3775.6,
 "referring_pages": 5352.2,
 "referring_domains": 1100.3,
 "referring_main_domains": 955.1,
 "rank": 369.3,
 "main_domain_rank": 681.2,
 "last_updated_time": "2024-07-14 21:43:39 +00:00"
 },
 "keyword_info_normalized_with_bing": {
 "last_updated_time": "2024-08-17 01:41:37 +00:00",
 "search_volume": 324416,
 "is_normalized": true,
 "monthly_searches": []
 },
 "keyword_info_normalized_with_clickstream": {
 "last_updated_time": "2024-08-11 13:24:34 +00:00",
 "search_volume": 368000,
 "is_normalized": true,
 "monthly_searches": []
 }
 },
 {
 "se_type": "google",
 "keyword": "watch",
 "location_code": 2840,
 "language_code": "en",
 "search_partners": false,
 "keyword_info": {
 "se_type": "google",
 "last_updated_time": "2024-08-12 21:33:32 +00:00",
 "competition": 0.97,
 "competition_level": "HIGH",
 "cpc": 1.36,
 "search_volume": 450000,
 "low_top_of_page_bid": 0.55,
 "high_top_of_page_bid": 3.25,
 "categories": [],
 "monthly_searches": [],
 "search_volume_trend": {
 "monthly": 22,
 "quarterly": 22,
 "yearly": 0
 }
 },
 "clickstream_keyword_info": null,
 "keyword_properties": {
 "se_type": "google",
 "core_keyword": "watches",
 "synonym_clustering_algorithm": "text_processing",
 "keyword_difficulty": 37,
 "detected_language": "en",
 "is_another_language": false
 },
 "serp_info": {
 "se_type": "google",
 "check_url": "https://www.google.com/search?q=watch&num=100&hl=en&gl=US&gws_rd=cr&ie=UTF-8&oe=UTF-8&glp=1&uule=w+CAIQIFISCQs2MuSEtepUEUK33kOSuTsc",
 "serp_item_types": ["organic", "paid"],
 "se_results_count": 18430000000,
 "last_updated_time": "2024-07-15 00:43:26 +00:00",
 "previous_updated_time": "2024-05-18 22:29:29 +00:00"
 },
 "avg_backlinks_info": {
 "se_type": "google",
 "backlinks": 298278.4,
 "dofollow": 293580.4,
 "referring_pages": 295932.3,
 "referring_domains": 961.9,
 "referring_main_domains": 812.7,
 "rank": 272.8,
 "main_domain_rank": 520.9,
 "last_updated_time": "2024-07-14 21:43:28 +00:00"
 },
 "keyword_info_normalized_with_bing": {
 "last_updated_time": "2024-08-17 05:40:22 +00:00",
 "search_volume": 253808,
 "is_normalized": true,
 "monthly_searches": []
 },
 "keyword_info_normalized_with_clickstream": {
 "last_updated_time": "2024-08-12 21:33:32 +00:00",
 "search_volume": 450000,
 "is_normalized": true,
 "monthly_searches": []
 }
 }
 ]
 }
 ]
 }
 ]
}

状态码与错误处理

  • 顶层 status_code 表示整次请求的处理状态
  • tasks[].status_code 表示单个任务的处理状态
  • 完整错误码与说明请参考:/v3/appendix/errors

建议在接时至少处理以下:

  • 鉴权失败
  • 参数缺失或格式错误
  • 地域/语言不支持
  • 请求频率限
  • 单个无数据库结果
  • 任务级成功但部分未返回

使用建议

  1. 批量查询时,优检查返回的 items_count 是否与请求数量一致。
  2. 如需分析 SERP 版位环境,开启 include_serp_info=true
  3. 如需更细的人群维度或归一化搜索量,开启 include_clickstream_data=true,但应注意价格翻倍。
  4. 若要建立时间序列分析模型,建议重点使用 monthly_searchessearch_volume_trend
  5. 对于未出现在结果中的,可视为当前数据库暂无覆盖,无需重试计费确认。

实用场景

  • 评估季节性:拉取过去多个月的 monthly_searches,识别旺季与淡季,为排期和广告预算分提供依据。
  • 筛选高价值投放词:结合 search_volumecpccompetition,找到“搜索量高且竞争适中”的,提高投放效率。
  • 判断自然排名难度:使用 keyword_difficultyavg_backlinks_info 评估前 10 的难度, SEO 选题与资源决策。
  • 识别 SERP 结果形态:通过 serp_item_types 判断是否触发精选摘要、本地、图片等模块,优化结构与页面类型。
  • 分析跨语言或跨地区差异:按不同 location_codelanguage_code 批量查询同一组词,对比需求规模变化,支持化 SEO 与本地化投放。

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