Skip to main content
POST
类别关键词

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
category_codes
string[]
必填

产品和服务类别。必填字段。最多可指定 20 个类别;你可以下载所有可用类别的完整列表

location_name
string
必填

位置的完整名称;未指定 location_code 时为必填字段。注意:必须指定 location_name 或 location_code 之一。您可以通过向 https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages 单独发送请求,获取包含 location_name 的可用位置列表;示例:United Kingdom

location_code
integer
必填

唯一位置标识符;如果未指定 location_name,则为必填字段;注意:必须指定 location_name 或 location_code 之一;您可以通过向 https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages 单独发送请求,获取可用位置及其 location_code 的列表;示例:2840

language_name
string
必填

语言的完整名称;如果未指定 language_code,则为必填字段;注意:必须指定 language_name 或 language_code 之一;您可以通过向 https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages 单独发送请求,获取可用语言及其 language_name 的列表;示例:English

language_code
string
必填

唯一语言标识符 如果未指定 language_name,则为必填字段 注意:必须指定 language_name 或 language_code 之一 可通过向 https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages 单独发送请求,获取包含 language_code 的可用语言列表 示例:en

category_intersection
boolean

类别交集,可选字段。如果设置为 true,将获得同时属于所有指定类别的关键词;如果设置为 false,将获得属于任一指定类别的关键词;默认值:true

include_serp_info
boolean

为每个关键词包含 SERP 数据,可选字段。如果设置为 true,我们将在响应中为每个关键词返回包含 SERP 数据(搜索结果数量、相关 URL 和 SERP 特征)的 serp_info 数组。默认值:false

include_clickstream_data
boolean

在结果中包含或排除基于点击流的指标数据,可选字段;如果将该参数设置为 true,响应中将包含 clickstream_keyword_info、keyword_info_normalized_with_clickstream 和 keyword_info_normalized_with_bing 字段;默认值:false;启用此参数后,该请求将按双倍价格收费;有关基于点击流的指标计算方式的更多信息,请参阅此帮助中心文章。

ignore_synonyms
boolean

忽略高度相似的关键词,可选字段。如果设置为 true,则仅返回核心关键词,并排除所有高度相似的关键词;默认值:false

limit
integer

结果数组中的最大关键词数量。可选字段,默认值:100,最大值:1000

offset
integer

返回的关键词结果数组中的偏移量;可选字段。默认值:0。如果指定值 10,results 数组中的前十个关键词将被跳过,并提供后续关键词的数据。注意:建议仅在检索不超过 10,000 条结果时使用此参数;如需检索超过 10,000 条结果,请改用 offset_token。

offset_token
string

用于后续请求的 offset token,可选字段。在每个请求响应的同名 filed 中提供;尝试在单个请求中获取超过 10,000 条结果时,使用此参数可避免超时;通过指定响应数组中唯一的 offset_token 值,您将获得初始任务的后续结果;每个后续任务的 offset_token 值均唯一。注意:如果请求中指定了 offset_token,处理任务时将忽略除 limit 以外的所有其他参数。有关此参数的更多信息,请参阅我们的帮助中心。

filters
string[]

结果过滤参数数组,可选字段;您可以同时添加多个过滤器(最多 8 个过滤器);应在条件之间设置逻辑运算符 and、or;支持以下运算符:regex, not_regex, , , >, >=, =, , in, not_in, match, not_match, ilike, not_ilike, like, not_like;您可以将 % 运算符与 like 和 not_like 以及 ilike、not_ilike 一起使用,以匹配包含零个或多个字符的任意字符串;示例:["keyword_info.search_volume",">",0] [["keyword_info.search_volume","in",[0,1000]], "and", ["keyword_info.competition_level","=","LOW"]] [["keyword_info.search_volume",">",100], "and", [["keyword_info.cpc"," 有关过滤器的更多信息,请参阅 Dataforseo Labs – Filters 或此帮助中心指南

order_by
string[]

结果排序规则。可选字段。你可以使用与 filters 数组中相同的值对结果进行排序。可用排序类型:asc – 结果按升序排列;desc – 结果按降序排列。应使用逗号设置排序类型。示例:["keyword_info.competition,desc"]。默认规则:["keyword_info.search_volume,desc"]。请注意,单个请求中最多可以设置三条排序规则。应使用逗号分隔多条排序规则。示例:["keyword_info.search_volume,desc","keyword_info.competition,asc"]

tag
string

用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配;您将在响应的 data 对象中找到指定的 tag 值

响应

成功响应

version
string

API 的当前版本

status_code
integer

通用状态码;您可以在此处查看完整的响应码列表。注意:我们强烈建议设计必要的系统来处理相关异常或错误情况

status_message
string

常规信息消息;可在此处查看常规信息消息的完整列表

time
string

执行时间(秒)

cost
number

任务总成本(美元)

tasks_count
integer

tasks 数组中的任务数量

tasks_error
integer

返回错误的 tasks 数组中的任务数量

tasks
string[]

任务数组

tasks.id
string

任务标识符,系统中采用 UUID 格式的唯一任务标识符

tasks.status_code
integer

DataForSEO 生成的任务状态码;范围为:10000-60000;完整响应代码列表可在此处查看

tasks.status_message
string

任务的信息性消息,你可以在此处查看通用信息性消息的完整列表

tasks.time
string

执行时间(秒)

tasks.cost
number

任务成本(美元)

tasks.result_count
integer

结果数组中的元素数量

tasks.path
string[]

URL 路径

tasks.data
object

包含您在 POST 请求中指定的相同参数

tasks.result
string[]

结果数组

tasks.result.se_type
string

搜索引擎类型

tasks.result.seed_categories
string[]

POST 数组中的类别

tasks.result.location_code
integer

POST 数组中的位置代码

tasks.result.language_code
string

POST 数组中的语言代码

tasks.result.total_count
integer

数据库中与您的请求相关的结果总数

tasks.result.items_count
integer

items 数组中返回的结果数量

tasks.result.offset
integer

当前偏移量值

tasks.result.offset_token
string

用于后续请求的偏移令牌;您可以使用此字段中提供的字符串获取初始任务的后续结果;注意:每个后续任务的 offset_token 值都是唯一的

tasks.result.items
string[]

包含关键词建议及相关数据

tasks.result.items.se_type
string

搜索引擎类型

tasks.result.items.keyword
string

找到的关键词

tasks.result.items.location_code
integer

POST 数组中的位置代码

tasks.result.items.language_code
string

POST 数组中的语言代码

tasks.result.items.keyword_info
object

返回的关键词建议对应的关键词数据

tasks.result.items.keyword_info.se_type
string

搜索引擎类型

tasks.result.items.keyword_info.last_updated_time
string

关键词数据更新时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”;示例:2019-11-15 12:57:46 +00:00

tasks.result.items.keyword_info.competition
number

竞争度表示与给定关键词相关的相对竞争程度;该值基于 Google Ads 数据,取值范围为 0 到 1(含端点)

tasks.result.items.keyword_info.competition_level
string

竞争程度 表示给定关键词仅在付费 SERP 中的相对竞争程度;可能的值:LOW、MEDIUM、HIGH 如果竞争程度未知,则值为 null;有关该指标的更多信息,请参阅此帮助中心文章

tasks.result.items.keyword_info.cpc
number

每次点击费用,表示该关键词历史上每次点击的平均费用(USD)

tasks.result.items.keyword_info.search_volume
integer

平均月搜索量,表示给定关键词建议在 google.com 上的(近似)搜索次数

tasks.result.items.keyword_info.low_top_of_page_bid
number

广告在第一页顶部展示的最低出价,表示高于约 20% 的广告实际展示最低出价(基于 Google Ads 的广告主统计数据)。该值可能因 POST 请求中指定的位置而异

tasks.result.items.keyword_info.high_top_of_page_bid
number

广告在第一页顶部展示的最高出价,表示高于约 80% 的广告实际展示最低出价(基于 Google Ads 的广告主统计数据)。该值可能因 POST 请求中指定的位置而异

tasks.result.items.keyword_info.categories
string[]

产品和服务类别;您可以下载完整的可选类别列表

tasks.result.items.keyword_info.monthly_searches
string[]

月搜索量,表示指定地理位置中此关键词建议的(近似)搜索次数(可提供过去十二个月的数据)。

tasks.result.items.keyword_info.monthly_searches.year
integer

tasks.result.items.keyword_info.monthly_searches.month
integer

tasks.result.items.keyword_info.monthly_searches.search_volume
integer

月平均搜索量

tasks.result.items.keyword_info.search_volume_trend
object

搜索量趋势变化,表示与上一周期相比搜索量的百分比变化

tasks.result.items.keyword_info.search_volume_trend.monthly
integer

与上月相比的搜索量百分比变化

tasks.result.items.keyword_info.search_volume_trend.quarterly
integer

与上一季度相比的搜索量变化百分比

tasks.result.items.keyword_info.search_volume_trend.yearly
integer

与上一年相比的搜索量百分比变化

tasks.result.items.clickstream_keyword_info
object

返回关键词的点击流数据;要获取此字段的结果,必须将参数 include_clickstream_data 设置为 true

tasks.result.items.clickstream_keyword_info.search_volume
integer

月均点击流搜索量比率

tasks.result.items.clickstream_keyword_info.last_updated_time
string

点击流数据集的更新时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”

tasks.result.items.clickstream_keyword_info.gender_distribution
object

按性别划分的基于估算点击流的指标分布;有关该指标计算方式的更多信息,请参阅此帮助中心文章

tasks.result.items.clickstream_keyword_info.gender_distribution.female
integer

相关点击流数据集中的女性用户数量

tasks.result.items.clickstream_keyword_info.gender_distribution.male
integer

相关点击流数据集中的男性用户数量

tasks.result.items.clickstream_keyword_info.age_distribution
object

按年龄划分的点击流指标分布;有关该指标计算方式的更多信息,请参阅此帮助中心文章

tasks.result.items.clickstream_keyword_info.age_distribution.18-24
integer

相关点击流数据集中年龄在 18 至 24 岁范围内的用户数量

tasks.result.items.clickstream_keyword_info.age_distribution.25-34
integer

相关点击流数据集中年龄在 25-34 岁范围内的用户数量

tasks.result.items.clickstream_keyword_info.age_distribution.35-44
integer

相关点击流数据集中年龄在 35-44 岁范围内的用户数量

tasks.result.items.clickstream_keyword_info.age_distribution.45-54
integer

相关点击流数据集中年龄在 45-54 岁范围内的用户数量

tasks.result.items.clickstream_keyword_info.age_distribution.55-64
integer

相关点击流数据集中年龄在 55-64 岁范围内的用户数量

tasks.result.items.clickstream_keyword_info.monthly_searches
string[]

月度点击流搜索量;对象数组,包含某年特定月份的点击流搜索量

tasks.result.items.clickstream_keyword_info.monthly_searches.year
integer

tasks.result.items.clickstream_keyword_info.monthly_searches.month
integer

tasks.result.items.clickstream_keyword_info.monthly_searches.search_volume
integer

基于点击流的某年特定月份搜索量比率

tasks.result.items.keyword_properties
object

关于关键词的其他信息

tasks.result.items.keyword_properties.se_type
string

搜索引擎类型

tasks.result.items.keyword_properties.core_keyword
string

分组中的主要关键词,包含由同义词聚类算法确定的分组主要关键词。如果值为 null,则我们的数据库中不包含相应算法可识别为与 keyword 同义的任何关键词

tasks.result.items.keyword_properties.synonym_clustering_algorithm
string

用于识别同义词的算法;可能的值:keyword_metrics – 表示基于 keyword_info 参数的算法;text_processing – 表示基于文本的算法;如果值为 null,则表示我们的数据库不包含相应算法可识别为 keyword 同义词的任何关键词

tasks.result.items.keyword_properties.keyword_difficulty
integer

关键词进入自然搜索结果前 10 名的排名难度,以 0 到 100 的对数刻度表示关键词进入自然搜索结果前 10 名的可能性;计算时会分析 SERP 前 10 个页面的链接配置等参数;有关此指标的更多信息,请参阅此帮助中心指南

tasks.result.items.keyword_properties.detected_language
string

检测到的关键词语言表示我们的系统识别出的关键词语言。

tasks.result.items.keyword_properties.is_another_language
boolean

检测到的关键词语言与设置语言不同;如果为 true,则表示请求中设置的语言与系统为给定关键词判定的语言不匹配

tasks.result.items.keyword_properties.words_count
integer

关键词中的单词数量,表示该关键词由多少个单词组成

tasks.result.items.serp_info
object

SERP 数据。如果未在 POST 数组中将 include_serp_info 字段设置为 true,或者数据库中没有此关键词的 SERP 数据,则该值为 null

tasks.result.items.serp_info.se_type
string

搜索引擎类型

tasks.result.items.serp_info.check_url
string

搜索引擎结果的直接 URL,可用于确认我们提供的结果是否准确

tasks.result.items.serp_info.serp_item_types
string[]

SERP 中的搜索结果类型 包含在 SERP 中找到的搜索结果(项目)类型 可用的项目类型: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 元素会返回实际结果

tasks.result.items.serp_info.se_results_count
string

返回关键词的搜索结果数量

tasks.result.items.serp_info.last_updated_time
string

SERP 数据更新的日期和时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00” 示例:2019-11-15 12:57:46 +00:00

tasks.result.items.serp_info.previous_updated_time
string

SERP 数据最近一次更新之前的日期和时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”;示例:2019-11-15 12:57:46 +00:00

返回关键词的反向链接数据。此对象提供该关键词自然搜索排名前 10 的网页所拥有的平均反向链接数、引用页面数和引用域名数,以及平均排名值

搜索引擎类型

平均反向链接数

dofollow 链接的平均数量

平均引用页面数

引用域名的平均数量

平均引用主域名数量

平均排名;有关此指标及其计算公式的更多信息,请参阅此帮助中心文章

主域名平均排名;有关该指标及其计算公式的更多信息,请参阅此帮助中心文章

反向链接数据更新时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”;示例:2019-11-15 12:57:46 +00:00

tasks.result.items.search_intent_info
object

返回关键词的搜索意图信息;有关搜索意图的更多信息,请参阅此帮助中心文章

tasks.result.items.search_intent_info.se_type
string

搜索引擎类型,可选值:google

tasks.result.items.search_intent_info.main_intent
string

主要搜索意图,可能的值:informational、navigational、commercial、transactional

tasks.result.items.search_intent_info.foreign_intent
string[]

补充搜索意图,可能的值:informational、navigational、commercial、transactional

tasks.result.items.search_intent_info.last_updated_time
string

搜索意图数据最近一次更新的日期和时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00” 示例:2019-11-15 12:57:46 +00:00

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing
object

包含使用 Bing 搜索量归一化的关键词搜索量

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing.last_updated_time
string

数据集更新的日期和时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”;示例:2019-11-15 12:57:46 +00:00

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing.search_volume
integer

关键词的当前搜索量比率

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing.is_normalized
boolean

是否对关键词信息进行规范化;若为 true,则使用 Bing 数据规范化值

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing.monthly_searches
integer

月度搜索量数据,由一组对象组成,其中包含某年特定月份的搜索量数据

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing.monthly_searches.year
integer

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing.monthly_searches.month
integer

tasks.result.items.search_intent_info.keyword_info_normalized_with_bing.monthly_searches.search_volume
integer

某年特定月份的搜索量占比

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream
object

包含使用点击流数据归一化的关键词搜索量

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream.last_updated_time
string

数据集更新的日期和时间,采用 UTC 格式:“yyyy-mm-dd hh-mm-ss +00:00”;示例:2019-11-15 12:57:46 +00:00

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream.search_volume
integer

关键词的当前搜索量比率

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream.is_normalized
boolean

关键词信息是否已标准化;如果为 true,则使用点击流数据对值进行标准化

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream.monthly_searches
integer

月度搜索量数据,由一组对象组成,其中包含某年特定月份的搜索量数据

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream.monthly_searches.year
integer

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream.monthly_searches.month
integer

tasks.result.items.search_intent_info.keyword_info_normalized_with_clickstream.monthly_searches.search_volume
integer

某年特定月份的搜索量占比