Get ranking changes between two periods
get_ranking_changesCompares a current period against a comparison period and classifies movers by query or page into new, lost, improved, and declined buckets (improvement = better/lower average position). Useful for spotting what gained or lost visibility between two date ranges. limit (1-10000, default 50) applies PER BUCKET; counts gives the full size of each bucket before that cut. Each period reads its top scanLimit rows ranked by clicks (warehouse: max(limit*10, 1000), capped at 50000; live API: 25000), so counts are measured within those keys. On the warehouse every key in either period's top scanLimit is read in both periods, so new and lost are real; on the live API the two reads are independent, and a key just below one cut can show as new or lost. It is served from the GSC Wizard ClickHouse warehouse when available, otherwise the live Search Console API (see dataSource). Date range is optional: omit startDate/endDate to analyze the last 28 settled days (data lags ~2-3 days).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| endDate | No | Optional. Window end as YYYY-MM-DD (e.g. 2026-05-31). You do NOT need to know today's date or the latest available date: omit this and the server uses the latest settled Search Console date (data lags ~2-3 days behind today). Never pass null or the string "null". | |
| siteUrl | Yes | ||
| dimension | No | query | |
| startDate | No | Optional. Window start as YYYY-MM-DD (e.g. 2026-05-03). You do NOT need to know today's date. Omit BOTH startDate and endDate to analyze the last 28 settled days automatically (Search Console data lags ~2-3 days). Never pass null or the string "null". | |
| searchType | No | web | |
| comparisonEndDate | No | Optional. End of the baseline / comparison period as YYYY-MM-DD. Omit both comparison dates to use the same-length period immediately before the current window; give only this one to end a baseline of the same length here. | |
| comparisonStartDate | No | Optional. Start of the baseline / comparison period as YYYY-MM-DD. Omit both comparison dates to use the same-length period immediately before the current window; give only this one to start a baseline of the same length here. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Widget variant: "kpis", "table", or "sections". | |
| kpis | No | KPI cards (kind="kpis"). | |
| note | No | Caveat about the result, when the tool returned one. | |
| rows | No | Data rows (kind="table"). | |
| notes | No | Caveats about the result, when the tool returned several. | |
| title | No | ||
| blocks | No | Stacked sub-blocks (kind="sections"). | |
| source | No | ||
| columns | No | Column defs (kind="table"). | |
| timeZone | No | GA4 property's IANA reporting time zone. | |
| emptyText | No | ||
| siteScope | No | Set when GA4 numbers were narrowed to this site's hostnames because the property is shared with other sites. | |
| dataMaturity | No | ||
| settledThrough | No | Last day the data is complete through. | |
| comparisonHasData | No | false when the comparison period has no data at all, so there is no comparison. |