Skip to main content
Every Lighthouse run produces a Lighthouse Result object (LHR). The LHR is the source of truth behind the HTML report — everything you see rendered in the report is derived from it. You interact with it directly when using Lighthouse programmatically, consuming CLI JSON output, or building tooling on top of Lighthouse.

The RunnerResult object

When you call lighthouse() from Node, the return value wraps the LHR:
import lighthouse from 'lighthouse';
import * as chromeLauncher from 'chrome-launcher';

const chrome = await chromeLauncher.launch({chromeFlags: ['--headless']});
const runnerResult = await lighthouse('https://example.com', {port: chrome.port});

// The full LHR as a JS object
const lhr = runnerResult.lhr;

// The formatted report string (HTML by default)
const report = runnerResult.report;

// Check a specific score
console.log('Performance score:', lhr.categories.performance.score * 100);

await chrome.kill();
lhr
LH.Result
required
The Lighthouse Result object. Contains all audit results, scores, and metadata.
report
string | string[]
required
The formatted report. A string for single-format runs; an array when multiple --output formats are requested.
artifacts
object
required
Raw gathered artifacts from the page (traces, network logs, DOM snapshots, etc.).

Top-level LHR fields

lighthouseVersion
string
required
The version of Lighthouse that generated this result (e.g. "12.0.0").
fetchTime
string
required
ISO-8601 timestamp of when the result was generated (e.g. "2024-01-15T10:30:00.000Z").
requestedUrl
string
required
The URL that was originally passed to Lighthouse.
mainDocumentUrl
string
required
The URL of the main document request during the final navigation.
finalDisplayedUrl
string
required
The URL shown in the browser after all redirects and history API changes. Use this as the canonical URL for the run.
userAgent
string
required
The Chrome user agent string used during the audit.
categories
object
required
Category scores and audit references. See Categories.
audits
object
required
Individual audit results keyed by audit ID. See Audits.
configSettings
object
required
The resolved configuration settings used for this run. See configSettings.
timing
object
required
Timing information for the run. See Timing.
categoryGroups
object
Display groups used to visually cluster audits within a category in the HTML report.
runtimeError
object
Present when a fatal error prevented a valid result. Contains code and message fields. If set, treat the result as unreliable.
runWarnings
string[]
Top-level warnings about the run (e.g. throttling was overridden).

Example

{
  "lighthouseVersion": "12.0.0",
  "fetchTime": "2024-01-15T10:30:00.000Z",
  "requestedUrl": "https://example.com",
  "mainDocumentUrl": "https://www.example.com/",
  "finalDisplayedUrl": "https://www.example.com/",
  "categories": {},
  "audits": {},
  "configSettings": {},
  "timing": {}
}

Categories

The lhr.categories object contains one entry per scored category. Each key is the category ID (e.g. "performance").
id
string
required
The category identifier, e.g. performance, accessibility, best-practices, seo.
title
string
required
The human-readable category name shown in the report.
description
string
required
A brief description of what the category measures.
score
number | null
required
The weighted average of all audit scores in the category, in the range 01. May be null for non-scored categories.
auditRefs
object[]
required
References to the audits that contribute to this category.

Example

{
  "performance": {
    "id": "performance",
    "title": "Performance",
    "description": "These encapsulate your web app's performance...",
    "score": 0.87,
    "auditRefs": [
      {"id": "first-contentful-paint", "weight": 10, "group": "metrics"},
      {"id": "interactive", "weight": 10, "group": "metrics"}
    ]
  },
  "seo": {
    "id": "seo",
    "title": "SEO",
    "description": "These checks ensure your page is following basic SEO advice...",
    "score": 0.54,
    "auditRefs": [{"id": "crawlable-anchors", "weight": 1}]
  }
}

Audits

The lhr.audits object contains every audit result, keyed by the audit ID.
id
string
required
The audit identifier in kebab-case (e.g. "first-contentful-paint").
title
string
required
The display name of the audit. May change between pass and fail states. Supports Markdown code spans.
description
string
required
Explains why the audit matters, with links to Lighthouse documentation. Supports Markdown links.
score
number | null
required
A value in the range 01, or null when scoreDisplayMode is informative, manual, notApplicable, or error.
scoreDisplayMode
string
required
Controls how the score is rendered. See Score display modes.
displayValue
string
Human-readable summary shown alongside the audit result (e.g. "2.4 s", "5 resources found").
numericValue
number
The raw numeric value for the audit (e.g. milliseconds for timing metrics).
explanation
string
A string explaining why the audit failed.
warnings
string[]
Messages about potentially invalid or edge-case conditions.
details
object
Structured data used to render the audit’s details table in the report. Structure varies by audit type.

Example

{
  "is-on-https": {
    "id": "is-on-https",
    "title": "Does not use HTTPS",
    "description": "All sites should be protected with HTTPS... [Learn more](https://...)",
    "score": 0,
    "scoreDisplayMode": "binary",
    "displayValue": "1 insecure request found",
    "details": {
      "type": "table",
      "headings": [{"key": "url", "valueType": "url", "label": "Insecure URL"}],
      "items": [{"url": "http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"}]
    }
  }
}

Score interpretation

Audit and category scores are values between 0 and 1. The report renders them as 0–100.
RangeValueColorMeaning
0.9 – 1.090–100GreenPass
0.5 – 0.8950–89OrangeNeeds improvement
0.0 – 0.490–49RedFail
// Convert a score to the 0-100 display value
const score = lhr.categories.performance.score * 100;

if (score >= 90) console.log('Pass');
else if (score >= 50) console.log('Needs improvement');
else console.log('Fail');
Performance scores are highly sensitive to environment. Always run multiple times and average the results before drawing conclusions.

Score display modes

The scoreDisplayMode field on each audit determines how it is presented.
ModeScore valueDescription
numeric01Scored on a continuous scale. Used by most performance metrics.
binary0 or 1Pass/fail. Score is exactly 0 or 1.
informativenullNot scored. Informational only, shown as a neutral item.
manualnullRequires human review. Not automatically assessed.
notApplicablenullThe audit does not apply to this page. Hidden from the report.
errornullThe audit encountered an error and could not run.

configSettings

Reflects the configuration that was actually used for the run, after merging flags and config.
{
  "output": ["json"],
  "maxWaitForLoad": 45000,
  "throttlingMethod": "devtools",
  "throttling": {
    "rttMs": 150,
    "throughputKbps": 1638.4,
    "requestLatencyMs": 562.5,
    "downloadThroughputKbps": 1474.56,
    "uploadThroughputKbps": 675,
    "cpuSlowdownMultiplier": 4
  },
  "gatherMode": false,
  "disableStorageReset": false,
  "formFactor": "mobile",
  "blockedUrlPatterns": null,
  "onlyAudits": null,
  "onlyCategories": null,
  "skipAudits": null
}

timing

Contains performance information about the Lighthouse run itself.
FieldTypeDescription
totalnumberTotal time in milliseconds Lighthouse spent loading the page and running all audits.
{
  "total": 32189
}

Report formats

Lighthouse can produce three report formats from the same LHR.
FormatFlagDescription
HTML--output htmlSelf-contained HTML file with all styles and screenshots embedded. The default output.
JSON--output jsonThe full LHR serialized as JSON. Suitable for programmatic processing and CI integration.
CSV--output csvA flat CSV file with one row per audit. Does not include flow results.

Accessing reports programmatically

import lighthouse, {generateReport} from 'lighthouse';

const runnerResult = await lighthouse('https://example.com', {port: chrome.port});

// The LHR (structured data)
const lhr = runnerResult.lhr;
console.log('Performance:', lhr.categories.performance.score * 100);

// Generate specific formats from the same LHR
const htmlReport = generateReport(lhr, 'html');
const jsonReport = generateReport(lhr, 'json');
const csvReport  = generateReport(lhr, 'csv');
For CI use cases, consume the JSON output programmatically rather than parsing the HTML report. The LHR schema is versioned and more stable.

Viewing JSON output online

Run Lighthouse with --output=json and drag the file onto the Lighthouse Viewer to render the full HTML report in a browser without saving an HTML file locally. Reports shared from the viewer are stored as secret GitHub Gists under your account.

Build docs developers (and LLMs) love