Skip to content

站点实时查询

接口说明

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 调用/分钟

请求参数

以下为单个任务对象可用字段说明。

字段名类型说明
targetstring。目标网站域名。示例:example.com
location_namestring可选。搜索引擎地域名。使用该字段时,无需再传 location_codelocation_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域列表。忽略该字段时返回数据。示例:London,England,United Kingdom
location_codeinteger可选。搜索引擎地域编码。使用该字段时,无需再传 location_namelocation_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域编码。忽略该字段时返回数据。示例:2840
location_coordinatestring可选。GPS 坐标,格式为 "latitude,longitude"。使用该字段时,无需再传 location_namelocation_code。系统会返回该坐标所属国家的数据。忽略该字段时返回数据。示例:52.6178549,-155.352142
language_namestring可选。搜索引擎语言名。使用该字段时,无需再传 language_code。可通过 /v3/keywords_data/google/languages 获取可用语言列表。忽略该字段时返回所有可用语言结果。示例:English
language_codestring可选。搜索引擎语言代码。使用该字段时,无需再传 language_name。可通过 /v3/keywords_data/google/languages 获取可用语言代码。忽略该字段时返回所有可用语言结果。示例:en
sort_bystring可选。结果排序方式支持按 search_volumerelevance 降序排列。默认值:search_volume
keywords_negativearray可选。排除列表。这些词不会出现在结果中。最多可传 200 个词,系统会自动转为小写。
tagstring可选。自定义任务标识,最大长度 255。可用于请求结果匹,响应中的 data 对象会原样返回该值。

响应结构

接口返回 JSON,对象中 tasks 数组。

顶层字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger接口通用状态码
status_messagestring接口通用状态信息
timestring执行耗时,单位秒
costfloat本次请求总成本,单位 USD
tasks_countintegertasks 数组中的任务数
tasks_errorintegertasks 数组中报错的任务数
tasksarray任务结果数组

tasks[] 字段

字段名类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,通常在 10000-60000 范围
status_messagestring任务状态说明
timestring任务执行耗时,单位秒
costfloat当前任务成本,单位 USD
result_countintegerresult 数组中的结果数量
patharrayURL 路径
dataobject回显请求时提交的参数
resultarray结果数组

result[] 字段

字段名类型说明
keywordstring返回的
location_codeinteger请求对应的地域编码;无数据时为 null
language_codestring请求对应的语言代码;无数据时为 null
search_partnersboolean是否合作搜索网络数据
competitionfloat付费搜索竞争度,取值范围 01;无数据时为 null
cpcfloat历史平均点击单价(USD);无数据时为 null
search_volumeinteger月均搜索量;无数据时为 null
categoriesarray产品/服务分类列表;无数据时为 null
monthly_searchesarray最近 12 个月的月度搜索量明细;无数据时为 null

monthly_searches[] 字段

字段名类型说明
yearinteger年份
monthinteger月份
search_volumeinteger当月搜索量

请求示例

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_error
  • tasks[].status_code

当接口返回异常时,应记录以下信息,便于排查:

  • 请求参数
  • 顶层 status_code / status_message
  • 任务级 status_code / status_message
  • 响应中的 costtimeid

通用错误码与状态说明可参考 /v3/appendix/errors

使用建议

  1. 优传明确地域与语言 若业务面向特定国家/语言市场,建议显式传 location_name/location_codelanguage_name/language_code,结果过于分散。

  2. keywords_negative 过滤无词 对品牌词、招聘词、售后词等可提前排除,以减少噪音。

  3. 按需选择排序方式

  • 流量机会:使用 search_volume
  • 主题贴近度:使用 relevance
  1. 注意 CPC 与 competition 的适用场景 这两个指标更适合用于商业价值评估、投放竞争分析,不应直接等同于自然搜索 SEO 难度。

实用场景

  • 挖掘站点主题词:竞品或自有站点域名,快速获取集合,用于补栏目规划和选题。
  • 评估商业投放价值:结合 cpccompetition,识别高商业意图词, SEO 与 SEM 联动决策。
  • 发现增量机会:通过 monthly_searches 查看年度趋势,优布局季节性增长或近期升温的话题。
  • 分析竞品覆盖方向:对竞品域名批量调用接口,比较分布,定位自身空白。
  • 过滤无效流量主题:使用 keywords_negative 排除不词、低转化词或品牌干扰词,提高池质量。

统一入口:官网 · LLM API · 控制台