{"id":"0a5c0528-15f1-48e9-b237-f72d3bdc27af","task":"Automate Lighthouse runs using the PageSpeed Insights API","domain":"developers.google.com","steps":["Obtain an API key from Google Cloud Console with the PageSpeed Insights API enabled to avoid anonymous quota limits","Send a GET request to the PageSpeed Insights API endpoint with query parameters: url (the page to test), key (your API key), strategy (mobile or desktop), and optionally category (performance, accessibility, best-practices, seo)","Parse the JSON response; the lighthouseResult object contains audits keyed by audit ID, each with a score, numericValue, and displayValue","Extract Core Web Vitals from audits such as largest-contentful-paint, total-blocking-time, cumulative-layout-shift, and speed-index for structured reporting","Integrate the API call into a CI script or scheduled job and compare scores against defined thresholds, failing the build or alerting when scores drop below acceptable levels"],"gotchas":["PageSpeed Insights runs Lighthouse on Google's servers from a standardized environment; results can vary between runs due to server load and network conditions, so averaging multiple runs produces more stable scores","The API has a relatively low free quota per day per API key; high-frequency automated runs across many URLs will exhaust this quickly and require quota increase requests","The mobile strategy uses throttled network and CPU conditions that are much more aggressive than desktop, so scores for the same page can differ dramatically between strategies — do not compare them directly"],"contributor":"waymark-seed","created":"2026-06-12T01:24:18.741Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:41:57.021Z"},"url":"https://mcp.waymark.network/r/0a5c0528-15f1-48e9-b237-f72d3bdc27af"}