# Bulk Lighthouse Audit – Speed, SEO & Accessibility (`cellwright/lighthouse-audit`) Actor

Run Google Lighthouse on many URLs at once, mobile and desktop. Get performance, accessibility, best-practices and SEO scores, Core Web Vitals lab metrics, the top issues to fix and a full HTML report per page. Failed audits are free.

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

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/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 – Speed, SEO & Accessibility

Run **Google Lighthouse** on hundreds of pages in one go – on **mobile and desktop** – and get clean, comparable results: the four Lighthouse scores, **Core Web Vitals lab metrics**, the **top issues to fix** (biggest savings first) and a **full HTML report** for every page. **Failed audits are free.**

Great for SEO agencies, web developers and site owners who want to monitor performance across many pages, compare competitors' landing pages, check a site before launch, or feed AI agents with structured audit data.

### Why this Actor

- **Real Lighthouse, latest version**, run in a fresh headless Chrome – the same engine as Chrome DevTools and PageSpeed Insights (lab data).
- **Mobile and desktop** in one run, each as its own record.
- **Flat, comparable output:** scores 0–100, LCP, FCP, TBT, CLS, Speed Index, server response time, page weight.
- **Actionable issues:** failed audits across all categories, sorted by estimated savings, with titles and values.
- **Full HTML report** per audit, stored in the run's key-value store (link in `reportUrl`), optional full JSON.
- **Reliable:** one retry with a fresh browser on transient Lighthouse errors; every URL gets exactly one record per device, success or a clear error.
- **Polite and safe:** respects robots.txt by default, honest user agent, no captcha or bot-protection bypass, private/internal addresses are blocked.

### Input

| Field | Default | Description |
|---|---|---|
| `urls` | – | Pages to audit (up to 1000) |
| `devices` | `["mobile"]` | `mobile`, `desktop` |
| `categories` | all four | `performance`, `accessibility`, `best-practices`, `seo` |
| `maxOpportunities` | `10` | Top issues per record (0–50) |
| `saveHtmlReport` | `true` | HTML report in the key-value store |
| `saveJsonReport` | `false` | Full Lighthouse JSON in the key-value store |
| `respectRobotsTxt` | `true` | Skip URLs disallowed by robots.txt |
| `maxConcurrency` | `1` | 1–4 parallel audits (1 = most stable scores) |

### Output (one record per URL × device)

| Field | Description |
|---|---|
| `ok` | `true` on success; `false` with `error` and `errorType` (`input`, `blocked`, `network`, `page`, `audit`) |
| `url`, `finalUrl`, `device` | Requested URL, URL after redirects, `mobile` / `desktop` |
| `scores` | `{ performance, accessibility, bestPractices, seo }` (0–100) |
| `metrics` | `firstContentfulPaintMs`, `largestContentfulPaintMs`, `totalBlockingTimeMs`, `cumulativeLayoutShift`, `speedIndexMs`, `serverResponseTimeMs`, `totalByteWeight` |
| `issues` | `[{ id, category, title, score, displayValue, savingsMs, savingsBytes }]` |
| `issuesTotal` | Number of failed audits |
| `reportUrl`, `jsonReportUrl` | Links to the saved reports |
| `runWarnings`, `lighthouseVersion`, `fetchedAt` | Lighthouse details |

A run summary is saved as `OUTPUT` in the key-value store.

### Pricing

Pay per event: a small start fee plus a price **per successful audit** (one URL on one device). Errors, blocked URLs and robots.txt skips are free. See the *Pricing* tab.

### Notes

- Lab scores vary a little between runs (network, server load) – that is normal for Lighthouse. Use `maxConcurrency: 1` for the most stable numbers.
- One audit takes about 10–30 seconds. Plan run timeouts for large lists.
- Audit only sites you are allowed to test. Lighthouse is open-source software by Google (Apache-2.0); this Actor is not affiliated with or endorsed by Google.

# Actor input Schema

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

Pages to audit. 'https://' is added if missing. One output record per URL and device. Up to 1000 URLs.

## `devices` (type: `array`):

mobile (Lighthouse default: emulated phone, throttled 4G) and/or desktop. Each device is a separate audit.

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

Any of: performance, accessibility, best-practices, seo. Empty = all four.

## `maxOpportunities` (type: `integer`):

How many top issues (failed audits, biggest savings first) to include per record. 0–50.

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

Save the full Lighthouse HTML report to the key-value store; its link is in 'reportUrl'.

## `saveJsonReport` (type: `boolean`):

Also save the complete Lighthouse result (JSON, large) to the key-value store; link in 'jsonReportUrl'.

## `respectRobotsTxt` (type: `boolean`):

Skip URLs that the site's robots.txt disallows (not charged). Turn off only for sites you own or are allowed to audit.

## `maxConcurrency` (type: `integer`):

Audits running at the same time (1–4). 1 gives the most stable performance scores; more is faster but needs more memory (≈1 GB per audit).

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.wikipedia.org"
    }
  ],
  "devices": [
    "mobile",
    "desktop"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "maxOpportunities": 10,
  "saveHtmlReport": true,
  "saveJsonReport": false,
  "respectRobotsTxt": true,
  "maxConcurrency": 1
}
```

# Actor output Schema

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

One item per processed input in the default dataset (JSON, CSV, Excel via the dataset export).

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

Totals and statistics of the run (OUTPUT record).

## `files` (type: `string`):

Generated files in the default key-value store (each dataset item links its file).

# 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": [
        {
            "url": "https://www.wikipedia.org"
        }
    ],
    "devices": [
        "mobile",
        "desktop"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cellwright/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": [{ "url": "https://www.wikipedia.org" }],
    "devices": [
        "mobile",
        "desktop",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("cellwright/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": [
    {
      "url": "https://www.wikipedia.org"
    }
  ],
  "devices": [
    "mobile",
    "desktop"
  ]
}' |
apify call cellwright/lighthouse-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cellwright/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/vJvGBTTRsM2RsOTKW/builds/S7VomlBP4xfLPirvi/openapi.json
