主题
获取站点结果(按任务 ID)
接口说明
Google AdWords Keywords Data API 属于旧版能力,现已由 Google Ads API 替代。若你仍在使用该系列接口,建议尽快迁移到 /v3/keywords_data/google_ads/ 接口。
本接口用于按任务 ID 获取“站点”分析结果。系统会返回与指定域名的一组,并附带以下核心数据:
- 所属分类
- 最近一个月搜索量
- 过去 12 个月搜索趋势
- 当前平均点击价格(CPC)
- 付费搜索竞争度
单次任务最多可返回 700 个建议及核心指标。
说明:平台 API 返回的广告估算数据,可能与广告平台可视化中的数值存在差异。差异通常与账户历史、广告创意、投放环境及数据源口径不同。
请求方式
GET https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/task_get/$id
计费说明
该接口本身为按任务获取结果接口,账户只会在创建任务时扣费;任务结果在生成后的 30 天可重复获取。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
路径参数
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。任务创建后,可在 30 天随时通过该 ID 获取结果。 |
返回结构
接口返回 JSON 数据,顶层 tasks 数组,每个任务对象对应一次任务获取结果。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本号 |
status_code | integer | 接口总体状态码 |
status_message | string | 接口总体状态信息 |
time | string | 接口执行时间,单位秒 |
cost | float | 本次请求总成本 |
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 | 当前任务成本 |
result_count | integer | result 数组中的数量 |
path | array | 请求路径信息 |
data | object | 与创建任务时一致的请求参数 |
result | array | 任务结果列表 |
tasks[].result[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
keyword | string | 返回的 |
location_code | integer | 地域编码;若无数据则为 null |
language_code | string | 语言编码;若无数据则为 null |
search_partners | boolean | 是否合作搜索网络数据 |
competition | float | 付费搜索竞争度,取值范围 0-1;若无数据则为 null |
cpc | float | 平均点击价格;若无数据则为 null |
search_volume | integer | 月均搜索量;表示在指定地域/语言条件下的近似月搜索次数;若无数据则为 null |
categories | array | 产品/服务分类列表;若无数据则为 null |
monthly_searches | array | 过去 12 个月的月度搜索量明细;若无数据则为 null |
monthly_searches[] 字段
| 字段 | 类型 | 说明 |
|---|---|---|
year | integer | 年份 |
month | integer | 月份 |
search_volume | integer | 对应月份的搜索量 |
请求示例
cURL
bash
id="02031614-0696-0108-0000-b26a2a6c7e17"
curl --location --request GET "https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/task_get/${id}" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"Python
python
import requests
task_id = "02231934-2604-0066-2000-570459f04879"
url = f"https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/task_get/{task_id}"
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
result = response.json
# 输出结果
print(result)TypeScript
typescript
import axios from "axios";
const taskId = "02231934-2604-0066-2000-570459f04879";
axios({
method: "get",
url: `https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/task_get/${taskId}`,
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
})
.then((response) => {
// 返回结果
console.log(response.data);
})
.catch((error) => {
console.error(error);
});响应示例
json
{
"version": "0.1.20200130",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1233 sec.",
"cost": 0,
"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",
"tag": "tag1"
},
"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
}
]
}
]
}状态码说明
| 状态码 | 含义 |
|---|---|
20000 | 请求成功 |
10000-60000 | 任务级状态码范围,含义需结合 status_message 判断 |
建议重点处理以下:
- 顶层
status_code非20000tasks_error大于0- 任务级
status_code大于等于40000result为空或为null
使用建议
- 通过创建任务接口创建站点分析任务。
- 保存返回的任务
id。 - 任务完成后,调用本接口按
id获取结果。 - 若需要批量获取已完成任务,可结合
/v3/keywords_data/google/v2/tasks_ready使用。 - 结果建议在业务侧缓存,重复轮询。
实用场景
- 挖掘站点主题:目标网站域名,快速获取与或商业主题的集合,用于规划与专题页建设。
- 评估商业价值:结合
cpc与competition判断的广告竞争强度,筛选更投放价值的词。 - 识别季节性需求变化:利用
monthly_searches查看近 12 个月趋势,判断是否存在明显淡旺季,优化发布时间与预算。 - 分析竞品站点覆盖方向:对竞品域名执行相同查询,观察分布,发现可切的空白和投放机会。
- 构建 SEO 优级单:综合搜索量、竞争度和分类信息,对进行分组和排序,提升选词与落地页规划效率。