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

NameTypeDescription
url requiredstringThe page to analyse.
device optionalstringmobile (default) or desktop.

Request

Response

200 · application/json
  1. {
  2. "url": "https://example.com",
  3. "strategy": "mobile",
  4. "fetchedUrl": "https://example.com/",
  5. "lighthouseVersion": "11.0.0",
  6. "scores": { "performance": 92, "accessibility": 98, "bestPractices": 100, "seo": 91 },
  7. "metrics": {
  8. "firstContentfulPaint": { "value": 1120, "display": "1.1 s", "score": 0.98 },
  9. "largestContentfulPaint": { "value": 1840, "display": "1.8 s", "score": 0.95 },
  10. "totalBlockingTime": { "value": 30, "display": "30 ms", "score": 1 },
  11. "cumulativeLayoutShift": { "value": 0.023, "display": "0.02", "score": 1 },
  12. "speedIndex": { "value": 1600, "display": "1.6 s", "score": 0.97 },
  13. "timeToInteractive": { "value": 1680, "display": "1.7 s", "score": 0.96 }
  14. },
  15. "fieldData": {
  16. "hasFieldData": true,
  17. "url": {
  18. "level": "url",
  19. "overall": "FAST",
  20. "largestContentfulPaint": { "p75": 1840, "category": "FAST" },
  21. "interactionToNextPaint": { "p75": 120, "category": "FAST" },
  22. "cumulativeLayoutShift": { "p75": 5, "category": "FAST" },
  23. "firstContentfulPaint": { "p75": 1100, "category": "FAST" },
  24. "timeToFirstByte": { "p75": 600, "category": "FAST" }
  25. },
  26. "origin": {
  27. "level": "origin",
  28. "overall": "AVERAGE",
  29. "largestContentfulPaint": { "p75": 2400, "category": "AVERAGE" }
  30. }
  31. },
  32. "opportunities": [
  33. { "id": "render-blocking-resources", "title": "Eliminate render-blocking resources", "display": "Potential savings of 320 ms", "score": 0.5, "savingsMs": 320, "savingsBytes": null }
  34. ],
  35. "diagnostics": {
  36. "totalByteWeight": { "value": 1240000, "display": "Total size was 1,211 KiB", "score": 0.8 },
  37. "domSize": { "value": 840, "display": "840 elements", "score": 0.9 },
  38. "serverResponseTime": { "value": 180, "display": "Root document took 180 ms", "score": 1 },
  39. "mainThreadWork": { "value": 1200, "display": "1.2 s", "score": 0.7 },
  40. "bootupTime": { "value": 400, "display": "0.4 s", "score": 0.9 },
  41. "thirdPartyCount": 4
  42. }
  43. }

Response fields

FieldTypeDescription
strategystringDevice profile the audit ran under: mobile or desktop.
fetchedUrlstringThe final URL Lighthouse loaded after redirects.
scoresobjectCategory scores 0–100: performance, accessibility, bestPractices, seo.
metricsobjectLab 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.
fieldDataobjectCrUX 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.hasFieldDatabooleanfalse for low-traffic pages not yet in the CrUX dataset (in that case url is null — fall back to origin or the lab metrics).
opportunitiesarrayRanked, 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.
diagnosticsobjectPage-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.