Core Web Vitals (Chrome UX Report) API
Real-user Core Web Vitals from the Chrome UX Report: LCP, INP, CLS, FCP, TTFB at p75, good / poor shares, pass / fail, by device, weekly history.
Lab tools like Lighthouse measure one synthetic load; Google's ranking signal and the "Core Web Vitals assessment" in PageSpeed Insights use field data from real Chrome users, published in the Chrome UX Report (CrUX). This endpoint queries the CrUX API for a url (one page) or an origin (scope=origin, or any URL without a path) and returns, for LCP, INP, CLS, FCP and TTFB, the 75th percentile, a rating (good, needs_improvement, poor) against Google's thresholds and the share of visits in each band, plus the Core Web Vitals verdict (passed when LCP, INP and CLS are all good at p75), p75 round-trip time, navigation types, the device mix and the 28-day collection period.
Filter by device with form_factor=phone|desktop|tablet, or get all three with form_factor=each. history=1 returns up to 40 weekly data points (weeks, default 25) from the CrUX History API, ready to chart with chart-image. Send up to 10 URLs at once with urls. Results are cached for 6 hours (CrUX updates daily with a lag of about two days).
Pages and origins need enough Chrome traffic to be in CrUX: small sites get found: false (try the origin instead of one page). Data: Chrome UX Report by Google, licensed CC BY 4.0.
Bring your own Google API key: pass it as crux_key (or the X-Crux-Key header). Creating one is free in Google Cloud (enable the Chrome UX Report API); the key is only forwarded to Google for that request and never stored or logged. APIBox does not resell access to Google APIs.
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
crux_key | query | string | yes | Your Google API key with the Chrome UX Report API enabled (or header X-Crux-Key). Forwarded to Google only, never stored. | |
url | query | string | yes | Page URL or origin (example.com = origin). | |
scope | query | string | no | auto | auto (origin when the URL has no path), url or origin. |
form_factor | query | string | no | all | all, phone, desktop, tablet or each (three results). |
history | query | boolean | no | 1: weekly p75 series from the CrUX History API. | |
weeks | query | number | no | 25 | History length, 1–40 weekly periods. |
urls | body | array | no | Batch: up to 10 URLs / origins (array or comma-separated). |
Example
curl "https://apibox.io.vn/v1/web-vitals?url=https://example.vn" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/web-vitals?url=https://example.vn', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/web-vitals?url=https://example.vn",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/web-vitals?url=https://example.vn');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"origin": "https://example.vn",
"source": "Chrome UX Report (CrUX), 28-day rolling window of real Chrome users; CrUX data by Google, CC BY 4.0",
"form_factor": "all",
"found": true,
"key": {
"origin": "https://example.vn"
},
"core_web_vitals": "passed",
"cwv_metrics_used": [
"lcp",
"inp",
"cls"
],
"metrics": {
"lcp": {
"p75": 2480,
"unit": "ms",
"rating": "good",
"distribution": {
"good": 0.7871,
"needs_improvement": 0.1371,
"poor": 0.0758
},
"thresholds": {
"good": 2500,
"poor": 4000
}
},
"inp": {
"p75": 150,
"unit": "ms",
"rating": "good",
"distribution": {
"good": 0.8,
"needs_improvement": 0.15,
"poor": 0.05
},
"thresholds": {
"good": 200,
"poor": 500
}
},
"cls": {
"p75": 0.03,
"rating": "good",
"distribution": {
"good": 0.9,
"needs_improvement": 0.06,
"poor": 0.04
},
"thresholds": {
"good": 0.1,
"poor": 0.25
}
},
"fcp": {
"p75": 1700,
"unit": "ms",
"rating": "good",
"distribution": {
"good": 0.7,
"needs_improvement": 0.2,
"poor": 0.1
},
"thresholds": {
"good": 1800,
"poor": 3000
}
},
"ttfb": {
"p75": 950,
"unit": "ms",
"rating": "needs_improvement",
"distribution": {
"good": 0.6,
"needs_improvement": 0.3,
"poor": 0.1
},
"thresholds": {
"good": 800,
"poor": 1800
}
}
},
"round_trip_time_p75_ms": 180,
"navigation_types": {
"navigate": 0.8,
"reload": 0.05,
"back_forward": 0.1
},
"form_factors": {
"phone": 0.7,
"desktop": 0.28,
"tablet": 0.02
},
"collection_period": {
"first": "2026-10-16",
"last": "2026-11-12"
}
}
Use cases
- Weekly Core Web Vitals report for client sites in Google Sheets or Looker Studio
- Alert when a release pushes INP or LCP into "poor"
- Compare mobile and desktop experience of competitors
- Track progress of a performance project over 25 weeks
FAQ
Why does my page have no data?
CrUX only publishes pages and origins with enough eligible Chrome visits. Query the origin (scope=origin), which aggregates all pages.
How is "passed" decided?
Like PageSpeed Insights: the p75 of LCP, INP and CLS must all be in the good range (2.5 s, 200 ms, 0.1). When INP has no data, LCP and CLS decide.
Why do results differ from Lighthouse?
Lighthouse is one lab run on a simulated device; CrUX is 28 days of real visits on real devices and networks.
Related APIs
URL Metadata
Fetch any URL and get its title, description, Open Graph and Twitter Card tags, favicon, canonical, feeds and JSON-LD as JSON.
H:HTTP Headers
See the HTTP status and every response header of a URL, with a summary of security headers like HSTS, CSP and X-Frame-Options.
301Redirect Checker
Follow every 301, 302, 307 and 308 redirect of a URL and get the full chain with status codes, the final URL and the number of hops.