Skip to content

lighthouse-api

Use when running Lighthouse audits, performance testing, web vitals analysis, PageSpeed Insights API calls, or CI/CD performance monitoring. Also use when working with Core Web Vitals, accessibility audits, or LHCI.

ModelSource
sonnetpack: google-apis
Full Reference

┏━ πŸ”§ lighthouse-api ━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when running Lighthouse audits, performanc… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Google’s web auditing tool for performance, accessibility, SEO, and best practices. Available as CLI, Node.js module, PageSpeed Insights API, and Lighthouse CI (LHCI).

Current version: Lighthouse 13.0.x (Chrome 143, October 2025) Β· Requires Node.js 22.19 LTS

MethodBest For
CLILocal testing, scripting, one-off audits
Node.js APIProgrammatic audits, custom flows, batch runs
PageSpeed Insights APIRemote testing without local Chrome, CrUX field data
LHCICI/CD regression prevention, historical tracking
MetricWeightGood
Total Blocking Time (TBT)30%< 200 ms
Largest Contentful Paint (LCP)25%< 2.5 s
Cumulative Layout Shift (CLS)25%< 0.1
First Contentful Paint (FCP)10%< 1.8 s
Speed Index (SI)10%< 3.4 s

FileWhat’s Inside
reference/running-audits.mdCLI flags, Node.js API, batch auditing, User Flows (Navigation / Timespan / Snapshot)
reference/performance-scoring.mdMetric weights, score ranges, Core Web Vitals (LCP / INP / CLS) thresholds + optimization
reference/pagespeed-insights-api.mdPSI endpoint, query params, rate limits, JS examples, response schema
reference/ci-integration.mdGitHub Actions workflows, performance budgets, LHCI config + commands + assertion syntax
reference/custom-config.mdLighthouse config files, throttling presets, custom audit authoring, Lighthouse 13 renamed/removed audit IDs

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.