按国家/地区划分的指标
API + MCPGET/v3/gsc/metrics-by-country
对此端点的请求免费,不会消耗任何 API 单位。
查询参数
wherestring
支持的字段:
- url
Filter 为 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> ]
devicestring
按设备类型筛选(DESKTOP、MOBILE、TABLET)。如未指定,则包含所有设备。
允许的值:desktopmobiletablet
search_typestring
要返回的搜索结果类型(web、image、video、news)。
允许的值:webimagevideonews
默认:web
history_groupingstring
用于对历史数据进行分组的时间间隔。
允许的值:dailyweeklymonthly
默认:monthly
date_tostring
历史周期的结束日期,格式为 YYYY-MM-DD。
date_fromstring必填
历史周期的开始日期,格式为 YYYY-MM-DD。
portfolio_idinteger
Portfolio ID。提供后,将在该 Portfolio 中所有已连接 GSC 的项目之间汇总数据。
project_idinteger
项目 ID。当未提供 portfolio_id 时为必填。
outputstring
输出格式。
允许的值:jsoncsvxmlphp
响应
metricsarray<object>
countrystring
clicksinteger
errorstring
errorstring
errorstring
errorstring
errorstring