Skip to content

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 为准。

请求参数

请求体是数组,每个数组代表一个任务对象。

参数类型说明
targetstring目标网站域名,例如 example.com
location_namestring搜索引擎地域的完整名称,例如 United States。使用此参数后,无需同时传 location_codelocation_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域。省略时返回结果。
location_codeinteger搜索引擎地域代码,例如 2840。使用此参数后,无需同时传 location_namelocation_coordinate。可通过 /v3/keywords_data/google/locations 获取可用地域代码。省略时返回结果。
location_coordinatestring地域 GPS 坐标,格式为 纬度,经度,例如 52.6178549,-155.352142。返回结果将基于该坐标所属国家。使用此参数后,无需同时传 location_namelocation_code。省略时返回结果。
language_namestring搜索引擎语言的完整名称,例如 English。使用此参数后,无需同时传 language_code。可通过 /v3/keywords_data/google/languages 获取可用语言。省略时返回所有可用语言的结果。
language_codestring搜索引擎语言代码,例如 en。使用此参数后,无需同时传 language_name。可通过 /v3/keywords_data/google/languages 获取可用语言代码。省略时返回所有可用语言的结果。
sort_bystring结果排序字段。支持 search_volumerelevance,按降序排列。默认值为 search_volume
keywords_negativearray要排除的列表。最多可传 200 个。指定的会被转换为小写,并从结果中排除。
tagstring自定义任务标识,最长 255 个字符。可用于请求和响应,指定值会在响应的 data 对象中返回。

地域和语言参数限制

以下参数每组只能选择一个:

  • location_namelocation_codelocation_coordinate
  • language_namelanguage_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 数组每个任务的处理结果。

顶层字段

字段类型说明
versionstring当前 API 版本。
status_codeinteger请求级状态码。成功通常为 20000
status_messagestring请求级提示信息。
timestring请求执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务总数。
tasks_errorintegertasks 数组中返回错误的任务数量。
tasksarray任务结果数组。

tasks 任务字段

字段类型说明
idstring任务唯一标识,UUID 格式。
status_codeinteger任务状态码,通常在 1000060000 范围。
status_messagestring任务级提示信息。
timestring任务执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的结果数量。
patharray请求 URL 路径信息。
dataobject请求中提交的任务参数。
resultarray结果数组。

状态码和错误信息请参考错误码文档。客户端应对网络异常、请求级错误和任务级错误进行处理。

result 结果字段

字段类型说明
keywordstring
location_codeinteger | null对应的地域代码。无数据时为 null
language_codestring | null对应的语言代码。无数据时为 null
search_partnersboolean是否搜索合作伙伴网络的数据。
competitionfloat | null付费搜索竞争度,表示该在付费搜索结果中的相对竞争程度,取值范围为 01。无数据时为 null
cpcfloat | null平均每次点击费用。表示历史上该的平均付费点击价格,单位为原始数据。无数据时为 null。如需人民币展示,建议结合响应头 X-SeerMarTech-Charge-CNY 的计费口径或业务汇率进行处理。
search_volumeinteger | null月均搜索量,表示指定地域和定向范围,在搜索引擎及合作伙伴网络上的近似月均搜索次数。无数据时为 null
categoriesarray | null产品和服务分类。无数据时为 null
monthly_searchesarray | null过去 12 个月的月度搜索量数据。无数据时为 null

monthly_searches 字段

字段类型说明
yearinteger年份。
monthinteger月份,通常为 112
search_volumeinteger当月近似搜索量。

响应示例

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 降序排序,优确定规划和落地页建设方向。
  • 评估商业价值,结合 cpccompetition 指标识别高转化潜力及付费竞争激烈的。
  • 分析季节性趋势,读取 monthly_searches 的近 12 个月数据,安排季节性、促销页面和投放周期。
  • 排除无词和低价值词,通过 keywords_negative 过滤品牌不词、需求词或下载类词,提升研究结果的可用性。

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