Skip to content

Google 搜索量实时查询

本接口使用 POST /v3/keywords_data/google/search_volume/live,实时返回 Google 数据最近一个月的搜索量、过去 12 个月的搜索量趋势、平均每次点击费用(CPC)和付费搜索竞争度。

实时接口会在当前请求中直接返回结果,无需提交任务、再通过 GET 接口查询。若不要求实时返回,可使用 Standard 异步任务接口;该方式需要分别调用 POST 和 GET 接口,但通常成本更低。

> 说明:该接口基于 Google 数据能力。建议优使用 Google Ads 接口,并根据业务需求选择对应的数据源。

计费说明

本接口按请求计费。同一个请求中提交 1 个或 700 个,计费规则相同。

参考价约 ¥1.08 / 次。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求限制:

平台限流以认证说明中的 30/60/120 次/分钟规则为准。

  • 每个请求最多提交 700 个。
  • 所有请求体使用 UTF-8 编码的 JSON 格式。
  • 请求体是 JSON 数组,格式为 [{ ... }]

请求信息

http
POST https://api.seermartech.cn/v3/keywords_data/google/search_volume/live
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json

请求参数

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

字段类型说明
keywordsarray要查询的列表。最多 700 个;每个最多 80 个字符、最多 10 个单词。系统会将转换为小写,并在结果数组中分别返回。
location_namestring搜索地域的完整名称。使用该字段时,不要同时传 location_codelocation_coordinate。省略时返回范围结果。示例:London,England,United Kingdom
location_codeinteger搜索地域代码。使用该字段时,不要同时传 location_namelocation_coordinate。省略时返回范围结果。示例:2840
location_coordinatestring地理坐标,格式为 纬度,经度,例如 52.6178549,-155.352142。数据将根据该坐标所属国家返回。使用该字段时,不要同时传 location_namelocation_code。省略时返回范围结果。
language_namestring搜索语言的完整名称,例如 English。不建议在创建任务时使用此字段;指定后可能导致 Google 返回 null 搜索量。使用该字段时,不要同时传 language_code
language_codestring搜索语言代码,例如 en。不建议在创建任务时使用此字段;指定后可能导致 Google 返回 null 搜索量。使用该字段时,不要同时传 language_name
search_partnersboolean是否同时返回 Google 搜索合作伙伴网络的数据。true 表示合作伙伴网络,默认值为 false
tagstring用户自定义任务标识,最多 255 个字符。可用于请求和响应,提交的值会在响应任务的 data 对象中返回。

地域和语言列表

可通过以下接口获取可用的地域和语言:

http
GET https://api.seermartech.cn/v3/keywords_data/google/locations
GET https://api.seermartech.cn/v3/keywords_data/google/languages

语言参数建议

建议优使用地域参数确定目标市场,并谨设置 language_namelanguage_code。部分语言设置可能导致返回结果中的 search_volumenull

响应结构

接口返回 JSON 对象 tasks 数组。每个任务对应请求体中的一个任务对象。

顶层字段

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

任务字段

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

result 字段

字段类型说明
keywordstring请求中的。
location_codeinteger / null返回数据对应的地域代码。无数据时为 null
language_codestring / null返回数据对应的语言代码。无数据时为 null
search_partnersboolean是否搜索合作伙伴网络数据。
competitionfloat / null付费搜索竞争度,取值范围为 01,数值越高表示竞争越激烈。无数据时为 null
cpcfloat / null历史平均每次点击费用。无数据时为 null
search_volumeinteger / null月均搜索量。根据目标地域及是否搜索合作伙伴网络计算。无数据时为 null
categoriesarray / null对应的产品和服务类别。无数据时为 null
monthly_searchesarray / null过去 12 个月的月度搜索量数据。无数据时为 null

monthly_searches 字段

字段类型说明
yearinteger年份。
monthinteger月份,取值为 112
search_volumeinteger对应月份的搜索量。

请求示例

cURL

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/keywords_data/google/search_volume/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "location_name": "United States",
      "language_name": "English",
      "keywords": [
        "average page rpm adsense",
        "adsense blank ads how long",
        "leads and prospects"
      ]
    }
  ]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/keywords_data/google/search_volume/live"

headers = {
    "Authorization": "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
}

payload = [
    {
        "location_name": "United States",
        "language_name": "English",
        "keywords": [
            "average page rpm adsense",
            "adsense blank ads how long",
            "leads and prospects",
        ],
    }
]

response = requests.post(url, headers=headers, json=payload)
data = response.json()

if data.get("status_code") == 20000:
    print(data)
else:
    print(
        f"请求失败,状态码:{data.get('status_code')},"
        f"信息:{data.get('status_message')}"
    )

TypeScript

typescript
import axios from "axios";

const payload = [
  {
    location_name: "London,England,United Kingdom",
    language_name: "English",
    keywords: [
      "average page rpm adsense",
      "adsense blank ads how long",
      "leads and prospects",
    ],
  },
];

axios
  .post(
    "https://api.seermartech.cn/v3/keywords_data/google/search_volume/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
{
  "version": "3.20191128",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1233 sec.",
  "cost": 0.15,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": " odk2YjQxYjItM2Q4Mi00YjYxLTg0YjItOTM5Y2U1ZDY0Y2E3 ",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.1012 sec.",
      "cost": 0.15,
      "result_count": 3,
      "path": [
        "v3",
        "keywords_data",
        "google",
        "search_volume",
        "live"
      ],
      "data": {
        "api": "keywords_data",
        "function": "search_volume",
        "se": "google",
        "language_code": "en",
        "location_name": "United States",
        "keywords": [
          "average page rpm adsense",
          "adsense blank ads how long",
          "leads and prospects"
        ]
      },
      "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": 1,
              "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": 1,
              "search_volume": 10
            }
          ]
        },
        {
          "keyword": "leads and prospects",
          "location_code": 2840,
          "language_code": "en",
          "search_partners": false,
          "competition": null,
          "cpc": null,
          "search_volume": null,
          "categories": null,
          "monthly_searches": null
        }
      ]
    }
  ]
}

错误处理

建议根据顶层和任务级 status_code 判断请求是否成功:

  • 20000:请求或任务执行成功。
  • 状态码:请求或任务执行失败,应结合 status_message 进行排查。
  • tasks_error 大于 0:表示至少有一个任务返回错误。

处理批量请求时,不要只根据顶层状态判断结果,还应逐项检查 tasks 中每个任务的状态码。字段列表和错误码说明请参考错误码文档。

实用场景

  • 筛选高搜索量:按地域获取月均搜索量,建立选题和优级列表,提升自然流量获取效率。
  • 评估付费投放竞争度:结合 competitioncpc 判断竞价压力与预估获客成本,制定 Google Ads 投放策略。
  • 分析季节性趋势:读取 monthly_searches 的 12 个月数据,识别季节性需求变化,安排发布和促销活动。
  • 对比不同目标市场:按不同 location_namelocation_code 分组查询,比较各地区的搜索需求,为化 SEO 和市场拓展提供依据。
  • 构建研究:批量提交最多 700 个并实时获取结果,为 SEO 平台、规划系统或广告选词提供即时数据支持。

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