Make a GET request to 'https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url={encoded-url}&strategy=mobile&key={API_KEY}'
In the response JSON, navigate to 'loadingExperience' for real-user CrUX field data and 'lighthouseResult' for synthetic Lighthouse lab data
Extract field metric values from 'loadingExperience.metrics' — each entry has a 'category' ('FAST', 'AVERAGE', 'SLOW'), 'percentile', and 'distributions' array
Extract Lighthouse scores from 'lighthouseResult.categories.performance.score' (0–1 scale) and individual audit values from 'lighthouseResult.audits'
Check 'loadingExperience.overall_category' for a high-level pass/fail signal ('FAST', 'AVERAGE', or 'SLOW') based on field data
When 'loadingExperience.initial_url' differs from your requested URL, note that the field data is from the origin level fallback, not the specific URL
Known gotchas
If the URL has no CrUX data, 'loadingExperience' will contain 'origin_fallback: true' or be sparse — do not treat missing field data as passing; it means no data, not good performance
The PSI API runs a live Lighthouse audit on each call, which can take 20–60 seconds per URL; avoid calling it in tight loops without rate limiting and caching results
Lighthouse scores in PSI use a fixed set of simulated conditions (mid-tier mobile device, throttled 4G); they may not reflect actual user experience on your site's specific audience
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