Query search analytics
query_search_analyticsFetch Google Search Console performance metrics—clicks, impressions, CTR, and average position—grouped by dimensions and filtered, with request validation before querying Google.
Instructions
Clicks, impressions, CTR and average position from the Performance report, grouped by dimensions and filtered. Rows are sorted by clicks. Invalid combinations are rejected with an explanation before Google is called. For Discover, Images, video, Google News or the News tab, the matching query_*_analytics tool offers only what that surface supports.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | Filters, combined with AND. | |
| end_date | No | Last day (inclusive), YYYY-MM-DD in Pacific Time. Defaults to today. | |
| site_url | Yes | The property, as listed by list_sites: 'sc-domain:example.com' for a domain property or 'https://www.example.com/' for a URL-prefix property. A bare domain such as 'example.com', or any URL on the site, is resolved to the property that contains it. | |
| row_limit | No | Rows to return (1-25,000). | |
| start_row | No | Zero-based row offset, for paging. | |
| data_state | No | 'all' includes fresh data that may still change and matches the Search Console UI; 'final' is finalized data only (lags 2-3 days). | all |
| dimensions | No | Group rows by these, in order. Omit for ['query']; pass [] for property totals. searchAppearance must be the only dimension (see list_search_appearances). Discover and Google News have no query dimension. | |
| start_date | No | First day, YYYY-MM-DD in Pacific Time. Defaults to 28 days ago. | |
| search_type | No | web, image, video, news (the News tab), discover or googleNews. | web |
| aggregation_type | No | 'auto' is right almost always. byProperty cannot be used with page grouping or filters, nor with Discover or Google News. | auto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | One object per row: dimension values by name, then clicks, impressions, ctr (0-1) and position (absent for Discover and Google News). | |
| notes | No | ||
| request | Yes | The exact request body sent to Google. | |
| end_date | Yes | ||
| site_url | Yes | ||
| row_count | Yes | ||
| data_state | Yes | ||
| dimensions | Yes | ||
| start_date | Yes | ||
| search_type | Yes | ||
| next_start_row | No | Pass as start_row to fetch the next page, if there is one. | |
| aggregation_type | No | ||
| first_incomplete_date | No | ||
| first_incomplete_hour | No |