主题
Google 站点实时查询
本接口使用 POST /v3/keywords_data/google/keywords_for_site/live,根据指定网站域名返回、分类、近 1 个月搜索量、近 12 个月搜索量趋势,以及付费搜索中的平均每次点击费用(CPC)和竞争度。
> Google AdWords 数据接口属于旧版接口,建议迁移至 Google Ads API。由于广告账户历史、广告素材及账户因素的影响,接口返回结果可能与规划中的估算值存在差异。
Live 接口会在当前请求中直接返回结果,无需额外执行任务查询。若不要求实时返回,可使用 Standard 方法:通过 POST 创建任务,再通过 GET 获取结果,通常成本更低。
如需查询 Google 返回的搜索量更新状态,可使用 /v3/keywords_data/google/adwords_status 接口。
请求信息
- 请求方法:
POST - 请求路径:
/v3/keywords_data/google/keywords_for_site/live - 完整 URL:
https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/live - Content-Type:
application/json - 请求体格式: JSON 数组
- 单次请求最多返回: 700 个建议及核心数据 平台限流以认证说明中的 30/60/120 次/分钟规则为准
本接口按请求计费,与返回的数量无。无论返回 1 个还是 700 个,单次请求的计费规则相同。
计费说明
示例响应中的 cost 为原始接口成本字段。原文示例值为 0.075,按参考汇率折算约为 ¥0.54 / 次。价格可能因账户或平台调整而变化。
扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
请求参数
请求体是数组,每个数组代表一个任务对象。
| 参数 | 类型 | 填 | 说明 |
|---|---|---|---|
target | string | 是 | 目标网站域名,例如 example.com。 |
location_name | string | 否 | 搜索引擎地域的完整名称,例如 United States。使用此参数后,无需同时传 location_code 或 location_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域。省略时返回结果。 |
location_code | integer | 否 | 搜索引擎地域代码,例如 2840。使用此参数后,无需同时传 location_name 或 location_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域代码。省略时返回结果。 |
location_coordinate | string | 否 | 地域 GPS 坐标,格式为 纬度,经度,例如 52.6178549,-155.352142。返回结果将基于该坐标所属国家。使用此参数后,无需同时传 location_name 或 location_code。省略时返回结果。 |
language_name | string | 否 | 搜索引擎语言的完整名称,例如 English。使用此参数后,无需同时传 language_code。可通过 /v3/keywords_data/google/languages 获取可用语言。省略时返回所有可用语言的结果。 |
language_code | string | 否 | 搜索引擎语言代码,例如 en。使用此参数后,无需同时传 language_name。可通过 /v3/keywords_data/google/languages 获取可用语言代码。省略时返回所有可用语言的结果。 |
sort_by | string | 否 | 结果排序字段。支持 search_volume 或 relevance,按降序排列。默认值为 search_volume。 |
keywords_negative | array | 否 | 要排除的列表。最多可传 200 个。指定的会被转换为小写,并从结果中排除。 |
tag | string | 否 | 自定义任务标识,最长 255 个字符。可用于请求和响应,指定值会在响应的 data 对象中返回。 |
地域和语言参数限制
以下参数每组只能选择一个:
location_name、location_code、location_coordinatelanguage_name、language_code
请求示例
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",
"sort_by": "search_volume",
"keywords_negative": [
"free",
"download"
],
"tag": "site-keywords-demo"
}
]'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",
}
payload = [
{
"location_name": "United States",
"language_name": "English",
"target": "example.com",
}
]
response = requests.post(url, headers=headers, json=payload)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"请求失败,状态码:%s,信息:%s"
% (result.get("status_code"), result.get("status_message"))
)TypeScript
typescript
import axios from "axios";
const payload = [
{
location_name: "United States",
language_name: "English",
target: "example.com",
},
];
axios
.post(
"https://api.seermartech.cn/v3/keywords_data/google/keywords_for_site/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 对象 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 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 任务字段
| 字段 | 类型 | 说明 |
|---|---|---|
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 | 请求 URL 路径信息。 |
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。如需人民币展示,建议结合响应头 X-SeerMarTech-Charge-CNY 的计费口径或业务汇率进行处理。 |
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 | 当月近似搜索量。 |
响应示例
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": [
{
"id": "00000000-0000-0000-0000-000000000001",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1000 sec.",
"cost": 0.075,
"result_count": 2,
"path": [
"v3",
"keywords_data",
"google",
"keywords_for_site",
"live"
],
"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": [
{
"year": 2024,
"month": 6,
"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": 6,
"search_volume": 10
}
]
}
]
}
]
}实用场景
- 挖掘竞品网站,批量获取目标域名覆盖的和搜索量,为竞品 SEO 研究及差距分析提供依据。
- 筛选高搜索量,按
search_volume降序排序,优确定规划和落地页建设方向。 - 评估商业价值,结合
cpc与competition指标识别高转化潜力及付费竞争激烈的。 - 分析季节性趋势,读取
monthly_searches的近 12 个月数据,安排季节性、促销页面和投放周期。 - 排除无词和低价值词,通过
keywords_negative过滤品牌不词、需求词或下载类词,提升研究结果的可用性。