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.
| Model | Source |
|---|---|
| sonnet | pack: google-apis |
Full Reference
ββ π§ lighthouse-api βββββββββββββββββββββββββββββ β Use when running Lighthouse audits, performancβ¦ β ββββββββββββββββββββββββββββββββββββββββββββββββββ
Lighthouse API
Section titled βLighthouse APIβ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
Quick Reference
Section titled βQuick Referenceβ| Method | Best For |
|---|---|
| CLI | Local testing, scripting, one-off audits |
| Node.js API | Programmatic audits, custom flows, batch runs |
| PageSpeed Insights API | Remote testing without local Chrome, CrUX field data |
| LHCI | CI/CD regression prevention, historical tracking |
Metric Weights (Performance Score)
Section titled βMetric Weights (Performance Score)β| Metric | Weight | Good |
|---|---|---|
| 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 |
Reference Index
Section titled βReference Indexβ| File | Whatβs Inside |
|---|---|
reference/running-audits.md | CLI flags, Node.js API, batch auditing, User Flows (Navigation / Timespan / Snapshot) |
reference/performance-scoring.md | Metric weights, score ranges, Core Web Vitals (LCP / INP / CLS) thresholds + optimization |
reference/pagespeed-insights-api.md | PSI endpoint, query params, rate limits, JS examples, response schema |
reference/ci-integration.md | GitHub Actions workflows, performance budgets, LHCI config + commands + assertion syntax |
reference/custom-config.md | Lighthouse 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.