主题
Google 搜索量实时查询
本接口使用 POST /v3/keywords_data/google/search_volume/live,实时返回 Google 数据最近一个月的搜索量、过去 12 个月的搜索量趋势、平均每次点击费用(CPC)和付费搜索竞争度。
实时接口会在当前请求中直接返回结果,无需提交任务、再通过 GET 接口查询。若不要求实时返回,可使用 Standard 异步任务接口;该方式需要分别调用 POST 和 GET 接口,但通常成本更低。
> 说明:该接口基于 Google 数据能力。建议优使用 Google Ads 接口,并根据业务需求选择对应的数据源。
计费说明
本接口按请求计费。同一个请求中提交 1 个或 700 个,计费规则相同。
参考价约 ¥1.08 / 次。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求限制:
平台限流以认证说明中的 30/60/120 次/分钟规则为准。
- 每个请求最多提交 700 个。
- 所有请求体使用 UTF-8 编码的 JSON 格式。
- 请求体是 JSON 数组,格式为
[{ ... }]。
请求信息
http
POST https://api.seermartech.cn/v3/keywords_data/google/search_volume/live
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json请求参数
请求体是一个 JSON 数组。每个数组代表一个任务对象。
| 字段 | 类型 | 填 | 说明 |
|---|---|---|---|
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 | 否 | 地理坐标,格式为 纬度,经度,例如 52.6178549,-155.352142。数据将根据该坐标所属国家返回。使用该字段时,不要同时传 location_name 或 location_code。省略时返回范围结果。 |
language_name | string | 否 | 搜索语言的完整名称,例如 English。不建议在创建任务时使用此字段;指定后可能导致 Google 返回 null 搜索量。使用该字段时,不要同时传 language_code。 |
language_code | string | 否 | 搜索语言代码,例如 en。不建议在创建任务时使用此字段;指定后可能导致 Google 返回 null 搜索量。使用该字段时,不要同时传 language_name。 |
search_partners | boolean | 否 | 是否同时返回 Google 搜索合作伙伴网络的数据。true 表示合作伙伴网络,默认值为 false。 |
tag | string | 否 | 用户自定义任务标识,最多 255 个字符。可用于请求和响应,提交的值会在响应任务的 data 对象中返回。 |
地域和语言列表
可通过以下接口获取可用的地域和语言:
http
GET https://api.seermartech.cn/v3/keywords_data/google/locations
GET https://api.seermartech.cn/v3/keywords_data/google/languages语言参数建议
建议优使用地域参数确定目标市场,并谨设置 language_name 或 language_code。部分语言设置可能导致返回结果中的 search_volume 为 null。
响应结构
接口返回 JSON 对象 tasks 数组。每个任务对应请求体中的一个任务对象。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 请求级状态码。20000 表示成功。 |
status_message | string | 请求级提示信息。 |
time | string | 请求执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务总数。 |
tasks_error | integer | 返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,通常在 10000 至 60000 范围。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的结果数量。 |
path | array | 请求 API 路径。 |
data | object | 创建任务时提交的参数。 |
result | array | 搜索量结果数组。 |
result 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求中的。 |
location_code | integer / null | 返回数据对应的地域代码。无数据时为 null。 |
language_code | string / null | 返回数据对应的语言代码。无数据时为 null。 |
search_partners | boolean | 是否搜索合作伙伴网络数据。 |
competition | float / null | 付费搜索竞争度,取值范围为 0 至 1,数值越高表示竞争越激烈。无数据时为 null。 |
cpc | float / null | 历史平均每次点击费用。无数据时为 null。 |
search_volume | integer / null | 月均搜索量。根据目标地域及是否搜索合作伙伴网络计算。无数据时为 null。 |
categories | array / null | 对应的产品和服务类别。无数据时为 null。 |
monthly_searches | array / null | 过去 12 个月的月度搜索量数据。无数据时为 null。 |
monthly_searches 字段
| 字段 | 类型 | 说明 |
|---|---|---|
year | integer | 年份。 |
month | integer | 月份,取值为 1 至 12。 |
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",
"language_name": "English",
"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",
}
payload = [
{
"location_name": "United States",
"language_name": "English",
"keywords": [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects",
],
}
]
response = requests.post(url, headers=headers, json=payload)
data = response.json()
if data.get("status_code") == 20000:
print(data)
else:
print(
f"请求失败,状态码:{data.get('status_code')},"
f"信息:{data.get('status_message')}"
)TypeScript
typescript
import axios from "axios";
const payload = [
{
location_name: "London,England,United Kingdom",
language_name: "English",
keywords: [
"average page rpm adsense",
"adsense blank ads how long",
"leads and prospects",
],
},
];
axios
.post(
"https://api.seermartech.cn/v3/keywords_data/google/search_volume/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": "3.20191128",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1233 sec.",
"cost": 0.15,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": " odk2YjQxYjItM2Q4Mi00YjYxLTg0YjItOTM5Y2U1ZDY0Y2E3 ",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1012 sec.",
"cost": 0.15,
"result_count": 3,
"path": [
"v3",
"keywords_data",
"google",
"search_volume",
"live"
],
"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": "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": 2024,
"month": 1,
"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": 2024,
"month": 1,
"search_volume": 10
}
]
},
{
"keyword": "leads and prospects",
"location_code": 2840,
"language_code": "en",
"search_partners": false,
"competition": null,
"cpc": null,
"search_volume": null,
"categories": null,
"monthly_searches": null
}
]
}
]
}错误处理
建议根据顶层和任务级 status_code 判断请求是否成功:
20000:请求或任务执行成功。- 状态码:请求或任务执行失败,应结合
status_message进行排查。 tasks_error大于0:表示至少有一个任务返回错误。
处理批量请求时,不要只根据顶层状态判断结果,还应逐项检查 tasks 中每个任务的状态码。字段列表和错误码说明请参考错误码文档。
实用场景
- 筛选高搜索量:按地域获取月均搜索量,建立选题和优级列表,提升自然流量获取效率。
- 评估付费投放竞争度:结合
competition和cpc判断竞价压力与预估获客成本,制定 Google Ads 投放策略。 - 分析季节性趋势:读取
monthly_searches的 12 个月数据,识别季节性需求变化,安排发布和促销活动。 - 对比不同目标市场:按不同
location_name或location_code分组查询,比较各地区的搜索需求,为化 SEO 和市场拓展提供依据。 - 构建研究:批量提交最多 700 个并实时获取结果,为 SEO 平台、规划系统或广告选词提供即时数据支持。