Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Both calls are POSTs that only read data.
- Pass origin or url, never both. Only origins and URLs with enough Chrome traffic have a record; others have none.
- Units follow the metric: LCP, INP, FCP and TTFB in milliseconds; CLS is unitless and its p75 comes back as a string (‘0.05’).
- Quota: 150 queries per minute per Google Cloud project, shared by both calls, free and not raisable.
- Every record is a 28-day rolling window ending about two days before the update; dates are Pacific Standard Time.
Endpoints
Get the latest Core Web Vitals for an origin or URL
- A POST that only reads data.
- Updated daily around 04:00 UTC, best effort; calls the same day return the same record.
Get the weekly Core Web Vitals history for an origin or URL
- A POST that only reads data.
- collectionPeriods lists the periods oldest first, and every timeseries array lines up with it by index. A period without enough data holds ‘NaN’ in densities and fractions and null in p75s.
- Updated weekly on Mondays around 04:00 UTC with data through the previous Saturday.