POST /webmasters/v3/sites/{siteUrl}/searchAnalytics/query
Changed onQuery your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.
Request
- Base URLhttps://searchconsole.googleapis.com
- Auth
- OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/webmastersAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/webmasters
- or OAuth 2 and OAuth 2Implicithttps://accounts.google.com/o/oauth2/authScopeshttps://www.googleapis.com/auth/webmasters.readonlyAuthorization codehttps://accounts.google.com/o/oauth2/authToken URLhttps://accounts.google.com/o/oauth2/tokenScopeshttps://www.googleapis.com/auth/webmasters.readonly
Path parameters
The site's URL, including protocol. For example: http://www.example.com/.
Query parameters
V1 error format.
OAuth access token.
Data format for response.
JSONP
Selector specifying which fields to include in a partial response.
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
OAuth 2.0 token for the current user.
Returns response with indentations and line breaks.
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
Legacy upload protocol for media (e.g. "media", "multipart").
Upload protocol for media (e.g. "raw", "multipart").
Request body
[Optional; Default is "auto"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help documentation to learn how data is calculated differently by site versus by page. Note: If you group or filter by page, you cannot aggregate by property. If you specify any value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your aggregation type if the requested type is invalid.
The data state to be fetched, can be full or all, the latter including full and partial data.
[Optional] Zero or more filters to apply to the dimension grouping values; for example, 'query contains "buy"' to see only data where the query string contains the substring "buy" (not case-sensitive). You can filter by a dimension without grouping by it.
[Optional] Zero or more dimensions to group results by. Dimensions are the group-by values in the Search Analytics page. Dimensions are combined to create a unique row key for each row. Results are grouped in the order that you supply these dimensions.
[Required] End date of the requested date range, in YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal to the start date. This value is included in the range.
[Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 25,000 (inclusive).
[Optional; Default is "web"] The search type to filter for.
[Required] Start date of the requested date range, in YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or equal to the end date. This value is included in the range.
[Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number.
Optional. [Optional; Default is "web"] Type of report: search type, or either Discover or Gnews.
Response
Successful response
A list of rows, one per result, grouped by key. Metrics in each row are aggregated for all data grouped by that key either by page or property, as specified by the aggregation type parameter.
An object that may be returned with your query results, providing context about the state of the data. When you request recent data (using all or hourly_all for dataState), some of the rows returned may represent data that is incomplete, which means that the data is still being collected and processed. This metadata object helps you identify exactly when this starts and ends. All dates and times provided in this object are in the America/Los_Angeles time zone. The specific field returned within this object depends on how you've grouped your data in the request. See details in inner fields.
How the results were aggregated.
A list of rows grouped by the key values in the order given in the query.
Changes
- info
the security scope
https://www.googleapis.com/auth/webmasterswas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/webmasterswas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/webmasters.readonlywas removed from the endpoint's security schemeOauth2
1 more change in this revision
- info