Search Analytics query
search_analytics_queryQuery Search Console analytics for a property.
Read-through cache pattern: if the requested date range is fully in the
"stable past" (>3 days old) AND the Personal Archive has complete day
coverage for it AND search_type=web AND data_state=final, the response
is served from the archive (fast, zero GSC quota). Otherwise falls through
to the Google API. The response includes a _source field so callers
can tell which path was used.
Anonymized queries: archived rows are query-level, and Google leaves
anonymized queries out of those, so the archive only answers what it can
answer exactly: requests with the "query" dimension or a query filter,
and totals (no dimensions, or only "date", no filters) from archived
Search Console daily totals. A page, country or device breakdown without
query goes to Google while the range is inside Google's ~16-month window.
For older ranges the archive answers and adds a note saying the figures
exclude anonymized traffic and are lower than Search Console's.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | ISO date (YYYY-MM-DD). Defaults to 3 days ago (GSC ~3-day lag). | |
| site_url | Yes | Property URL exactly as returned by list_sites. | |
| row_limit | No | Max rows. Capped at 25000. Default 100. | |
| start_row | No | Pagination offset. | |
| data_state | No | "all" includes fresh data and forces Google. "final" allows archive read. | all |
| dimensions | No | Any of "query", "page", "country", "device", "date", "searchAppearance". Omitted means ["query"]; an explicit empty list [] means the property-wide total. NB: searchAppearance forces Google fetch (not in archive schema). | |
| start_date | No | ISO date (YYYY-MM-DD). Defaults to 28 days ago. | |
| search_type | No | Default "web". Non-web types always go to Google. | web |
| dimension_filter_groups | No | Raw GSC filter groups. |