Search Console: Compare Periods
gsc_compare_periodsCompare organic Google Search performance of one Search Console property between two date windows: totals (clicks, impressions, CTR, position) for both with the change, and — when dimensions are given — the rows that gained and lost the most clicks (queries that fell, pages that grew, countries that shifted), each with both windows' figures and the delta. The previous window defaults to the same length immediately before the current one; pass previous_start_date and previous_end_date for year-over-year. Rows are ordered by the size of the click change; row_limit caps how many come back. Read-only.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gsc_compare_periods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | Row filters, all ANDed: each {dimension, operator, expression}. Examples: one landing page {"dimension":"page","operator":"equals","expression":"https://example.com/pricing"}; non-brand queries {"dimension":"query","operator":"notContains","expression":"acme"}; one country {"dimension":"country","operator":"equals","expression":"usa"}; mobile only {"dimension":"device","operator":"equals","expression":"MOBILE"}; a URL pattern {"dimension":"page","operator":"includingRegex","expression":"/blog/.*"}. Operators: equals, notEquals, contains, notContains, includingRegex, excludingRegex (RE2 syntax). A filtered dimension need not be a grouping dimension. | |
| end_date | No | Last day, YYYY-MM-DD or relative. The last 2-3 days are partial unless data_state is all. Default: 3 days ago. | |
| site_url | No | The Search Console property: sc-domain:example.com (a domain property) or https://example.com/ (a URL-prefix property), as gsc_list_sites lists it. A bare domain is matched against both forms. May be omitted when the connected login reaches exactly one property. | |
| row_limit | No | Rows returned, 1-5000 (default 100), the largest click changes first. | |
| dimensions | No | Break the comparison down by these dimensions (query, page, country, device, searchAppearance). Omit for totals only. | |
| start_date | No | First day, YYYY-MM-DD or relative (yesterday, 7daysAgo, 28daysAgo). Dates are Pacific time, as Search Console counts them. Default: 28 days ending 3 days ago, the freshest window whose data is final. | |
| search_type | No | Which search surface: web (default), image, video, news, discover, googleNews. Discover and Google News allow no query dimension. | |
| previous_end_date | No | Last day of the earlier window. | |
| previous_start_date | No | First day of the earlier window. Default: the window of the same length ending the day before start_date. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Per-row comparison, largest absolute click change first. | |
| site | Yes | The property read, as Google spells it. | |
| totals | Yes | Both windows' totals and the change. | |
| endDate | Yes | Last day of the window, YYYY-MM-DD. | |
| startDate | Yes | First day of the window, YYYY-MM-DD. | |
| dimensions | Yes | Dimension names, in row key order. | |
| returnedRows | Yes | Rows in `rows`. | |
| rowsCompared | Yes | Rows in either window, before row_limit. | |
| previousEndDate | Yes | Last day of the earlier window. | |
| previousStartDate | Yes | First day of the earlier window. |