query_search_analytics
Retrieve Google Search Console performance metrics—clicks, impressions, CTR, position—grouped by query, page, country, device, and more, with custom filters for precise analysis.
Instructions
The core report: clicks, impressions, CTR and average position from Google Search, grouped by any combination of query, page, country, device, searchAppearance, date or hour. This is the full-control tool. For the questions people actually ask, top_queries, top_pages, striking_distance and compare_periods are one call instead of a hand-assembled body. Two things to know before reading a result as bad news. Data finalises on a two to three day lag, so a window ending today is short at the end. And Google withholds rare queries for privacy, which is why the query breakdown reliably sums to fewer clicks than the site total.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | The Search Console property. Either a URL-prefix property ("https://navid.me/", trailing slash included) or a domain property ("sc-domain:navid.me"). A bare hostname is read as a domain property. Call list_sites for the exact strings this account owns, because the two shapes are different properties and mixing them up returns a 403. | |
| type | No | Which surface to report on. Defaults to web. "discover" and "googleNews" carry no query or device dimension at all, so asking for one returns an error rather than empty rows. | |
| account | No | Which signed-in Google account to act as, by email. Omit to use the default. Call list_accounts to see what is signed in. | |
| filters | No | Combined with AND. | |
| end_date | Yes | YYYY-MM-DD, in PST. | |
| row_limit | No | Default 1000, max 25000. | |
| start_row | No | Zero-based offset, for paging past row_limit. | |
| data_state | No | "all" includes the most recent partial days, which is the only way to see the last two or three at all. Defaults to final. | |
| dimensions | No | Group-by columns, e.g. ["query"] or ["page","device"]. Omit for site totals. | |
| start_date | Yes | YYYY-MM-DD, in PST. About 16 months of history is available. | |
| aggregation_type | No |