Compare search performance
compare_performanceCompares two periods or years of Google Search Console data, returning totals, changes, and top queries or pages with previous values to spot winners, losers, and brand trends.
Instructions
Compares a period with the one before it (or the year before).
Returns totals for both periods with the change, and, with a dimension, the top rows (e.g. top queries or pages) with their previous values. Use it for "top queries this month vs last month", winners and losers, and brand vs non-brand trends.
Args: site_url: The property, exactly as list_sites returns it. dimension: Optional 'query', 'page', 'country', 'device' or 'searchAppearance'. Leave out for totals only. start_date: Start of the current period. Default '30daysAgo'. end_date: End of the current period. Default '3daysAgo'. comparison: 'previous_period' (same length, immediately before) or 'previous_year' (same dates a year earlier). search_type: 'web' (default), 'image', 'video', 'news', 'discover' or 'googleNews'. filters: Same as query_search_analytics; applied to both periods. brand_terms: Optional brand terms, e.g. ['acme', 'acme shoes']. Adds brand and non-brand totals (queries containing any term, case insensitive) for both periods. sort_by: 'clicks', 'impressions', 'ctr', 'position', 'clicks_change', 'impressions_change' or 'position_change' (current period). descending: Sort order. Use False with 'clicks_change' for the biggest losers. row_limit: Rows to return after sorting. Default 50. fetch_limit: Rows fetched per period before joining, up to 25,000. Rows outside it count as zero, so raise it for long-tail work.
Note: changes in position are current minus previous, so negative means better. Brand plus non-brand totals are lower than the overall total because Google leaves anonymised queries out of query filters; the gap is reported as 'anonymised_or_unmatched'.
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": "compare_performance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | ||
| sort_by | No | clicks | |
| end_date | No | 3daysAgo | |
| site_url | Yes | ||
| dimension | No | ||
| row_limit | No | ||
| comparison | No | previous_period | |
| descending | No | ||
| start_date | No | 30daysAgo | |
| brand_terms | No | ||
| fetch_limit | No | ||
| search_type | No | web |