Core Web Vitals trend
get_cwv_trendGet weekly p75 trends for Core Web Vitals on any origin or URL, with performance direction and up to 40 weeks of history from the Chrome UX Report.
Instructions
Weekly p75 trend for an origin or URL from the CrUX History API (1 request). Per metric: points — array of {period_end, p75, rating}, one per week (each week is a 28-day rolling window ending on period_end; ineligible weeks are skipped), and delta — first vs last p75 with direction improved | regressed | stable (lower is always better). Default metrics: the three Core Web Vitals; weeks caps the history depth (1..40, default 25). History data updates on Mondays. Returns {no_data: true} when CrUX has no data. Provide exactly one of origin or url.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A specific page URL, e.g. https://example.com/pricing/. Mutually exclusive with `origin`. Pass the final post-redirect URL (the API does not follow redirects); fragments and query params are stripped by the dataset. Single pages have fewer samples and often have no data — fall back to `origin` on a no_data result. | |
| weeks | No | How many weekly periods of history to analyze (1..40; default 25). | |
| origin | No | Site origin — scheme + host only, e.g. https://example.com (no path, no trailing slash). Aggregates real-user data across ALL pages of the site. Mutually exclusive with `url`. http/https and www/non-www are distinct keys; use the canonical variant. | |
| metrics | No | Metrics to trend (only p75-bearing metrics); default: the three Core Web Vitals (largest_contentful_paint, interaction_to_next_paint, cumulative_layout_shift). | |
| form_factor | No | Device class filter. Omit for the aggregated record across all devices. tablet traffic is tiny and usually has no data. |