Sustained level shifts (change points)
detect_change_pointsFinds the dates where the property's clicks (or impressions) moved to a new sustained level — a step up or down that holds for several weeks, as after a Google update, a migration or a content launch — using a robust CUSUM on the weekly (default) or daily series. Each point has date, direction, before/after averages (4 observations each), change, changePct and how many following observations stayed on the new level. Isolated spikes are not change points (see detect_anomalies). Default period 52 weeks. Use to date a lasting drop or gain and then correlate with get_annotations. / Degraus sustentados na série (semanal ou diária), com antes × depois.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Window length in days (default 28). Ignored when startDate and endDate are both given. / Janela em dias. | |
| site | Yes | Property: displayName ("example.com"), Search Console siteUrl ("sc-domain:example.com", "https://www.example.com/") or numeric id. A unique substring among visible properties also works ("exam"). list_sites shows the options. / Propriedade por nome, siteUrl ou id. | |
| brand | No | all (default); branded = only queries containing one of the property's branded_terms; non-branded = the rest. Needs branded terms set on the property in the Organiq panel, otherwise invalid_argument with the panel URL. / Marca × sem marca. | |
| limit | No | Most recent change points to return (default 10). | |
| query | No | Only queries containing this text, or a regex as /…/ (e.g. "/^how to/"; no flag = case-insensitive). | |
| device | No | Device. | |
| metric | No | Metric (default clicks). | |
| country | No | Country as ISO-3166-1 alpha-3, as in Search Console: bra, usa, prt, arg. | |
| endDate | No | End yyyy-mm-dd. Default: last synced date of the property (Search Console lags ~3 days; never "today"). Every response states the period used. / Fim; padrão = última data sincronizada. | |
| startDate | No | Start yyyy-mm-dd. Default: endDate − (days − 1). | |
| searchType | No | Search type (default web). | |
| granularity | No | week (default; incomplete edge weeks dropped) or day. | |
| sensitivity | No | low = only large steps, medium (default), high = smaller steps. | |
| minChangePct | No | Minimum |after − before| / before to report (default 0.15). | |
| pageContains | No | Only pages whose URL contains this text (case-insensitive), e.g. "/blog/". |