主题
Google 建议(实时)
接口说明
/v3/dataforseo_labs/google/keyword_suggestions/live 用于根据给定的种子,返回该的搜索词建议。
该接口基于搜索算法工作:系统会在数据库中查找所有指定种子词的搜索词,并在词组前、后或中间插词。返回结果中的词序不一定与一致。
因此,这个接口非常适合批量挖掘与核心词的长尾。除本身外,返回结果还可:
- 最近一个月的搜索量
- 过去 12 个月的搜索趋势
- 当前 CPC
- 竞争度
- SERP 信息
- 难度
- 外链均值
- 搜索意图
- 点击流归一化数据(可选)
数据来源: 本平台数据库 搜索算法: 基于指定种子词的匹,返回该词并附加词的搜索词
示例
指定种子:
keyword research
可能返回的建议词:
google research keywordhow to do keyword researchkeyword competitor researchhow to do keyword research for content marketing
请求信息
请求方式: POST请求地址:
https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_suggestions/live
计费与频率限制
本接口按请求计费。 扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
若按示例响应中的单次费用 USD 0.0101 估算,则:
参考价约 ¥0.1616 / 次
如启用 include_clickstream_data=true,请求费用将翻倍。
频率限制:
- 每分钟最多
2000次 API 调用 - 最多
30个并发请求
请求体格式
所有 POST 数据均需使用 UTF-8 编码的 JSON,且请求体为 JSON 数组:
json
[
{
"keyword": "phone",
"location_code": 2840,
"language_name": "English",
"include_serp_info": true,
"include_seed_keyword": true,
"limit": 1
}
]请求参数
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 填。种子。使用 UTF-8 编码。系统会自动转换为小写。 |
location_name | string | 可选。地区完整名称。设置后可不传 location_code。如:United Kingdom。可通过 /v3/dataforseo_labs/locations_and_languages 获取可用地区列表。忽略该字段时,将返回所有可用地区的数据。 |
location_code | integer | 可选。地区编码。设置后可不传 location_name。如:2840。可通过 /v3/dataforseo_labs/locations_and_languages 获取。忽略该字段时,将返回所有可用地区的数据。 |
language_name | string | 可选。语言完整名称。设置后可不传 language_code。如:English。可通过 /v3/dataforseo_labs/locations_and_languages 获取。若省略,默认使用该地区下记录数最多的语言。 |
language_code | string | 可选。语言编码。设置后可不传 language_name。如:en。可通过 /v3/dataforseo_labs/locations_and_languages 获取。若省略,默认使用该地区下记录数最多的语言。 |
include_seed_keyword | boolean | 可选。是否在响应中的 seed_keyword_data 返回种子词自身的数据。默认 false。 |
include_serp_info | boolean | 可选。是否返回每个对应的 serp_info 数据搜索结果数、 URL、SERP 特征等。默认 false。 |
include_clickstream_data | boolean | 可选。是否返回基于点击流的指标。开启后响应中将 clickstream_keyword_info、keyword_info_normalized_with_clickstream、keyword_info_normalized_with_bing。默认 false。开启后费用翻倍。 |
exact_match | boolean | 可选。是否按精确短语匹。设为 true 时,返回结果将你指定的完整短语,但前后仍可能带有词。默认 false。 |
ignore_synonyms | boolean | 可选。是否忽略高度相似。设为 true 时返回核心,不返回高度相似词。默认 false。 |
filters | array | 可选。结果过滤条件数组。最多支持 8 个过滤条件,条件之间需使用 and / or 连接。 |
order_by | array | 可选。排序规则。可按与 filters 相同的字段进行排序,排序方式支持 asc / desc。单次请求最多支持 3 条排序规则。 |
limit | integer | 可选。返回的最大数量。默认 100,最大 1000。 |
offset | integer | 可选。结果偏移量。默认 0。例如传 10 表示跳过前 10 条结果。建议在获取不 10,000 条结果时使用。 |
offset_token | string | 可选。后续分页令牌。适合获取 10,000 条结果时使用,时。若传该字段,则除 limit 外它参数不会生效。 |
tag | string | 可选。自定义任务标识,最大长度 255。可用于请求结果对账与任务追踪。 |
过滤与排序
filters 支持的操作符
regexnot_regex<<=>>==<>innot_inmatchnot_matchilikenot_ilikelikenot_like
说明:
like/not_like/ilike/not_ilike支持使用%匹任意长度字符串- 多个条件之间使用
and/or连接 - 最多 8 个过滤条件
order_by 排序说明
asc:升序desc:降序- 多个排序条件之间使用逗号分隔
- 单次请求最多支持 3 条排序规则
响应结构
接口返回 JSON 编码数据,最外层 tasks 数组。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用状态码。错误码参考 /v3/appendix/errors。 |
status_message | string | 通用状态信息。 |
time | string | 执行耗时,单位秒。 |
cost | float | 本次请求总费用,单位 USD。 |
tasks_count | integer | tasks 数组中的任务数。 |
tasks_error | integer | 返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,范围通常为 10000-60000。 |
status_message | string | 任务状态信息。 |
time | string | 任务执行耗时。 |
cost | float | 当前任务费用,单位 USD。 |
result_count | integer | result 数组数量。 |
path | array | URL 路径。 |
data | object | 回显请求中提交的参数。 |
result | array | 获取结果数组。 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
seed_keyword | string | 请求中提交的种子。 |
seed_keyword_data | object | 种子数据。字段结构与 items[] 中单项一致在 include_seed_keyword=true 时返回。 |
location_code | integer | 请求中的地区编码,无数据时为 null。 |
language_code | string | 请求中的语言编码,无数据时为 null。 |
total_count | integer | 数据库中与请求的总结果数。 |
items_count | integer | 当前 items 数组返回的结果数量。 |
offset | integer | 当前偏移量。 |
offset_token | string | 用于获取后续分页结果的令牌。 |
items | array | 建议列表。 |
items[] 字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
keyword | string | 返回的建议。 |
location_code | integer | 地区编码。 |
language_code | string | 语言编码。 |
keyword_info | object | 基础数据。 |
clickstream_keyword_info | object | 点击流数据在 include_clickstream_data=true 时返回。 |
keyword_properties | object | 属性信息。 |
serp_info | object | SERP 数据在 include_serp_info=true 且数据库存在对应数据时返回。 |
avg_backlinks_info | object | 对应 SERP 前 10 名页面的平均外链数据。 |
search_intent_info | object | 搜索意图信息。 |
keyword_info_normalized_with_bing | object | 使用 Bing 数据归一化后的搜索量信息。 |
keyword_info_normalized_with_clickstream | object | 使用点击流数据归一化后的搜索量信息。 |
keyword_info 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
last_updated_time | string | 数据更新时间,UTC 格式,如 2019-11-15 12:57:46 +00:00。 |
competition | float | 竞争度,范围 0-1,基于广告数据。 |
competition_level | string | 竞价竞争等级付费搜索维度。可能值:LOW、MEDIUM、HIGH。未知时为 null。 |
cpc | float | 平均每次点击成本,单位 USD。 |
search_volume | integer | 月均搜索量。 |
low_top_of_page_bid | float | 首页顶部广告最低参考出价。 |
high_top_of_page_bid | float | 首页顶部广告较高参考出价。 |
categories | array | 产品/服务分类。 |
monthly_searches | array | 过去 12 个月每月搜索量。 |
search_volume_trend | object | 搜索量趋势变化。 |
monthly_searches[]
| 字段名 | 类型 | 说明 |
|---|---|---|
year | integer | 年份。 |
month | integer | 月份。 |
search_volume | integer | 该月搜索量。 |
search_volume_trend
| 字段名 | 类型 | 说明 |
|---|---|---|
monthly | integer | 相比上月的搜索量变化百分比。 |
quarterly | integer | 相比上季度的搜索量变化百分比。 |
yearly | integer | 相比去年的搜索量变化百分比。 |
clickstream_keyword_info 字段
当 include_clickstream_data=true 时返回。
| 字段名 | 类型 | 说明 |
|---|---|---|
search_volume | integer | 基于点击流计算的月均搜索量。 |
last_updated_time | string | 点击流数据集更新时间。 |
gender_distribution | object | 性别分布。 |
age_distribution | object | 年龄分布。 |
monthly_searches | array | 按月的点击流搜索量。 |
gender_distribution
| 字段名 | 类型 | 说明 |
|---|---|---|
female | integer | 点击流数据中的女性用户数。 |
male | integer | 点击流数据中的男性用户数。 |
age_distribution
| 字段名 | 类型 | 说明 |
|---|---|---|
18-24 | integer | 18-24 岁用户数。 |
25-34 | integer | 25-34 岁用户数。 |
35-44 | integer | 35-44 岁用户数。 |
45-54 | integer | 45-54 岁用户数。 |
55-64 | integer | 55-64 岁用户数。 |
keyword_properties 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
core_keyword | string | 同义词聚类中的核心。若无可识别同义词则为 null。 |
synonym_clustering_algorithm | string | 同义词识别算法。可能值:keyword_metrics、text_processing。 |
keyword_difficulty | integer | 难度,范围 0-100。数值越高,自然搜索前 10 越困难。 |
detected_language | string | 系统识别出的语言。 |
is_another_language | boolean | 识别语言是否与请求设定语言不同。 |
words_count | integer | 词数。 |
serp_info 字段
若未设置 include_serp_info=true 或数据库无对应 SERP 数据,则该字段为 null。
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
check_url | string | 搜索结果直达链接,可用于核验结果。 |
serp_item_types | array | SERP 中出现的结果类型。 |
se_results_count | string | 搜索结果数量。 |
last_updated_time | string | 最近一次 SERP 数据更新时间。 |
previous_updated_time | string | 上一次 SERP 数据更新时间。 |
支持识别的 serp_item_types括:
answer_box, app, carousel, multi_carousel, featured_snippet, google_flights, google_reviews, third_party_reviews, google_posts, images, jobs, knowledge_graph, local_pack, hotels_pack, map, organic, paid, people_also_ask, related_searches, people_also_search, shopping, top_stories, twitter, video, events, mention_carousel, recipes, top_sights, scholarly_articles, popular_products, podcasts, questions_and_answers, find_results_on, stocks_box, visual_stories, commercial_units, local_services, google_hotels, math_solver, currency_box, product_considerations, found_on_web, short_videos, refine_products, explore_brands, perspectives, discussions_and_forums, compare_sites, courses, ai_overview
注意:返回详细结果的通常
organic、paid、featured_snippet、local_pack。
avg_backlinks_info 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型。 |
backlinks | float | 平均外链数。 |
dofollow | float | 平均 dofollow 外链数。 |
referring_pages | float | 平均引荐页面数。 |
referring_domains | float | 平均引荐域名数。 |
referring_main_domains | float | 平均主域名数。 |
rank | float | 平均 Rank 值。 |
main_domain_rank | float | 平均主域 Rank 值。 |
last_updated_time | string | 外链数据更新时间。 |
search_intent_info 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索引擎类型可能为 google。 |
main_intent | string | 主搜索意图。可能值:informational、navigational、commercial、transactional。 |
foreign_intent | array | 补搜索意图。 |
last_updated_time | string | 搜索意图数据更新时间。 |
keyword_info_normalized_with_bing 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 数据集更新时间。 |
search_volume | integer | 当前搜索量。 |
is_normalized | boolean | 是否已使用 Bing 数据归一化。 |
monthly_searches | array | 按月归一化搜索量。 |
keyword_info_normalized_with_clickstream 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
last_updated_time | string | 数据集更新时间。 |
search_volume | integer | 当前搜索量。 |
is_normalized | boolean | 是否已使用点击流数据归一化。 |
monthly_searches | array | 按月归一化搜索量。 |
认证方式
请在请求头中使用 Bearer Token:
http
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json请求示例
cURL
bash
curl --location --request POST "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_suggestions/live" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
{
"keyword": "phone",
"language_name": "English",
"location_code": 2840,
"include_serp_info": true,
"include_seed_keyword": true,
"limit": 1
}
]'Python
python
import requests
url = "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_suggestions/live"
payload = [
{
"keyword": "phone",
"location_name": "United States",
"language_name": "English",
"include_serp_info": True,
"include_seed_keyword": True,
"limit": 1
}
]
headers = {
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
result = response.json
if result.get("status_code") == 20000:
print(result)
else:
print(f"error. Code: {result.get('status_code')} Message: {result.get('status_message')}")TypeScript
typescript
import axios from "axios";
const postArray = [
{
keyword: "phone",
location_code: 2840,
language_name: "English",
include_serp_info: true,
include_seed_keyword: true,
limit: 1
}
];
axios({
method: "post",
url: "https://api.seermartech.cn/v3/dataforseo_labs/google/keyword_suggestions/live",
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json"
},
data: postArray
})
.then((response) => {
// 返回结果数据
console.log(response.data);
})
.catch((error) => {
console.log(error);
});响应示例
json
{
"version": "0.1.20240801",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.2704 sec.",
"cost": 0.0101,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"data": {
"api": "dataforseo_labs",
"function": "keyword_suggestions",
"se_type": "google",
"keyword": "phone",
"location_code": 2840,
"language_code": "en",
"include_serp_info": true,
"include_seed_keyword": true,
"limit": 1
},
"result": [
{
"seed_keyword_data": {
"keyword_info": {
"monthly_searches": [],
"search_volume_trend": {
"monthly": 22,
"quarterly": 22,
"yearly": 0
}
}
},
"clickstream_keyword_info": null,
"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=w+CAIQIFISCQs2MuSEtepUEUK33kOSuTsc",
"serp_item_types": [],
"se_results_count": 19880000000,
"last_updated_time": "2024-07-15 00:43:34 +00:00",
"previous_updated_time": "2024-05-18 22:29:28 +00:00"
},
"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
},
"search_intent_info": {
"se_type": "google",
"main_intent": "navigational",
"foreign_intent": [],
"last_updated_time": "2023-03-02 03:54:21 +00:00"
},
"avg_backlinks_info": {
"se_type": "google",
"backlinks": 6835.7,
"dofollow": 3775.6,
"referring_pages": 5352.2,
"referring_domains": 1100.3,
"referring_main_domains": 955.1,
"rank": 369.3,
"main_domain_rank": 681.2,
"last_updated_time": "2024-07-14 21:43:39 +00:00"
},
"keyword_info_normalized_with_bing": {
"last_updated_time": "2024-08-17 01:41:37 +00:00",
"search_volume": 324416,
"is_normalized": true,
"monthly_searches": []
},
"keyword_info_normalized_with_clickstream": {
"last_updated_time": "2024-08-11 13:24:34 +00:00",
"search_volume": 368000,
"is_normalized": true,
"monthly_searches": []
}
},
{
"location_code": 2840,
"language_code": "en",
"total_count": 3488300,
"items_count": 1,
"offset": 0,
"offset_token": "eyJDdXJyZW50T2Zmc2V0IjoxLCJSZXF1ZXN0RGF0YSI6eyJrZXl3b3JkIjoicGhvbmUiLCJpbmNsdWRlX3NlZWRfa2V5d29yZCI6dHJ1ZSwiZnVsbF9tYXRjaCI6ZmFsc2UsImxvYWRfc2VycF9pbmZvIjp0cnVlLCJzZWFyY2hfYWZ0ZXJfdG9rZW4iOm51bGwsImlnbm9yZV9zeW5vbnltcyI6ZmFsc2UsImxhbmd1YWdlIjoiZW4iLCJzZWFyY2hfZW5naW5lIjoiZ29vZ2xlIiwibG9jYXRpb24iOjI4NDAsInVzZV9uZXdfY2F0ZWdvcmllcyI6dHJ1ZSwib3JkZXJfYnkiOnsib3JkZXJfZmllbGQiOiJrZXl3b3JkX2luZm8uc2VhcmNoX3ZvbHVtZSIsIm9yZGVyX3R5cGUiOiJEZXNjIiwibmV4dCI6bnVsbH0sImxpbWl0IjoxLCJvZmZzZXQiOjAsImFpZCI6MTUzNX0sIlJhd1F1ZXJ5IjpudWxsLCJJZCI6Ijc0MjcwOGQwLWZjMjgtNDMwZi04NzA3LTRhZmVjYmJkNDgwZCIsIlNlYXJjaEFmdGVyRGF0YSI6WzE4MzAwMDAsIjkwYzI4YjVjLWVmNWQtNGUwMi04MGU2LTBkYThkZjQyZDY0NyJdfQ==",
"items": [
{
"keyword_info": {
"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": 0,
"detected_language": "en",
"is_another_language": false,
"words_count": 3
},
"serp_info": {
"se_type": "google",
"check_url": "https://www.google.com/search?q=boost%20cell%20phone&num=100&hl=en&gl=US&gws_rd=cr&ie=UTF-8&oe=UTF-8&glp=1&uule=w+CAIQIFISCQs2MuSEtepUEUK33kOSuTsc",
"serp_item_types": [],
"se_results_count": 115000000,
"last_updated_time": "2024-08-04 08:25:36 +00:00",
"previous_updated_time": "2024-06-22 17:54:36 +00:00"
},
"avg_backlinks_info": {
"se_type": "google",
"backlinks": 4739.3,
"dofollow": 2334.9,
"referring_pages": 4121.3,
"referring_domains": 210.3,
"referring_main_domains": 184.2,
"rank": 113.1,
"main_domain_rank": 512.4,
"last_updated_time": "2024-08-04 08:25:38 +00:00"
},
"search_intent_info": {
"se_type": "google",
"main_intent": "transactional",
"foreign_intent": null,
"last_updated_time": "2023-12-14 04:27:21 +00:00"
},
"keyword_info_normalized_with_bing": {
"last_updated_time": "2024-08-17 06:05:32 +00:00",
"search_volume": 2893,
"is_normalized": true,
"monthly_searches": []
},
"keyword_info_normalized_with_clickstream": {
"last_updated_time": "2024-08-17 06:05:32 +00:00",
"search_volume": 197,
"is_normalized": true,
"monthly_searches": []
}
}
]
}
]
}
]
}错误处理
建议对以下两层状态进行同时处理:
- 顶层状态
status_codestatus_message
- 任务层状态
tasks[].status_codetasks[].status_message
完整错误码与状态说明可参考 /v3/appendix/errors。 生产环境中建议为时、参数错误、限流、空结果、分页令牌失效等建立专门处理逻辑。
使用建议
- 需要获取种子词本身的数据时,开启
include_seed_keyword - 需要分析 SERP 特征时,开启
include_serp_info - 需要更真实的搜索需求估算时,可开启
include_clickstream_data,但应注意费用翻倍 - 获取海量结果时优使用
offset_token,不要依赖大offset - 若要减少高度相似词干扰,可设置
ignore_synonyms=true
实用场景
- 挖掘长尾词库:围绕核心词批量扩展该词的搜索词,快速搭建选题池与 SEO 词库。
- 筛选高潜力:结合
search_volume、cpc、competition和keyword_difficulty,优找出流量价值高且优化难度可控的词。 - 分析搜索意图:利用
search_intent_info区分信息型、商业型、交易型,提升页与落地页匹度。 - 识别 SERP 机会位:通过
serp_info.serp_item_types判断是否存在精选摘要、本地、问答等展示位,制定抢占策略。 - 评估竞争强度:结合
avg_backlinks_info与难度,预估首页所需的与外链,支持 SEO 资源分。