Search analytics
queryRetrieve Search Console analytics rows for one property, grouped by search term, page, country, device, or date, with filters, date presets, and period comparisons.
Instructions
Search Analytics rows for one property: clicks, impressions, CTR and position grouped by up to three of query, page, country, device, date, searchAppearance. Dates are resolved server-side (presets like last_28_days, anchored to the last date with data). Value filters (contains/regex/equals) run inside Search Console; min/max metric filters and non-click sorts run on a top-5000 sample. compare=previous_period or same_period_last_year returns one merged table with server-computed deltas (position_change positive = improved) — never join two windows yourself. Rows are a paginated sample, not an exhaustive export.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Row order (default clicks desc; position sorts ascending; clicks_change requires compare). | |
| type | No | Search surface (default web). discover and googleNews have no query dimension. | |
| limit | No | Rows per page, 1-100 (default 25). | |
| anchor | No | Where preset ranges end: last_data_date (default) snaps to the newest date that has rows, avoiding the 2-3 day reporting lag; today uses the calendar date. | |
| device | No | ||
| offset | No | Rows to skip; page while has_more is true. | |
| period | No | Date range resolved server-side in the property's timezone (default last_28_days). Use custom together with start_date and end_date. | |
| compare | No | Merge a second window and return per-row deltas (default none). | |
| country | No | ISO alpha-3 country code, e.g. usa, deu. | |
| end_date | No | End date YYYY-MM-DD, only with period=custom. | |
| property | Yes | Search Console property: a URL-prefix like https://example.com/ or a domain property like sc-domain:example.com. Use list-properties first if unsure. | |
| data_state | No | all (default) includes fresh data Google may still revise; final returns only stabilized rows. | |
| dimensions | No | Row grouping, in order (default [query]). | |
| min_clicks | No | ||
| page_regex | No | Only pages matching this RE2 regex. | |
| start_date | No | Start date YYYY-MM-DD, only with period=custom. | |
| query_regex | No | Only queries matching this RE2 regex. | |
| max_position | No | ||
| min_position | No | ||
| page_contains | No | Only pages containing this text. | |
| query_contains | No | Only queries containing this text. | |
| min_impressions | No |