Docs
搜索文档...⌘K

排名历史记录

API + MCP
GET/v3/gsc/positions-history

对此端点的请求免费,不会消耗任何 API 单位。

查询参数

project_idinteger

项目 ID。当未提供 portfolio_id 时必填。

portfolio_idinteger

Portfolio ID。提供后,将汇总该 Portfolio 中所有已连接 GSC 的项目数据。

date_fromstring (date)必填

历史时间段的开始日期,格式为 YYYY-MM-DD。

date_tostring (date)

历史时间段的结束日期,格式为 YYYY-MM-DD。

history_groupingstring

用于对历史数据进行分组的时间间隔。

允许的值:dailyweeklymonthly
默认:monthly
search_typestring

要返回的搜索结果类型(网页、图片、视频、新闻)。

允许的值:webimagevideonews
默认:web
countrystring

由两个字母组成的国家/地区代码(ISO 3166-1 alpha-2)。

允许的值:adaeafagaialamaoarasatauawazba…
devicestring

按设备类型筛选(DESKTOP、MOBILE、TABLET)。如未指定,则包含所有设备。

允许的值:desktopmobiletablet
wherestring

支持的字段:

outputstring

输出格式。

允许的值:jsoncsvxmlphp

响应

metricsarray<object>
datestring (date-time)
position_11_to_20integer
position_1_to_3integer
position_21_to_50integer
position_4_to_10integer
position_51_plusinteger
totalinteger