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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_url": "<site_url>"
},
"name": "search_analytics_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Optional. The last N days ending on end_date (so days=28 is the 28 days to 3 days ago). Use instead of start_date, not with it. | |
| intent | No | Optional: the user's goal in a few words. No site names or URLs. | |
| 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. Ignored with "hour", which needs Google's hourly data state. | all |
| dimensions | No | Any of "query", "page", "country", "device", "date", "hour", "brandedClassification", "searchAppearance". Omitted means ["query"]; an explicit empty list [] means the property-wide total. "hour", "brandedClassification" and "searchAppearance" always go to Google (not in the archive). "hour" covers about the last 10 days; keys are hour starts in Pacific time ("2026-11-14T13:00:00-08:00"), and without dates it defaults to the last 3 days through today. "brandedClassification" splits traffic into "BRANDED" and "NON_BRANDED" (Google's own classification, data from 2026-02-21, top-level properties only). Filter on it the same way, e.g. only non-branded queries: [{"filters": [{"dimension": "brandedClassification", "operator": "equals", "expression": "NON_BRANDED"}]}] | |
| start_date | No | ISO date (YYYY-MM-DD). Defaults to 28 days ago. | |
| search_type | No | Default "web". "webMultimodal" is web results reached by an image search (Google Lens, Circle to Search). Non-web types always go to Google. | web |
| dimension_filter_groups | No | Raw GSC filter groups. Google itself takes only groupType "and"; an "or" group is accepted here when all its filters are on one of query, page, country or device. |