# Bulk Lighthouse Audit: Core Web Vitals, Page Speed & SEO Scores (`actorfactory/lighthouse-audit`) Actor

Run Google Lighthouse on a list of URLs or a sitemap to test website performance: performance, accessibility, best-practices and SEO scores, Core Web Vitals lab metrics (LCP, CLS, TBT, FCP) and the top fixes per page, on mobile and desktop, with alerts when scores drop. No API key.

- **URL**: https://apify.com/actorfactory/lighthouse-audit.md
- **Developed by:** [Actor Factory](https://apify.com/actorfactory) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.00 / 1,000 lighthouse audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bulk Lighthouse Audit: Core Web Vitals, Page Speed & SEO Scores

Run **Google Lighthouse** in bulk to test **website performance** on many pages at once: a list of URLs, a **sitemap**, or both. Each page gets the four Lighthouse scores (**performance, accessibility, best practices, SEO**), the **Core Web Vitals lab metrics** (LCP, CLS, TBT, FCP, Speed Index, TTFB), page weight and request count, the **top performance fixes** with estimated savings, and every **failed accessibility, best-practices and SEO audit**. Audit on **mobile** (Lighthouse's default mobile profile), **desktop** or both, take the **median of 3 or 5 runs**, and keep the full **HTML report**. Schedule it with **Monitor score changes** on and every row says whether the page's scores **dropped**, improved or stayed the same since earlier runs. Lighthouse 13 runs in its own headless Chrome inside the actor, so there is **no API key, no quota** and no rate limit to manage.

### What Lighthouse data you get

| Field | Description |
|---|---|
| `url`, `final_url` | The audited page and where it ended up after redirects |
| `device` | `mobile` or `desktop` |
| `http_status` | HTTP status of the page |
| `performance_score`, `accessibility_score`, `best_practices_score`, `seo_score` | Lighthouse category scores, 0 to 100 |
| `lcp_ms`, `cls`, `tbt_ms`, `fcp_ms`, `speed_index_ms`, `tti_ms`, `ttfb_ms` | Lab metrics: Largest Contentful Paint, Cumulative Layout Shift, Total Blocking Time, First Contentful Paint, Speed Index, Time to Interactive, server response time |
| `total_byte_weight_kb`, `request_count`, `dom_size` | Page weight in KiB, number of requests, DOM elements |
| `main_thread_ms`, `js_execution_ms` | Main-thread work and JavaScript execution time |
| `top_fixes` | Failing performance insights, biggest saving first: `{id, title, display_value, savings_ms, savings_bytes, metric_savings, score}` |
| `accessibility_issues`, `best_practices_issues`, `seo_issues` | Failed audits per category, highest weight first: `{id, title, items, weight}` |
| `runs`, `performance_scores` | Number of runs behind the row and the performance score of each |
| `warnings` | Lighthouse warnings (redirects, slow page load, ...) |
| `report_url` | Full Lighthouse HTML report (with **Save the HTML report**) |
| `lighthouse_version`, `benchmark_index` | Lighthouse version and the CPU benchmark of the machine that ran it |
| `change_status`, `dropped_categories` | With **Monitor score changes**: `new`, `unchanged`, `dropped` or `improved` against earlier runs, and which categories dropped |
| `previous_performance_score`, `previous_accessibility_score`, `previous_best_practices_score`, `previous_seo_score` | Median score of the page's earlier audits (up to 5) |
| `performance_change`, `accessibility_change`, `best_practices_change`, `seo_change` | Score now minus the earlier median (negative = worse) |
| `previous_audits`, `previous_audit_at` | How many earlier audits were compared and when the last one ran |
| `status`, `error_code`, `error` | `ok` or `error`, with the Lighthouse error code and reason |
| `scraped_at` | When the audit ran (ISO 8601) |

### How to run a bulk Lighthouse audit

| Input | Description |
|---|---|
| `urls` | Pages to audit, one per line |
| `sitemapUrl` | Optional sitemap to take pages from (XML, index, `.xml.gz` or text) |
| `maxUrlsFromSitemap` | How many pages to take from the sitemap (default 50) |
| `device` | `mobile` (default), `desktop` or `both` (one row per device) |
| `categories` | Lighthouse categories to run (default all four) |
| `runsPerUrl` | 1 to 5. With 3 or 5, the run with the median performance score is reported |
| `saveHtmlReport` | Save each audit's HTML report and link it in `report_url` (free) |
| `monitor` | Compare each page with its earlier audits and flag drops (free; for scheduled runs) |
| `monitorStoreName` | Name of the key-value store that keeps the score history (default `lighthouse-monitor`; one per project) |
| `dropThreshold` | Points a score must fall or rise to count as a change (default 10) |
| `confirmDrops` | Re-audit pages whose performance dropped and keep the better run (charged as an extra run) |
| `maxAudits` | Stop after this many successful audits (one page on one device) |

```json
{
    "urls": ["https://crawlee.dev/", "https://crawlee.dev/js/docs/quick-start"],
    "sitemapUrl": "https://www.example.com/sitemap.xml",
    "maxUrlsFromSitemap": 20,
    "device": "both",
    "runsPerUrl": 3,
    "saveHtmlReport": true,
    "maxAudits": 100
}
```

### Output example

```json
{
    "url": "https://crawlee.dev/",
    "final_url": "https://crawlee.dev/",
    "device": "mobile",
    "http_status": 200,
    "performance_score": 66,
    "accessibility_score": 95,
    "best_practices_score": 73,
    "seo_score": 92,
    "fcp_ms": 1925,
    "lcp_ms": 4248,
    "tbt_ms": 601,
    "cls": 0.001,
    "speed_index_ms": 4684,
    "ttfb_ms": 12,
    "total_byte_weight_kb": 1913,
    "request_count": 86,
    "dom_size": 729,
    "top_fixes": [
        { "id": "cache-insight", "title": "Use efficient cache lifetimes", "display_value": "Est savings of 783 KiB", "savings_ms": 2500, "savings_bytes": 801455, "metric_savings": { "FCP": 150, "LCP": 2500 }, "score": 0 },
        { "id": "render-blocking-insight", "title": "Render-blocking requests", "display_value": "Est savings of 1,130 ms", "savings_ms": 1150, "savings_bytes": null, "metric_savings": { "FCP": 1150, "LCP": 1150 }, "score": 0 }
    ],
    "accessibility_issues": [
        { "id": "color-contrast", "title": "Background and foreground colors do not have a sufficient contrast ratio.", "items": 10, "weight": 7 }
    ],
    "seo_issues": [
        { "id": "link-text", "title": "Links do not have descriptive text", "items": 2, "weight": 1 }
    ],
    "runs": 2,
    "performance_scores": [66, 68],
    "lighthouse_version": "13.6.0",
    "status": "ok",
    "scraped_at": "2026-11-16T07:01:12.000Z"
}
```

The Output tab has four ready-made tables: **Scores**, **Core Web Vitals & weight**, **Fixes & issues** and **Score changes**. The run's `OUTPUT` record has average performance per device, counts of audits and errors, and with monitoring a `monitor` section listing every page that dropped or improved.

### Monitoring score drops

Turn on `monitor` and schedule the actor (daily or weekly) in Apify Console. Each audit is compared with the **median of the page's last 5 audits** on the same device, kept in a named key-value store in your account (`monitorStoreName`). A category counts as **dropped** when it falls by at least `dropThreshold` points (default 10, because single Lighthouse runs drift by several points). Comparing against a median, not just the last run, keeps one noisy run from raising an alarm; `confirmDrops` goes further and re-audits a page whose performance dropped, keeping the better run.

```json
{
    "sitemapUrl": "https://www.example.com/sitemap.xml",
    "maxUrlsFromSitemap": 30,
    "device": "mobile",
    "monitor": true,
    "monitorStoreName": "example-com-weekly",
    "dropThreshold": 10,
    "confirmDrops": true
}
```

Rows with `change_status: "dropped"` are your alerts: filter on them in a webhook, Make, Zapier or n8n, or read the `monitor.drops` list in the `OUTPUT` record. The first run of a page is `new`. Monitoring itself is free; you pay only for the audits.

### How much does a Lighthouse audit cost?

Pay per event:

- **$0.02 per audit** (`audit`): one page on one device with all selected categories. `device: both` is two audits per page.
- **$0.01 per extra run** (`extra-run`) when `runsPerUrl` is above 1. A median of 3 runs costs $0.04 per page and device.
- Monitoring (`monitor`) costs nothing extra; `confirmDrops` re-runs are charged as extra runs.
- A tiny start fee per run. **Failed audits are free** (DNS errors, pages that return an error, pages blocked by `robots.txt`). Volume discounts apply on higher Apify plans.

Examples: 100 pages on mobile cost $2. 100 pages on mobile and desktop with a median of 3 runs cost $8. Use `maxAudits` to cap the cost of a run.

### Use cases

- Core Web Vitals and page-speed checks for a whole site from its sitemap
- Scheduled monitoring: get the pages whose performance, accessibility or SEO score dropped after a release
- Accessibility and SEO audits at scale for agencies and site owners
- Competitor benchmarking: compare scores and page weight across sites
- Before/after reports for performance work, with saved HTML reports as evidence

### Limits & notes

- **Lab data, not field data.** Scores come from a Lighthouse run, like PageSpeed Insights' lab section or Chrome DevTools. They do not include real-user CrUX data. Mobile uses Lighthouse's default simulated throttling (slow 4G, 4x CPU slowdown), desktop uses its desktop profile.
- **Scores vary between runs** by a few points, as with any Lighthouse tool. Use `runsPerUrl: 3` or `5` for steadier numbers. `benchmark_index` shows the CPU speed of the machine that ran the audit.
- **Speed:** audits run one after another (parallel audits on one machine distort the scores), about 10 to 30 seconds per audit with the default 8 GB of memory, so 100 pages take roughly 20 to 50 minutes. Chrome needs CPU: below 8 GB scores get noisier, and the minimum is 4 GB. More memory does not raise the cost per audit much, because the run finishes sooner.
- **One fresh Chrome per run:** no cache, cookies or logged-in state, like a first visit.
- **Polite by design:** each site's `robots.txt` is checked first and pages disallowed for `Chrome-Lighthouse` or `LighthouseAudit` are skipped (free). The browser identifies itself with Lighthouse's standard device user agent plus `Chrome-Lighthouse LighthouseAudit/1.0` and a link to this page, and audits of the same site are spaced out. Sites that block automated visitors return an error row instead of a score; nothing is done to get around blocks. Only audit sites you are allowed to test.
- Pages behind a login cannot be audited.

### Integrations and API

Run it from your own code with the [Apify API](https://docs.apify.com/api/v2) or the official Python and JavaScript clients:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("actorfactory/lighthouse-audit").call(run_input={
    "urls": ["https://crawlee.dev/"],
    "device": "mobile",
    "maxAudits": 3,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["url"], row["device"], row["performance_score"], row["lcp_ms"], row["cls"])
```

- **Schedule it** (daily or weekly) in Apify Console to track scores over time, and send results to Google Sheets, Slack, email or a webhook, or connect it to Make, Zapier or n8n.
- **Use it from AI agents** (Claude, ChatGPT, Cursor) through the [Apify MCP server](https://mcp.apify.com), so an agent can audit pages and explain the fixes.
- **Export** results as JSON, CSV, Excel or HTML from the Output tab, or read them from the dataset API.

### Related Actors

- [SEO Site Audit Crawler & Broken Link Checker](https://apify.com/actorfactory/seo-site-audit): crawl a whole site for broken links, redirects, titles, meta tags and canonical problems
- [Sitemap URL Extractor: Every URL from Any Website Sitemap](https://apify.com/actorfactory/sitemap-extractor): list and filter a site's URLs before auditing them
- [PDF & Image to Text OCR: Scanned PDFs, Photos & Screenshots](https://apify.com/actorfactory/pdf-ocr-text): extract text from PDFs and images by URL

### FAQ

**Is this the same as PageSpeed Insights?** It runs the same open-source Lighthouse engine with the same mobile profile, so lab scores are comparable, but it runs on Apify's machines instead of Google's. Expect differences of a few points, as between any two Lighthouse machines. PageSpeed Insights' field data (CrUX) is not included.

**Do I need a Google API key?** No. Lighthouse runs inside the actor; there is no PageSpeed Insights API call and no quota.

**Why did a page fail?** `error_code` tells you: `DNS_FAILURE` (the host does not exist), `ERRORED_DOCUMENT_REQUEST` (the page answered with an error status, e.g. 403 from a bot blocker or 404), `NO_FCP` (nothing was painted), `BLOCKED_BY_ROBOTS_TXT` or `PAGE_HUNG`. Failed audits are not charged.

**How do I get steadier scores?** Set `runsPerUrl` to 3 or 5. The row then shows the run with the median performance score (all its metrics and fixes come from that run), and `performance_scores` lists every run so you can see the spread.

**How do I get alerts when a score drops?** Turn on `monitor`, schedule the actor, and add a webhook or integration that reacts to rows with `change_status: "dropped"` (or to the `monitor.drops` list in `OUTPUT`). Keep the same `monitorStoreName`, device and categories between runs so the comparison is like for like.

**Can I audit a whole site?** Yes: put its sitemap in `sitemapUrl` and set `maxUrlsFromSitemap`. To find pages that are not in the sitemap, crawl the site first with the [SEO Site Audit Crawler & Broken Link Checker](https://apify.com/actorfactory/seo-site-audit).

**What is a good Lighthouse score?** Lighthouse marks 90–100 as good (green), 50–89 as needs improvement (orange) and 0–49 as poor (red). For Core Web Vitals, an LCP of 2.5 s or less and a CLS of 0.1 or less count as good.

# Actor input Schema

## `urls` (type: `array`):

Pages to audit, one per line (full URLs with https://). Each page is audited once per device. You can also give a sitemap below, or both.

## `sitemapUrl` (type: `string`):

Optional. A sitemap to take page URLs from (XML, sitemap index, .xml.gz or plain text), e.g. https://www.example.com/sitemap.xml. Sitemap indexes are followed. Pages are audited in sitemap order, up to the limit below.

## `maxUrlsFromSitemap` (type: `integer`):

How many page URLs to take from the sitemap.

## `device` (type: `string`):

Which Lighthouse device profile to use. Both gives one row per device, so two audits per page.

## `categories` (type: `array`):

Lighthouse categories to run. Leave all four for the full report; performance alone is a little faster.

## `runsPerUrl` (type: `integer`):

Lighthouse scores vary from run to run. With 3 or 5 runs, the run with the median performance score is reported (all its metrics and fixes) and every run's performance score is listed. Each extra run is charged as an extra-run event.

## `saveHtmlReport` (type: `boolean`):

Also save Lighthouse's full HTML report for each audit in the run's key-value store and link it in report_url (the same report you see in Chrome DevTools). Free.

## `monitor` (type: `boolean`):

Compare each page's scores with its earlier audits (the median of up to 5 previous runs, kept in a named key-value store in your account) and mark the row new, unchanged, dropped or improved. Free: it uses the audits you already pay for.

## `monitorStoreName` (type: `string`):

Name of the key-value store that keeps the score history. Use one name per project or client (letters, digits and hyphens), e.g. acme-weekly. The store stays in your account between runs.

## `dropThreshold` (type: `integer`):

How many points a score must fall (or rise) against the earlier median to count as dropped (or improved). Single Lighthouse runs drift by up to 10 points, so values below 5 flag noise.

## `confirmDrops` (type: `boolean`):

When the performance score dropped, audit the page once more and keep the better run, so one slow run does not raise an alarm. Each confirmation run is charged as an extra-run event.

## `maxAudits` (type: `integer`):

Stop after this many successful audits (one audit = one page on one device). You are charged per successful audit; failed audits are free.

## Actor input object example

```json
{
  "urls": [
    "https://crawlee.dev/"
  ],
  "maxUrlsFromSitemap": 50,
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "runsPerUrl": 1,
  "saveHtmlReport": false,
  "monitor": false,
  "monitorStoreName": "lighthouse-monitor",
  "dropThreshold": 10,
  "confirmDrops": false,
  "maxAudits": 3
}
```

# Actor output Schema

## `results` (type: `string`):

One row per page and device: Lighthouse scores and lab metrics.

## `vitals` (type: `string`):

LCP, CLS, TBT, FCP, Speed Index, TTFB, page weight and requests.

## `fixes` (type: `string`):

Top performance fixes and failed accessibility, best-practices and SEO audits.

## `changes` (type: `string`):

With Monitor score changes: change status, earlier median and change per category for every page.

## `reports` (type: `string`):

Saved Lighthouse HTML reports (with Save the HTML report).

## `summary` (type: `string`):

Counts, average scores, stop reason and errors (OUTPUT record).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://crawlee.dev/"
    ],
    "maxAudits": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("actorfactory/lighthouse-audit").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": ["https://crawlee.dev/"],
    "maxAudits": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("actorfactory/lighthouse-audit").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://crawlee.dev/"
  ],
  "maxAudits": 3
}' |
apify call actorfactory/lighthouse-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actorfactory/lighthouse-audit"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LR7uQVZ1JsEaXq3VA/builds/szfF6y9bKRzdjVflh/openapi.json
