Obtain an API key from Google Cloud Console with the CrUX API enabled, or use the public endpoint with API key authentication
Send a POST request to the CrUX API endpoint (chromeuxreport.googleapis.com/v1/records:queryRecord) with an API key query parameter
Specify in the request body either a 'url' (page-level) or 'origin' (site-wide aggregate) field, and optionally a 'formFactor' (PHONE, DESKTOP, TABLET) and a 'metrics' array
Parse the response histogramTimeseries or percentiles objects for metrics including largest_contentful_paint, first_input_delay, cumulative_layout_shift, interaction_to_next_paint, and first_contentful_paint
Interpret the p75 (75th percentile) value for each metric against the Good/Needs Improvement/Poor thresholds published in the Web Vitals documentation
Known gotchas
CrUX data is only available for URLs with sufficient real-user traffic; low-traffic pages return a 404-equivalent 'NOT_FOUND' error in the response, not actual missing data
The API returns data aggregated over the trailing 28 days and updates roughly once per day; it does not provide historical trend data beyond what is in the BigQuery public dataset
Origin-level data and URL-level data can diverge significantly; a page with poor performance may not visibly drag down origin averages if it has low traffic share
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp