gsc_query
Run custom Google Search Console queries returning clicks, impressions, CTR, and position, with selectable dimensions, filters, and date ranges.
Instructions
Run an arbitrary Google Search Console Search Analytics query — the raw, flexible tool. Choose any dimensions (query, page, country, device, searchAppearance, date), an explicit date range OR a trailing days window, a row limit, and optional filters. Use dimensions:['date'] for day-by-day trends; ['country'] or ['device'] for splits; add filters to focus on a specific query or page. Windows are UTC and end ~2 days ago (GSC lag). Returns rows with keys[] plus clicks/impressions/ctr/position. Default rowLimit 100 — page with startRow when capped. Requires a paid plan (Starter+).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Trailing window in days (1–480) when startDate/endDate are omitted. Default 28. Window ends ~2 days ago (GSC lag). | |
| type | No | Search type. Default 'web'. | |
| domain | No | Bare domain, e.g. 'example.com'. Resolved to a connected GSC property. Provide this OR siteUrl. | |
| endDate | No | YYYY-MM-DD. Overrides `days`. Must be paired with startDate. | |
| filters | No | Optional filters, combined with AND. Each: {dimension, operator, expression}. e.g. {dimension:'query', operator:'contains', expression:'pricing'} or {dimension:'country', operator:'equals', expression:'usa'} (3-letter ISO) or {dimension:'device', operator:'equals', expression:'MOBILE'}. | |
| siteUrl | No | Exact GSC property instead of a domain, e.g. 'sc-domain:example.com' or 'https://example.com/'. Optional. | |
| rowLimit | No | Max rows to return (1–25000). Default 100. | |
| startRow | No | Zero-based offset for pagination. Default 0. | |
| dataState | No | 'final' (default, stable) or 'all' (includes the freshest partial data for the last ~2 days). | |
| startDate | No | YYYY-MM-DD. Overrides `days`. Must be paired with endDate. | |
| dimensions | No | Dimensions to group by. Default ['query']. |