Query search analytics
query_search_analyticsRetrieve clicks, impressions, CTR, and position from Google Search Console, broken down by query, page, country, device, or date with filters and paging.
Instructions
Queries Search Console performance: clicks, impressions, CTR, position.
Rows come back sorted by clicks. With no dimensions you get one row of totals. Data is usually two to three days behind; the most recent days are partial unless data_state is 'all'.
Args: site_url: The property, exactly as list_sites returns it. start_date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo'. end_date: Same formats. Defaults to '3daysAgo' (complete data). dimensions: Any of 'query', 'page', 'country', 'device', 'date', 'searchAppearance' (and 'hour' with data_state 'hourly_all'). Countries are ISO 3166-1 alpha-3 codes in lower case (e.g. 'gbr'); devices are DESKTOP, MOBILE or TABLET. search_type: 'web' (default), 'image', 'video', 'news', 'discover' or 'googleNews'. Discover and Google News don't support the query dimension. filters: Filters combined with AND, each {'dimension': 'query', 'operator': 'contains', 'expression': 'shoes'}. Operators: equals, notEquals, contains, notContains, includingRegex, excludingRegex (RE2 syntax; prefix '(?i)' for case-insensitive). aggregation_type: 'auto', 'byPage' or 'byProperty'. Totals by page count a URL once per result; by property count the site once. data_state: 'final' (complete days only), 'all' (includes fresh, partial data) or 'hourly_all'. row_limit: Rows to return, 1 to 25,000. Default 1,000. start_row: Zero-based offset for paging; use next_start_row from the previous call.
Note: queries Google treats as anonymised are left out of rows that have the query dimension, so those rows add up to less than the totals.
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": "query_search_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | ||
| end_date | No | 3daysAgo | |
| site_url | Yes | ||
| row_limit | No | ||
| start_row | No | ||
| data_state | No | final | |
| dimensions | No | ||
| start_date | No | 30daysAgo | |
| search_type | No | web | |
| aggregation_type | No | auto |