gsc_compare_periods
Join two periods on one dimension and rank the rows by click delta.
Instructions
Join two periods on one dimension and rank the rows by click delta.
Answers "what changed" without the model diffing two tables by hand. Rows present in only one period are kept, with zeros on the missing side; the biggest movers in both directions are returned, worst first. The meta counts how many rows gained and how many lost clicks. When a side was read only up to its row limit, the meta flags it: a row missing there may only be below the cut.
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": "gsc_compare_periods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Rolling window length ending today. | |
| type | No | web, image, video, news, discover or googleNews. | web |
| period | No | Named range: last_7_days, last_28_days, last_3_months, last_month, this_month, last_16_months. | |
| compare | No | Baseline: `previous` (the equally long period before) or `year` (the same period a year earlier; whole months map to the same months). | previous |
| date_to | No | End date YYYY-MM-DD. Defaults to today. | |
| filters | No | Narrow the data first: list of {dimension, operator, expression}, e.g. {"dimension":"page","operator":"contains","expression":"/blog/"}. Dimensions: query, page, country, device, searchAppearance. Operators: equals, notEquals, contains, notContains, includingRegex, excludingRegex. All must match. | |
| no_cache | No | Bypass the response cache for this call. | |
| site_url | Yes | `sc-domain:example.com` for a domain property, or `https://example.com/` with the trailing slash for a URL-prefix property. Call gsc_sites if unsure. | |
| date_from | No | Start date YYYY-MM-DD. Overrides period and days. | |
| dimension | No | One of query, page, country, device, searchAppearance. | query |
| row_limit | No | Rows returned, capped at 1000. | |
| prev_date_to | No | Baseline end YYYY-MM-DD. | |
| prev_date_from | No | Baseline start YYYY-MM-DD. Defaults to the equally long period ending the day before date_from. | |
| min_impressions | No | Drop rows below this impression count in both periods. | |
| response_format | No | `tsv` (default, compact) or `json`. | tsv |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |