Skip to content

Google 创意(实时)

POST /v3/dataforseo_labs/google/keyword_ideas/live

接口说明

该接口用于基于一组种子,返回与所属产品/服务类别的创意。系统会对提交的种子词进行类别识别,并从同类中生成的搜索词建议。

一次请求最多可传 200 个种子,返回结果中可:

  • 建议本身
  • 最近一个月搜索量
  • 过去 12 个月搜索趋势
  • 当前 CPC(单次点击成本)
  • 竞争度与竞争等级
  • 点击量与 CPC 的最小值、最大值、平均值数据
  • 可选的 SERP 信息
  • 可选的点击流归因数据

数据源: 本平台数据库(按产品类别分段) 搜索算法: 基于性的同类目检索

示例说明

当传种子词:

  • keyword research
  • content marketing

且不附加额外排序参数,并设置 "closely_variants": false 时,可能返回的创意:

  • free adword tools
  • find longtail keywords
  • how to do keywords research
  • seo keyword research template

请求信息

POSThttps://api.seermartech.cn/v3/dataforseo_labs/google/keyword_ideas/live

计费说明

该接口按请求计费。

原文未提供固定单价,因此无法直接换算为人民币。 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

调用限制

  • 每分钟最多:2000 次 API 调用
  • 最大并发请求数:30

请求体格式

所有 POST 数据需使用 JSON(UTF-8 编码),并按数组形式提交:

json
[
 {
 "keywords": ["phone", "watch"],
 "location_code": 2840,
 "language_code": "en",
 "include_serp_info": true,
 "limit": 3
 }
]

请求参数

以下为任务设置字段说明。

字段名类型说明
keywordsarray。种子数组,UTF-8 编码。最多可提交 200 个。系统会将统一转换为小写。
location_namestring地区名。当未提供 location_code 时填。在 location_namelocation_code 中二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区列表。示例:United Kingdom
location_codeinteger地区唯一标识。当未提供 location_name 时填。在 location_namelocation_code 中二选一。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区编码。示例:2840
language_namestring语言名,可选。填写后可不再传 language_code。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用语言。示例:English。如省略,将默认使用该地区中记录最多的语言。
language_codestring语言代码,可选。填写后可不再传 language_name。示例:en。如省略,将默认使用该地区中记录最多的语言。
closely_variantsboolean搜索模式,可选。true 表示基于短语匹;false 表示基于广泛匹。默认:false
ignore_synonymsboolean是否忽略高度相似,可选。true 时返回核心,排除高相似词。默认:false
include_serp_infoboolean是否为每个返回 SERP 数据,可选。true 时响应中会 serp_info 数组。默认:false
include_clickstream_databoolean是否返回点击流指标,可选。true 时响应中会 clickstream_keyword_infokeyword_info_normalized_with_clickstreamkeyword_info_normalized_with_bing。默认:false开启后请求价格翻倍,扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
limitinteger返回数量上限,可选。默认:700,最大:1000
offsetinteger结果偏移量,可选。默认:0。例如设置为 10,则跳过前 10 条结果并返回后续。建议在获取不 10,000 条结果时使用。
offset_tokenstring后续翻页令牌,可选。用于获取 10,000 条结果时的后续数据,单次请求时。该值来自上一响应中的同名字段。若请求中传 offset_token,除 limit 外的参数将被忽略。
filtersarray结果过滤条件数组,可选。最多支持 8 个过滤条件,条件间可使用 andor。支持操作符:regexnot_regex<<=>>==<>innot_inmatchnot_matchilikenot_ilikelikenot_likelike/not_like/ilike/not_ilike 支持 % 通。注意:不能按 relevance 过滤。
order_byarray排序规则,可选。可使用与 filters 相同的字段进行排序。支持 asc(升序)和 desc(降序)。默认按 relevance 排序,以返回最的创意。relevance 用于排序,不能作为过滤字段,也不会出现在 result 中。一次请求最多设置 3 条排序规则。
tagstring自定义任务标识,可选。最大长度 255。可用于将响应结果与业务任务,返回时会出现在响应 data 对象中。

过滤与排序补说明

filters 支持说明

  • 最多 8 个条件
  • 条件之间使用逻辑连接符:and / or
  • 支持模糊匹、正则、比较、集合判断等常用方式
  • 不能使用 relevance 作为过滤字段

示例:

json
[
 ["keyword_info.search_volume", ">", 1000],
 "and",
 ["keyword_properties.keyword_difficulty", "<=", 30]
]

order_by 支持说明

默认 relevance 降序返回,即优给出与种子词最的建议。 如需自定义排序,可传排序字段与方向。

示例:

json
[
 "keyword_info.search_volume,desc",
 "keyword_properties.keyword_difficulty,asc"
]

响应结构

接口返回 JSON 编码数据,最外层 tasks 数组。

顶层字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger局状态码
status_messagestring局状态信息
timestring执行耗时(秒)
costfloat请求总费用,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorinteger返回错误的任务数量
tasksarray任务结果数组

tasks[] 字段

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

result[] 字段

字段名类型说明
se_typestring搜索引擎类型
seed_keywordsarray请求中提交的种子。返回时会对编码进行解码,+ 会被解析为空格。
location_codeinteger请求中的地区编码
language_codestring请求中的语言代码
total_countinteger数据库中与请求的总结果数
items_countinteger当前 items 中返回的结果数
offsetinteger当前偏移量
offset_tokenstring下一页请求使用的偏移令牌
itemsarray创意及指标

items[] 字段说明

基础字段

字段名类型说明
se_typestring搜索引擎类型
keywordstring返回的创意
location_codeinteger地区编码
language_codestring语言代码

keyword_info

基础指标对象。

字段名类型说明
se_typestring搜索引擎类型
last_updated_timestring数据更新时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
competitionfloat竞争度,基于 Google Ads 数据,取值 0-1
competition_levelstring竞争等级反映付费搜索竞争程度。可能值:LOWMEDIUMHIGH;未知时为 null
cpcfloat平均单次点击成本(USD)
search_volumeinteger平均月搜索量
low_top_of_page_bidfloat首页顶部广告展示的低位出价参考值
high_top_of_page_bidfloat首页顶部广告展示的高位出价参考值
categoriesarray产品/服务类别列表
monthly_searchesarray最近 12 个月的月度搜索量
search_volume_trendobject搜索量趋势变化

monthly_searches[]

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

search_volume_trend

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

clickstream_keyword_info

点击流指标。在 include_clickstream_data=true 时返回。

字段名类型说明
search_volumeinteger基于点击流估算的月均搜索量
last_updated_timestring点击流数据更新时间
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 岁用户数量

keyword_properties

附加属性。

字段名类型说明
se_typestring搜索引擎类型
core_keywordstring同义词聚类后的核心;若无可识别同义词则为 null
synonym_clustering_algorithmstring同义词识别算法。可能值:keyword_metricstext_processing;无结果时为 null
keyword_difficultyinteger难度,0-100,表示自然搜索前 10 名的难度
detected_languagestring系统识别出的语言
is_another_languageboolean识别语言是否与请求语言不同
words_countinteger词数

serp_info

SERP 数据。若未设置 include_serp_info=true,或库中无该词 SERP 数据,则返回 null

字段名类型说明
se_typestring搜索引擎类型
check_urlstring可直接访问的搜索结果页 URL,用于校验结果
serp_item_typesarraySERP 中出现的结果类型
se_results_countstring搜索结果数量
last_updated_timestring最近一次 SERP 数据更新时间
previous_updated_timestring上一次 SERP 数据更新时间

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

注意:结果会针对 organicpaidfeatured_snippetlocal_pack 返回。

该对象表示在该下,自然排名前 10 网页的平均外链能力指标。

字段名类型说明
se_typestring搜索引擎类型
backlinksfloat平均外链数
dofollowfloat平均 dofollow 链接数
referring_pagesfloat平均引荐页面数
referring_domainsfloat平均引荐域名数
referring_main_domainsfloat平均主域名数
rankfloat平均 Rank 值
main_domain_rankfloat平均主域 Rank 值
last_updated_timestring外链数据更新时间

search_intent_info

搜索意图信息。

字段名类型说明
se_typestring搜索引擎类型,当前可能值为 google
main_intentstring主搜索意图:informationalnavigationalcommercialtransactional
foreign_intentarray补搜索意图,取值同上
last_updated_timestring搜索意图数据更新时间

keyword_info_normalized_with_bing

基于 Bing 搜索量归一化后的搜索量数据。

字段名类型说明
last_updated_timestring数据更新时间
search_volumeinteger当前搜索量
is_normalizedboolean是否已归一化;true 表示使用 Bing 数据归一化
monthly_searchesarray月度搜索量数据

keyword_info_normalized_with_clickstream

基于点击流数据归一化后的搜索量数据。

字段名类型说明
last_updated_timestring数据更新时间
search_volumeinteger当前搜索量
is_normalizedboolean是否已归一化;true 表示使用点击流数据归一化
monthly_searchesarray月度搜索量数据

请求示例

cURL

bash
curl --location --request POST "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_ideas/live" \
 --header "Authorization: Bearer smt_live_YOUR_KEY" \
 --header "Content-Type: application/json" \
 --data-raw '[
 {
 "keywords": ["phone", "watch"],
 "location_code": 2840,
 "language_code": "en",
 "include_serp_info": true,
 "limit": 3
 }
 ]'

Python

python
import requests

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

payload = [
 {
 "keywords": ["phone", "watch"],
 "location_name": "United States",
 "language_name": "English",
 "filters": [
 ["keyword_info.search_volume", ">", 10]
 ],
 "limit": 3
 }
]

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

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

TypeScript

typescript
import axios from "axios";

const postArray = [
 {
 keywords: ["phone", "watch"],
 location_code: 2840,
 language_name: "English",
 filters: [
 ["keyword_info.search_volume", ">", 10]
 ],
 limit: 3
 }
];

axios({
 method: "post",
 url: "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_ideas/live",
 headers: {
 Authorization: "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
 },
 data: postArray
})
 .then((response) => {
 // 返回结果
 console.log(response.data);
 })
 .catch((error) => {
 console.error(error);
 });

响应示例

json
{
 "version": "0.1.20240801",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "0.7097 sec.",
 "cost": 0.0103,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "api": "dataforseo_labs",
 "function": "keyword_ideas",
 "se_type": "google",
 "keywords": ["phone", "watch"],
 "location_code": 2840,
 "language_code": "en",
 "include_serp_info": true,
 "limit": 3
 },
 "result": [
 {
 "location_code": 2840,
 "language_code": "en",
 "total_count": 533763,
 "items_count": 3,
 "offset": 0,
 "offset_token": "eyJDdXJyZW50T2Zmc2V0IjozLCJSZXF1ZXN0RGF0YSI6...",
 "items": [
 {
 "se_type": "google",
 "keyword": "phone",
 "location_code": 2840,
 "language_code": "en",
 "keyword_info": {
 "se_type": "google",
 "last_updated_time": "2024-08-11 18:11:54 +00:00",
 "competition": 1,
 "competition_level": "HIGH",
 "cpc": 1.05,
 "search_volume": 22200,
 "low_top_of_page_bid": 0.31,
 "high_top_of_page_bid": 1.15,
 "monthly_searches": [],
 "search_volume_trend": {
 "monthly": 22,
 "quarterly": 22,
 "yearly": 0
 }
 },
 "clickstream_keyword_info": null,
 "keyword_properties": {
 "se_type": "google",
 "core_keyword": null,
 "synonym_clustering_algorithm": "text_processing",
 "keyword_difficulty": 83,
 "detected_language": "en",
 "is_another_language": false,
 "words_count": 1
 },
 "serp_info": {
 "se_type": "google",
 "check_url": "https://www.google.com/search?q=phone&num=100&hl=en&gl=US&gws_rd=cr&ie=UTF-8&oe=UTF-8&glp=1&uule=...",
 "serp_item_types": ["organic", "paid"],
 "se_results_count": 19880000000,
 "last_updated_time": "2024-07-14 21:43:34 +00:00",
 "previous_updated_time": "2024-05-18 19:29:28 +00:00"
 }
 }
 ]
 }
 ]
 }
 ]
}

状态码与异常处理

  • 顶层 status_code 表示整次请求的处理结果
  • tasks[].status_code 表示单个任务的处理结果
  • 建议同时检查:
  • HTTP 状态码
  • 顶层 status_code
  • 任务级 tasks[].status_code

如需完整错误码说明,请参考 /v3/appendix/errors

使用建议

  1. 默认按 relevance 排序 如果目标是拿到最的扩展,建议不主动覆盖默认排序。

  2. 大结果集优使用 offset_token 当结果数可能 10,000 时,使用 offset 容易带来性能和时问题,建议改用 offset_token 翻页。

  3. 按需开启 SERP 与点击流数据

  • 开启 include_serp_info 可增强 SERP 侧分析能力
  • 开启 include_clickstream_data 可获得更丰富的人群与归一化搜索量指标,但会提高扣费
  1. 过滤再分页 对于海量结果,建议通过 filters 控制范围,再合 limitoffset_token 拉取,无效数据传输。

实用场景

  • 扩展种子词库:基于已有核心词批量挖掘同类,快速补 SEO规划和广告投放词。
  • 筛选低难度机会词:结合 keyword_properties.keyword_difficultykeyword_info.search_volume,找出“有量但竞争相对低”的长尾词。
  • 评估商业投放价值:通过 cpccompetitioncompetition_level 判断商业价值, SEM 出价与预算分。
  • 识别搜索趋势变化:利用 monthly_searchessearch_volume_trend 跟踪热度变化,及时调整专题和季节性运营策略。
  • 分析 SERP 版位结构:开启 include_serp_info 后识别对应的 SERP 特征类型,判断该词更适合做自然排名、地图优化还是精选摘要争夺。

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