Query Search Console performance data
gsc_search_analytics_queryGet clicks, impressions, CTR, and average position from Search Console, grouped by dimensions such as query, page, or device. Use this SEO analysis tool with custom date ranges.
Instructions
Returns clicks, impressions, CTR and average position from Search Console, grouped by the dimensions you choose. This is the primary SEO analysis tool. siteUrl must be the exact string from gsc_list_sites. Dates are YYYY-MM-DD only — relative forms like '28daysAgo' are NOT supported here (unlike the GA4 tools). Data lags roughly 2-3 days; use dataState='all' to include fresh partial data. Returns at most 25 rows by default while the API itself allows up to 25,000, so do not assume you are seeing everything — raise limit deliberately or narrow with filters. Page with startRow. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Search surface. Defaults to 'web'. Replaces the deprecated `searchType`. | |
| limit | No | Maximum rows to return. Defaults to 25 to protect the context window. Prefer narrowing the query over raising this. | |
| endDate | Yes | YYYY-MM-DD, inclusive. | |
| siteUrl | Yes | Exact property string from Search Console: 'https://example.com/' (URL-prefix) or 'sc-domain:example.com' (Domain). Call gsc_list_sites for valid values. | |
| startRow | No | Zero-based offset for paging. Search Console uses an offset, not a page token. | |
| dataState | No | 'final' (default) excludes incomplete data. 'all' includes fresh partial data. 'hourly_all' enables the 'hour' dimension. | |
| startDate | Yes | YYYY-MM-DD. Relative dates are NOT supported. | |
| dimensions | No | Group by these. 'hour' requires dataState='hourly_all'. Results are keyed in the order supplied. | |
| aggregationType | No | Defaults to 'auto'. Cannot be 'byProperty' when grouping or filtering by page. | |
| dimensionFilterGroups | No | Filter groups: [{ groupType: 'and', filters: [{ dimension, operator, expression }] }]. Operators: contains, equals, notContains, notEquals, includingRegex, excludingRegex (RE2 syntax). You may filter on a dimension without grouping by it. |