主题
站点实时查询
接口说明
POST /v3/keywords_data/google/keywords_for_site/live
该接口用于根据指定网站域名,实时返回与的一组,并附带以下数据:
- 所属分类
- 最近一个月的搜索量
- 过去 12 个月的搜索趋势
- 当前平均点击单价(CPC)
- 付费搜索竞争度(competition)
这是一个 Live 实时接口:一次请求即可直接拿到结果,无需像标准任务模式那样分为 POST 创建任务和 GET 获取结果两步。
说明:
- 该能力属于较早版本的数据接口体系,当前平台已逐步以新版 Google Ads 数据能力替代。
- API 返回的数据,可能与规划界面中看到的估算值不同。原因通常广告账户历史、创意状态、账户特征以及数据源差异等。
- 如果你不要求实时返回,也可以使用标准模式
/v3/keywords_data/google/keywords_for_site/task_post/,成本通常更低。- 如需检查搜索量数据更新状态,可结合状态查询接口使用。
计费说明
该接口按请求计费,每次请求最多可返回约 700 个建议。 无论最终返回 1 个还是 700 个,都按 1 次请求计费。
参考价约 ¥1.2000 / 次扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求方式
- 方法:
POST - 地址:
https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/live - 请求体:
JSON数组[{ ... }] - 编码:
UTF-8 - 频率限制:最高 2000 次 API 调用/分钟
请求参数
以下为单个任务对象可用字段说明。
| 字段名 | 类型 | 说明 |
|---|---|---|
target | string | 填。目标网站域名。示例:example.com |
location_name | string | 可选。搜索引擎地域名。使用该字段时,无需再传 location_code 或 location_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域列表。忽略该字段时返回数据。示例:London,England,United Kingdom |
location_code | integer | 可选。搜索引擎地域编码。使用该字段时,无需再传 location_name 或 location_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域编码。忽略该字段时返回数据。示例:2840 |
location_coordinate | string | 可选。GPS 坐标,格式为 "latitude,longitude"。使用该字段时,无需再传 location_name 或 location_code。系统会返回该坐标所属国家的数据。忽略该字段时返回数据。示例:52.6178549,-155.352142 |
language_name | string | 可选。搜索引擎语言名。使用该字段时,无需再传 language_code。可通过 /v3/keywords_data/google/languages 获取可用语言列表。忽略该字段时返回所有可用语言结果。示例:English |
language_code | string | 可选。搜索引擎语言代码。使用该字段时,无需再传 language_name。可通过 /v3/keywords_data/google/languages 获取可用语言代码。忽略该字段时返回所有可用语言结果。示例:en |
sort_by | string | 可选。结果排序方式支持按 search_volume 或 relevance 降序排列。默认值:search_volume |
keywords_negative | array | 可选。排除列表。这些词不会出现在结果中。最多可传 200 个词,系统会自动转为小写。 |
tag | string | 可选。自定义任务标识,最大长度 255。可用于请求结果匹,响应中的 data 对象会原样返回该值。 |
响应结构
接口返回 JSON,对象中 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 接口通用状态码 |
status_message | string | 接口通用状态信息 |
time | string | 执行耗时,单位秒 |
cost | float | 本次请求总成本,单位 USD |
tasks_count | integer | tasks 数组中的任务数 |
tasks_error | integer | tasks 数组中报错的任务数 |
tasks | array | 任务结果数组 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,通常在 10000-60000 范围 |
status_message | string | 任务状态说明 |
time | string | 任务执行耗时,单位秒 |
cost | float | 当前任务成本,单位 USD |
result_count | integer | result 数组中的结果数量 |
path | array | URL 路径 |
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 | 月均搜索量;无数据时为 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/keywords_for_site/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"location_name": "United States",
"language_name": "English",
"target": "example.com"
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/live"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
data = [
{
"location_name": "United States",
"language_name": "English",
"target": "example.com"
}
]
response = requests.post(url, headers=headers, json=data)
print(response.json)TypeScript
typescript
import axios from "axios";
const postData = [
{
location_name: "United States",
language_name: "English",
target: "example.com"
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/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.response?.data || error.message);
});响应示例
json
{
"version": "0.1.20200130",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1233 sec.",
"cost": 0.075,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "keywords_data",
"function": "keywords_for_site",
"se": "google",
"location_name": "United States",
"language_name": "English",
"target": "example.com"
},
"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": null
},
{
"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": null
}
]
}
]
}状态码与错误处理
- 顶层
status_code表示整次请求的处理状态 tasks[].status_code表示单个任务的执行状态- 建议同时校验:
- HTTP 状态码
- 顶层
status_code tasks_errortasks[].status_code
当接口返回异常时,应记录以下信息,便于排查:
- 请求参数
- 顶层
status_code/status_message - 任务级
status_code/status_message - 响应中的
cost、time、id
通用错误码与状态说明可参考 /v3/appendix/errors。
使用建议
优传明确地域与语言 若业务面向特定国家/语言市场,建议显式传
location_name/location_code和language_name/language_code,结果过于分散。合
keywords_negative过滤无词 对品牌词、招聘词、售后词等可提前排除,以减少噪音。按需选择排序方式
- 流量机会:使用
search_volume - 主题贴近度:使用
relevance
- 注意 CPC 与 competition 的适用场景 这两个指标更适合用于商业价值评估、投放竞争分析,不应直接等同于自然搜索 SEO 难度。
实用场景
- 挖掘站点主题词:竞品或自有站点域名,快速获取集合,用于补栏目规划和选题。
- 评估商业投放价值:结合
cpc与competition,识别高商业意图词, SEO 与 SEM 联动决策。 - 发现增量机会:通过
monthly_searches查看年度趋势,优布局季节性增长或近期升温的话题。 - 分析竞品覆盖方向:对竞品域名批量调用接口,比较分布,定位自身空白。
- 过滤无效流量主题:使用
keywords_negative排除不词、低转化词或品牌干扰词,提高池质量。