关键词
API + MCPGET/v3/gsc/keywords
对此端点的请求免费,不会消耗任何 API 单位。
查询参数
keyword_listsstring
关键词列表筛选器(JSON 字符串)。支持 include(is)、exclude(is_not)、empty(不在任何列表中)以及 not_empty(在任何列表中)。
keyword_list_idinteger
用于显示指标的现有关键词列表的 ID。
wherestring
支持的字段:
- keyword
- top_url
- url
- clicks
- impressions
- ctr
- position
筛选器为表示布尔表达式的 JSON 字符串,应遵循以下结构:
<bool_filter> ::= { "and" : <bool_filter>+ }
| { "or" : <bool_filter>+ }
| { "not" : <bool_filter> }
| <expr>
<expr> ::= {
"field" : <dimension|metric>,
? "is": <condition>,
}
<condition> ::= [ "eq", <value> ]
| [ "neq", <value> ]
| [ "gt", <value> ]
| [ "gte", <value> ]
| [ "lt", <value> ]
| [ "lte", <value> ]
| [ "substring", <value> ]
| [ "isubstring", <value> ]
| [ "phrase_match", <value> ]
| [ "iphrase_match", <value> ]
| [ "prefix", <value> ]
| [ "suffix", <value> ]
limitinteger
要返回的结果数量。
默认:1000
devicestring
按设备类型筛选(DESKTOP、MOBILE、TABLET)。如未指定,则包含所有设备。
允许的值:desktopmobiletablet
countrystring
两个字母的国家代码(ISO 3166-1 alpha-2)。
允许的值:adaeafagaialamaoarasatauawazbabbbdbebfbgbhbibjbnbobrbsbtbwbybzcacdcfcgchcickclcmcncocrcucvcyczdedjdkdmdodzeceeegesetfifjfmfofrgagbgdgegfggghgiglgmgngpgqgrgtgugyhkhnhrhthuidieiliminiqisitjejmjojpkekgkhkiknkrkwkykzlalblclilklsltlulvlymamcmdmemgmkmlmmmnmqmrmsmtmumvmwmxmymznancnengninlnonpnrnunzompapepfpgphpkplpnprpsptpyqarerorsrurwsasbscsesgshsiskslsmsnsosrstsvtdtgthtjtktltmtntotrtttwtzuaugusuyuzvcvevgvivnvuwsyeytzazmzw
search_typestring
要返回的搜索结果类型(web、image、video、news)。
允许的值:webimagevideonews
默认:web
date_tostring
历史周期的结束日期,格式为 YYYY-MM-DD。
date_fromstring必填
历史周期的开始日期,格式为 YYYY-MM-DD。
portfolio_idinteger
Portfolio ID。提供后,将在该 Portfolio 中所有已连接 GSC 的项目之间汇总数据。
project_idinteger
项目 ID。当未提供 portfolio_id 时为必填。
outputstring
输出格式。
允许的值:jsoncsvxmlphp
响应
keywordsarray<object>
keywordstring
urls_countinteger
top_urlstring or null
clicksinteger or null
impressionsinteger or null
ctrnumber or null
positionnumber or null
平均排名(小数,例如 4.7)
keyword_list_labelsarray<string>
errorstring
errorstring
errorstring
errorstring
errorstring