Skip to content

Google 概览(实时)

POST /v3/dataforseo_labs/google/keyword_overview/live

本接口使用 POST /v3/dataforseo_labs/google/keyword_overview/live 获取指定的 Google 数据。响应当前每次点击费用(CPC)、付费搜索竞争度、搜索量、搜索意图、近 12 个月月度搜索量,以及 SERP 和外链信息。

通过设置 include_clickstream_data,还可以获取点击流指标,例如点击流搜索量、性别分布和年龄分布。

返回结果取决于、地区和语言的组合。可用地区与语言列表请通过以下接口查询:

https://api.seermartech.cn/v3/dataforseo_labs/locations_and_languages

**数据来源:**平台数据库。
指标基于 Google Ads 数据。数据源完成更新后,本平台通常每月更新一次指标。由于 Google 可能重新调整某个月份的搜索量,本接口也会同步更新对应数据。

请求信息

  • 请求方法:POST
  • 请求路径:/v3/dataforseo_labs/google/keyword_overview/live
  • 完整 URL:https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_overview/live
  • **请求格式:**JSON(UTF-8)
  • **请求体格式:**JSON 数组
  • **单次调用:**每个 Live API 请求只能 1 个任务 平台限流以认证说明中的 30/60/120 次/分钟规则为准
  • **并发限制:**最多同时发送 30 个请求

计费说明

每次请求单独计费。启用 include_clickstream_data: true 时,请求费用按基础费用的 2 倍计算。

参考价约 ¥0.145 / 次;启用点击流数据时,参考价约 ¥0.290 / 次。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

每个请求体是数组,并且数组中只能一个任务对象。

参数类型说明
keywordsarray要查询的列表。最多 700 个;每个最多 80 个字符、最多 10 个单词。会被转换为小写,并在结果中以独立数组返回。若某些未出现在结果中,表示数据库中没有对应数据;未返回的不计费。
location_namestring条件填地区名。未指定 location_code 时填。在 location_namelocation_code 中二选一。示例:United Kingdom
location_codeinteger条件填地区代码。未指定 location_name 时填。在 location_namelocation_code 中二选一。示例:2840
language_namestring条件填语言名。未指定 language_code 时填。在 language_namelanguage_code 中二选一。示例:English
language_codestring条件填语言代码。未指定 language_name 时填。在 language_namelanguage_code 中二选一。示例:en
include_serp_infoboolean是否返回每个的 SERP 数据结果数量、检查 URL 和 SERP 特征。默认值:false
include_clickstream_databoolean是否返回点击流指标。设为 true 时,将返回 clickstream_keyword_infokeyword_info_normalized_with_clickstreamkeyword_info_normalized_with_bing。默认值:false。启用后按双倍费用计费。
tagstring用户自定义任务标识,最多 255 个字符。可用于请求和响应,指定的值会在响应的 data 对象中返回。

规则和限制请以参考文档为准。

请求示例

cURL

bash
curl --location --request POST \
  "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_overview/live" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json" \
  --data-raw '[
    {
      "keywords": ["iphone", "iphone 16"],
      "location_name": "United States",
      "language_name": "English",
      "include_serp_info": true,
      "include_clickstream_data": true,
      "tag": "keyword-overview-demo"
    }
  ]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_overview/live"

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

payload = [
    {
        "keywords": ["iphone"],
        "location_name": "United States",
        "language_name": "English",
        "include_serp_info": True,
    }
]

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

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

TypeScript

typescript
import axios from "axios";

const response = await axios.post(
  "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_overview/live",
  [
    {
      keywords: ["iphone"],
      location_name: "United States",
      language_name: "English",
      include_serp_info: true,
    },
  ],
  {
    headers: {
      Authorization: "Bearer smt_live_YOUR_KEY",
      "Content-Type": "application/json",
    },
  }
);

const result = response.data;

if (result.status_code === 20000) {
  console.log(result);
} else {
  console.error(
    `请求失败,状态码:${result.status_code},信息:${result.status_message}`
  );
}

响应结构

响应为 JSON 对象, tasks 数组。

顶层字段

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

任务字段

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

result 字段

字段类型说明
se_typestring搜索引擎类型,通常为 google
location_codeinteger请求中的地区代码。
language_codestring请求中的语言代码。
items_countintegeritems 数组中的结果数量。
itemsarray及数据。

items 字段

字段类型说明
se_typestring搜索引擎类型。
keywordstring返回的。经过 URL 解码后,+ 会被解码为空格。
location_codeinteger / null请求中的地区代码。没有对应数据时为 null
language_codestring请求中的语言代码。
search_partnersboolean是否 Google 合作伙伴网站的数据。为 true 时, Google 及合作伙伴搜索网络;为 false 时 Google 搜索网站数据。
keyword_infoobject基础指标。
keyword_info_normalized_with_bingobject使用 Bing 搜索量归一化后的指标。
keyword_info_normalized_with_clickstreamobject使用点击流数据归一化后的指标。
clickstream_keyword_infoobject点击流指标在 include_clickstream_datatrue 时返回。
keyword_propertiesobject属性信息。
serp_infoobject / nullSERP 数据。未启用 include_serp_info 或数据库中没有对应 SERP 数据时为 null
avg_backlinks_infoobject该自然排名前 10 个网站的平均外链指标。
search_intent_infoobject搜索意图信息。

keyword_info 字段

字段类型说明
se_typestring搜索引擎类型。
last_updated_timestring数据更新时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
competitionfloat竞争度,基于 Google Ads 数据,取值范围为 01
competition_levelstring / null付费 SERP 中的竞争等级。可选值:LOWMEDIUMHIGH;未知时为 null
cpcfloat历史平均每次点击费用。
search_volumeinteger平均月搜索量,表示 Google 中该的大致搜索次数。
low_top_of_page_bidfloat广告出现在首页顶部位置所需的最低出价估计值,通常高于约 20% 的最低展示出价。
high_top_of_page_bidfloat广告出现在首页顶部位置所需的最高出价估计值,通常高于约 80% 的最低展示出价。
categoriesarray产品和服务类别。

出价数据会根据请求中的地区不同而变化。

monthly_searches 字段

keyword_info.monthly_searches 为近 12 个月的月度搜索量数组。

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger该月份的平均搜索量。

search_volume_trend 字段

表示搜索量相对于不同历史周期的变化百分比。

字段类型说明
monthlyinteger相比上个月的变化百分比。
quarterlyinteger相比上一季度的变化百分比。
yearlyinteger相比上一年的变化百分比。

归一化指标

keyword_info_normalized_with_bing

include_clickstream_datatrue 时返回。

字段类型说明
last_updated_timestring数据集更新时间,UTC 格式。
search_volumeinteger使用 Bing 搜索量归一化后的当前搜索量。
is_normalizedboolean是否已使用 Bing 数据进行归一化。
monthly_searchesarray归一化后的月度搜索量。

monthly_searches 中的对象:

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger对应月份的搜索量。

keyword_info_normalized_with_clickstream

include_clickstream_datatrue 时返回。

字段类型说明
last_updated_timestring数据集更新时间,UTC 格式。
search_volumeinteger使用点击流数据归一化后的当前搜索量。
is_normalizedboolean是否已使用点击流数据进行归一化。
monthly_searchesarray归一化后的月度搜索量。

monthly_searches 中的对象:

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger对应月份的搜索量。

clickstream_keyword_info 字段

在请求参数 include_clickstream_datatrue 时返回。

字段类型说明
search_volumeinteger月均点击流搜索量。
last_updated_timestring点击流数据集更新时间,UTC 格式。
gender_distributionobject基于点击流估算的性别分布。
age_distributionobject基于点击流估算的年龄分布。
monthly_searchesarray月度点击流搜索量。

gender_distribution

字段类型说明
femaleinteger点击流数据集中女性用户的占比或数量指标。
maleinteger点击流数据集中男性用户的占比或数量指标。

age_distribution

字段类型说明
18-24integer18 至 24 岁用户指标。
25-34integer25 至 34 岁用户指标。
35-44integer35 至 44 岁用户指标。
45-54integer45 至 54 岁用户指标。
55-64integer55 至 64 岁用户指标。

点击流 monthly_searches

字段类型说明
yearinteger年份。
monthinteger月份。
search_volumeinteger对应月份的点击流搜索量。

keyword_properties 字段

字段类型说明
se_typestring搜索引擎类型。
core_keywordstring / null同义词分组中的核心。为 null 时,表示数据库未识别出与该同义的核心词。
synonym_clustering_algorithmstring / null同义词聚类算法。可选值:keyword_metrics(基于指标)、text_processing(基于文本处理)。
keyword_difficultyinteger自然搜索前 10 名的难度,取值范围为 0100。该指标会分析 SERP 前 10 个页面的链接特征等因素。
detected_languagestring系统识别出的语言。
is_another_languageboolean识别语言是否与请求设置的语言不同。为 true 时表示不一致。

serp_info 字段

当未设置 include_serp_info: true,或数据库中没有该的 SERP 数据时,serp_infonull

字段类型说明
se_typestring搜索引擎类型。
check_urlstring对应搜索结果页的直接 URL,可用于核验结果。
serp_item_typesarraySERP 中发现的结果类型。
se_results_countstring该的搜索结果数量。
last_updated_timestringSERP 数据更新时间,UTC 格式。
previous_updated_timestring上一次 SERP 数据更新时间,UTC 格式。

serp_item_types 可能以下值:

answer_boxappcarouselmulti_carouselfeatured_snippetgoogle_flightsgoogle_reviewsthird_party_reviewsgoogle_postsimagesjobsknowledge_graphlocal_packhotels_packmaporganicpaidpeople_also_askrelated_searchespeople_also_searchshoppingtop_storiestwittervideoeventsmention_carouselrecipestop_sightsscholarly_articlespopular_productspodcastsquestions_and_answersfind_results_onstocks_boxvisual_storiescommercial_unitslocal_servicesgoogle_hotelsmath_solvercurrency_boxproduct_considerationsfound_on_webshort_videosrefine_productsexplore_brandsperspectivesdiscussions_and_forumscompare_sitescoursesai_overview

结果数据会针对以下返回:

  • organic
  • paid
  • featured_snippet
  • local_pack

该对象提供自然排名前 10 个网站的平均外链、引用页面、引用域名及排名指标。

字段类型说明
se_typestring搜索引擎类型。
backlinksfloat平均外链数量。
dofollowfloat平均 Dofollow 链接数量。
referring_pagesfloat平均引用页面数量。
referring_domainsfloat平均引用域名数量。
referring_main_domainsfloat平均引用主域名数量。
rankfloat平均排名值。
main_domain_rankfloat平均主域名排名值。
last_updated_timestring外链数据更新时间,UTC 格式。

search_intent_info 字段

字段类型说明
se_typestring搜索引擎类型,可能为 google
main_intentstring主要搜索意图。可选值:informational(信息型)、navigational(导航型)、commercial(商业调查型)、transactional(交易型)。
foreign_intentarray / null补搜索意图,取值范围同 main_intent
last_updated_timestring搜索意图数据更新时间,UTC 格式。

响应示例

json
{
  "version": "0.1.20241227",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.1845 sec.",
  "cost": 0.145,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "01234567-89ab-cdef-0123-456789abcdef",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.1600 sec.",
      "cost": 0.145,
      "result_count": 1,
      "path": [
        "v3",
        "dataforseo_labs",
        "google",
        "keyword_overview",
        "live"
      ],
      "data": {
        "api": "dataforseo_labs",
        "function": "keyword_overview",
        "se_type": "google",
        "language_code": "en",
        "location_code": 2840,
        "include_clickstream_data": true,
        "include_serp_info": true,
        "keywords": ["iphone"]
      },
      "result": [
        {
          "se_type": "google",
          "location_code": 2840,
          "language_code": "en",
          "items_count": 1,
          "items": [
            {
              "se_type": "google",
              "keyword": "iphone",
              "location_code": 2840,
              "language_code": "en",
              "search_partners": false,
              "keyword_info": {
                "se_type": "google",
                "last_updated_time": "2025-02-15 06:43:28 +00:00",
                "competition": 1,
                "competition_level": "HIGH",
                "cpc": 1.25,
                "search_volume": 368000,
                "low_top_of_page_bid": 0.85,
                "high_top_of_page_bid": 2.4,
                "categories": [10001],
                "monthly_searches": [
                  {
                    "year": 2025,
                    "month": 2,
                    "search_volume": 368000
                  }
                ],
                "search_volume_trend": {
                  "monthly": 0,
                  "quarterly": -19,
                  "yearly": 22
                }
              },
              "keyword_info_normalized_with_bing": {
                "last_updated_time": "2025-02-15 06:43:28 +00:00",
                "search_volume": 600417,
                "is_normalized": true,
                "monthly_searches": []
              },
              "keyword_info_normalized_with_clickstream": {
                "last_updated_time": "2025-02-15 06:43:28 +00:00",
                "search_volume": 1176877,
                "is_normalized": true,
                "monthly_searches": []
              },
              "clickstream_keyword_info": {
                "search_volume": 737851,
                "last_updated_time": "2025-01-04 00:08:42 +00:00",
                "gender_distribution": {
                  "female": 51,
                  "male": 49
                },
                "age_distribution": {
                  "18-24": 22,
                  "25-34": 19,
                  "35-44": 25,
                  "45-54": 32,
                  "55-64": 2
                },
                "monthly_searches": []
              },
              "keyword_properties": {
                "se_type": "google",
                "core_keyword": null,
                "synonym_clustering_algorithm": "text_processing",
                "keyword_difficulty": 89,
                "detected_language": "en",
                "is_another_language": false
              },
              "serp_info": {
                "se_type": "google",
                "check_url": "https://www.google.com/search?q=iphone&num=100&hl=en&gl=US",
                "serp_item_types": [
                  "organic",
                  "paid",
                  "images",
                  "people_also_ask"
                ],
                "se_results_count": "13380000000",
                "last_updated_time": "2025-02-26 21:10:59 +00:00",
                "previous_updated_time": "2025-01-16 07:38:29 +00:00"
              },
              "avg_backlinks_info": {
                "se_type": "google",
                "backlinks": 1333333.7,
                "dofollow": 1048624.3,
                "referring_pages": 1077104.1,
                "referring_domains": 9109.9,
                "referring_main_domains": 8417.2,
                "rank": 415.6,
                "main_domain_rank": 818.7,
                "last_updated_time": "2025-02-26 19:11:00 +00:00"
              },
              "search_intent_info": {
                "se_type": "google",
                "main_intent": "informational",
                "foreign_intent": null,
                "last_updated_time": "2023-02-28 15:25:15 +00:00"
              }
            }
          ]
        }
      ]
    }
  ]
}

错误处理

请根据顶层和任务级别的 status_codestatus_message 判断请求是否成功:

  • 顶层 status_code 表示整个 API 请求的处理状态。
  • tasks[].status_code 表示任务的处理状态。
  • tasks_error 表示失败任务数量。
  • 成功响应通常使用状态码 20000
  • 建议在客户端实现完整的异常处理、时重试和错误记录机制。

完整错误码请参考错误码文档。

实用场景

  • 评估竞争度与点击成本,筛选更商业价值的 SEO 和投放词。
  • 比较不同地区和语言的搜索量,制定本地化与海外市场扩张策略。
  • 分析近 12 个月搜索趋势,识别季节性需求并安排发布节奏。
  • 结合 SERP 特征和前 10 名页面的平均外链数据,判断自然排名的难度。
  • 启用点击流指标,分析受众的年龄与性别分布,优化定位和广告人群策略。

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