主题
Google 搜索量(实时)
接口说明
POST /v3/keywords_data/google/search_volume/live
该接口用于实时获取搜索量数据,返回:
- 最近一个月的搜索量
- 最近 12 个月的搜索量趋势
- 当前平均点击价格(CPC)
- 付费搜索竞争度(competition)
如果你的业务需要即时返回结果,推荐使用 Live 方法。与标准模式不同,Live 接口无需 POST 创建任务、再 GET 获取结果,一次请求即可直接获得数据。
如果不要求实时返回,也可以使用标准模式 /v3/keywords_data/google/search_volume/task_post/。标准模式通常成本更低,但需要分两步获取结果。
此外,你还可以通过 /v3/keywords_data/google/adwords_status/ 查看平台 API 返回的搜索量更新状态。
容性说明
该接口所属的搜索量能力基于平台旧版广告数据体系,现已逐步由新版广告数据接口替代。若你当前依赖旧版接口,建议同步评估迁移到新版容能力。
计费说明
该接口按请求次数计费。
- 单次请求最多可提交 700 个
- 无论请求中 1 个还是 700 个,均按 1 次请求收费
- 账户支持的请求频率上限为 2000 次/分钟
参考价:原文未提供固定单价,扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求格式
所有 POST 数据使用 UTF-8 编码的 JSON 格式提交。
根据本平台规范,请求体为 JSON 数组:
json
[
{
"location_name": "United States",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
]
}
]请求参数
| 字段名 | 类型 | 填 | 说明 |
|---|---|---|---|
keywords | array | 是 | 数组。最多 700 个;每个最长 80 个字符;每个短语最多 10 个单词。系统会将统一转换为小写,并按单个逐条返回结果。 |
location_name | string | 否 | 搜索引擎地区完整名称。使用该字段时,无需再传 location_code 或 location_coordinate。忽略该字段则返回数据。示例:London,England,United Kingdom |
location_code | integer | 否 | 搜索引擎地区编码。使用该字段时,无需再传 location_name 或 location_coordinate。忽略该字段则返回数据。示例:2840 |
location_coordinate | string | 否 | 地理坐标,格式为 "latitude,longitude"。使用该字段时,无需再传 location_name 或 location_code。返回所属国家的数据。示例:52.6178549,-155.352142 |
language_name | string | 否 | 搜索引擎语言完整名称。不建议使用;如果设置该字段,平台 API 可能返回 search_volume = null。使用该字段时,无需再传 language_code。示例:English |
language_code | string | 否 | 搜索引擎语言编码。不建议使用;如果设置该字段,平台 API 可能返回 search_volume = null。使用该字段时,无需再传 language_name。示例:en |
search_partners | boolean | 否 | 是否搜索合作伙伴数据。传 true 时,结果覆盖 Google 及搜索合作伙伴;默认值为 false。 |
tag | string | 否 | 自定义任务标识,最长 255 个字符。可用于业务侧请求追踪,响应中的 data 对象会原样返回该值。 |
地区与语言参数说明
获取支持的地区列表
可调用以下接口查询可用地区及 location_name / location_code:
/v3/keywords_data/google/locations
获取支持的语言列表
可调用以下接口查询可用语言及 language_name / language_code:
/v3/keywords_data/google/languages
###语言参数的建议 平台 API 对语言定向支持存在限制。设置 language_name 或 language_code 后,部分可能返回空搜索量。因此,如无明确业务需求,建议优使用地区参数,不指定语言参数。
返回结果说明
接口返回 JSON 对象 tasks 数组。
顶层响应字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码 |
status_message | string | 通用状态消息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次请求总费用,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | 返回错误的任务数量 |
tasks | array | 任务结果数组 |
建议在接时完善异常与错误处理逻辑。完整错误码请参考
/v3/appendix/errors。
tasks 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,通常在 10000-60000 范围 |
status_message | string | 任务状态说明 |
time | string | 任务执行耗时,单位秒 |
cost | float | 当前任务费用,单位 USD |
result_count | integer | result 数组中的数量 |
path | array | 请求路径信息 |
data | object | 与请求中提交的参数基本一致 |
result | array | 结果数组 |
result 数组字段
每个会返回一条独立结果。
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求中的 |
location_code | integer | 请求中的地区编码;无数据时为 null |
language_code | string | 请求中的语言编码;无数据时为 null |
search_partners | boolean | 是否合作伙伴网络数据 |
competition | float | 付费搜索竞争度,范围 0 到 1。基于广告数据计算;无数据时为 null |
cpc | float | 历史平均点击价格,单位 USD;无数据时为 null |
search_volume | integer | 月均搜索量。表示指定在 Google 或 Google+合作伙伴网络中的近似搜索次数;无数据时为 null |
categories | array | 商品与服务分类;无数据时为 null |
monthly_searches | array | 最近 12 个月的月度搜索量明细;无数据时为 null |
monthly_searches 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
year | integer | 年份 |
month | integer | 月份 |
search_volume | integer | 对应月份的搜索量 |
请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/keywords_data/google/search_volume/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"location_name": "United States",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
]
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/google/search_volume/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"location_name": "United States",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
]
}
]
response = requests.post(url, json=data, headers=headers)
print(response.json)TypeScript
typescript
import axios from "axios";
const postData = [
{
location_name: "London,England,United Kingdom",
language_name: "English",
keywords: [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
]
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/keywords_data/google/search_volume/live",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
},
data: postData
})
.then((response) => {
// 输出接口返回结果
console.log(response.data);
})
.catch((error) => {
console.error(error);
});响应示例
json
{
"version": "3.20191128",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1233 sec.",
"cost": 0.15,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "keywords_data",
"function": "search_volume",
"se": "google",
"language_code": "en",
"location_name": "United States",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects"
]
},
"result": [
{
"keyword": "leads and prospects",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"competition": 0.3333333333333333,
"cpc": 6.713889,
"search_volume": 90,
"categories": null,
"monthly_searches": [
{
"year": 2019,
"month": 10,
"search_volume": 90
}
]
},
{
"keyword": "average page rpm adsense",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"competition": 0.10714285714285714,
"cpc": 14.81844,
"search_volume": 10,
"categories": null,
"monthly_searches": [
{
"year": 2019,
"month": 10,
"search_volume": 10
}
]
},
{
"keyword": "adsense blank ads how long",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"competition": 0.047619047619047616,
"cpc": 0,
"search_volume": 10,
"categories": null,
"monthly_searches": [
{
"year": 2019,
"month": 10,
"search_volume": 10
}
]
}
]
}
]
}状态码与错误处理
- 顶层
status_code表示整次请求的处理状态 tasks[].status_code表示单个任务的处理状态- 当返回非成功状态时,应结合
status_message进行排查 - 建议按
/v3/appendix/errors中的错误码定义实现重试、限流和异常告警机制
使用建议
- 批量利用请求额:单次最多可提交 700 个,适合批量拉取搜索量。
- 尽量少用语言参数:如非强需求,不建议设置
language_name或language_code。 - 按逐条消费结果:接口会对每个单独返回一项结果,便于直接写数据库或分析流水线。
- 以
cost为准做计费归因:响应中的cost为扣费依据,便于做项目或客户维度分摊。 - 注意实时与成本权衡:Live 更适合交互式或在线业务;若为离线批处理,可评估标准模式。
实用场景
- 批量评估价值:一次提交数百个候选词,快速拿到搜索量、CPC 和竞争度,用于优级排序。
- 监控搜索需求波动:利用
monthly_searches观察近 12 个月趋势,识别季节性词和流量拐点。 - 筛选高商业价值词:结合
search_volume与cpc,找出搜索需求稳定且商业转化潜力更高的。 - 验证区域市场机会:通过
location_name或location_code比较不同国家/地区的热度,支持出海或本地化投放决策。 - 构建实时选词:在选词平台、投放后台或规划系统中调用 实时(Live)接口,为用户即时返回搜索量与竞争度数据。