Lighthouse
GET /api/v1/lighthouse
Run a full Lighthouse audit on any URL — Performance, Accessibility, Best Practices and SEO category scores, plus Core Web Vitals — without installing anything. Now returns real-user CrUX field data (what Google actually ranks on) and ranked improvement opportunities, not just lab scores.
Query parameters
| Name | Type | Description |
|---|---|---|
url required | string | The page to analyse. |
device optional | string | mobile (default) or desktop. |
Request
Response
200 · application/json
- {
- "url": "https://example.com",
- "strategy": "mobile",
- "fetchedUrl": "https://example.com/",
- "lighthouseVersion": "11.0.0",
- "scores": { "performance": 92, "accessibility": 98, "bestPractices": 100, "seo": 91 },
- "metrics": {
- "firstContentfulPaint": { "value": 1120, "display": "1.1 s", "score": 0.98 },
- "largestContentfulPaint": { "value": 1840, "display": "1.8 s", "score": 0.95 },
- "totalBlockingTime": { "value": 30, "display": "30 ms", "score": 1 },
- "cumulativeLayoutShift": { "value": 0.023, "display": "0.02", "score": 1 },
- "speedIndex": { "value": 1600, "display": "1.6 s", "score": 0.97 },
- "timeToInteractive": { "value": 1680, "display": "1.7 s", "score": 0.96 }
- },
- "fieldData": {
- "hasFieldData": true,
- "url": {
- "level": "url",
- "overall": "FAST",
- "largestContentfulPaint": { "p75": 1840, "category": "FAST" },
- "interactionToNextPaint": { "p75": 120, "category": "FAST" },
- "cumulativeLayoutShift": { "p75": 5, "category": "FAST" },
- "firstContentfulPaint": { "p75": 1100, "category": "FAST" },
- "timeToFirstByte": { "p75": 600, "category": "FAST" }
- },
- "origin": {
- "level": "origin",
- "overall": "AVERAGE",
- "largestContentfulPaint": { "p75": 2400, "category": "AVERAGE" }
- }
- },
- "opportunities": [
- { "id": "render-blocking-resources", "title": "Eliminate render-blocking resources", "display": "Potential savings of 320 ms", "score": 0.5, "savingsMs": 320, "savingsBytes": null }
- ],
- "diagnostics": {
- "totalByteWeight": { "value": 1240000, "display": "Total size was 1,211 KiB", "score": 0.8 },
- "domSize": { "value": 840, "display": "840 elements", "score": 0.9 },
- "serverResponseTime": { "value": 180, "display": "Root document took 180 ms", "score": 1 },
- "mainThreadWork": { "value": 1200, "display": "1.2 s", "score": 0.7 },
- "bootupTime": { "value": 400, "display": "0.4 s", "score": 0.9 },
- "thirdPartyCount": 4
- }
- }
Response fields
| Field | Type | Description |
|---|---|---|
strategy | string | Device profile the audit ran under: mobile or desktop. |
fetchedUrl | string | The final URL Lighthouse loaded after redirects. |
scores | object | Category scores 0–100: performance, accessibility, bestPractices, seo. |
metrics | object | Lab Core Web Vitals & timings, measured in a controlled headless run. Each metric is an object with value (ms — or unitless for CLS), a human-readable display, and a 0–1 score. |
fieldData | object | CrUX real-user field data — what Google actually ranks on, gathered from real Chrome visitors over the trailing 28 days. Reports the p75 (75th-percentile) value and a FAST/AVERAGE/SLOW category per metric: LCP, INP, CLS, FCP and TTFB, plus an overall verdict. Returned at url level with an origin-level fallback for the whole site. |
fieldData.hasFieldData | boolean | false for low-traffic pages not yet in the CrUX dataset (in that case url is null — fall back to origin or the lab metrics). |
opportunities | array | Ranked, actionable fixes (e.g. render-blocking resources, unused CSS/JS, image optimisation), highest-impact first. Each has an id, title, display, 0–1 score, and estimated savings as savingsMs and/or savingsBytes. |
diagnostics | object | Page-weight, DOM and server-timing signals: totalByteWeight, domSize, serverResponseTime, mainThreadWork, bootupTime (each a value/display/score object), and a thirdPartyCount integer. |
Lighthouse runs the page in a headless browser on an emulated device, so this endpoint is slower than the static checks. See Errors.