# Lighthouse Audit: Bulk PageSpeed & Core Web Vitals Checker (`phaux/lighthouse-audit`) Actor

Run Google Lighthouse on a list of URLs, no PageSpeed API key needed. Use to check page speed, Core Web Vitals, accessibility or SEO. Input: urls, device (mobile/desktop), categories. Output per URL: performance, accessibility, best-practices, SEO scores, LCP, CLS, TBT, top fixes. Failed pages free.

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

## Pricing

from $24.00 / 1,000 lighthouse audit returneds

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

## Lighthouse Audit: Bulk PageSpeed & Core Web Vitals Checker

List the pages you want checked. The Actor runs open-source Lighthouse in a real Chrome browser and returns the four category scores, the Core Web Vitals (LCP, CLS, TBT, FCP, Speed Index) and the top suggestions for each page. It runs Lighthouse itself instead of calling Google's PageSpeed API, so there is no API key, no daily quota and no dependency on Google's service. Each row also records the test machine's speed, so you can judge the performance score fairly. Pages that fail to load are listed and not charged.

### Quick start for AI agents and API users

- **What it does:** Run Google Lighthouse on a list of URLs, no PageSpeed API key needed.
- **When to use it:** To check page speed, Core Web Vitals, accessibility or SEO.
- **Example input** (the form's prefill; it finishes in under a minute):

```json
{
  "urls": [
    "https://docs.apify.com/",
    "https://crawlee.dev/"
  ],
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ]
}
```

- **Example output:** one real dataset row from run `T8hmENKmyyO44kDvm` (2026-10-23), with long fields shortened and empty fields left out. Fields not shown are listed in the output table below.

```json
{
  "url": "https://docs.apify.com/",
  "status": "ok",
  "device": "mobile",
  "performance": 36,
  "accessibility": 94,
  "bestPractices": 75,
  "seo": 85,
  "lcpMs": 22576,
  "fcpMs": 2447,
  "tbtMs": 3608,
  "cls": 0,
  "speedIndexMs": 6628,
  "ttiMs": 40703,
  "ttfbMs": 80,
  "totalByteWeight": 6187953,
  "topOpportunities": [
    {
      "id": "uses-text-compression",
      "title": "Enable text compression",
      "savingsMs": 7500,
      "savingsBytes": 1491539,
      "displayValue": "Est savings of 1,457 KiB"
    },
    {
      "id": "unused-javascript",
      "title": "Reduce unused JavaScript",
      "savingsMs": 4440,
      "savingsBytes": 1783603,
      "displayValue": "Est savings of 1,742 KiB"
    },
    "..."
  ]
}
```

- **Cost (pay per event, Free-plan prices):** Lighthouse audit returned $0.03; Run start $0.01; Monitor check (no change) $0.015 (never charged: this Actor has no monitor mode). Failed items are not charged.
- **From an AI agent:** with the Apify MCP server, call `call-actor` with actor `phaux/lighthouse-audit`, or load it as its own tool with `https://mcp.apify.com?tools=phaux/lighthouse-audit`. Read results with `get-dataset-items`.

### What does Lighthouse Audit do?

- Runs **Lighthouse 12** (Apache-2.0) in headless Chrome on each URL, emulating **mobile** (Lighthouse default: Moto G Power, slow 4G, simulated throttling) or **desktop**.
- Returns **Performance, Accessibility, Best Practices and SEO** scores (0–100).
- Returns the **Core Web Vitals** and lab metrics: LCP, CLS, TBT, FCP, Speed Index, TTI, server response time (TTFB) and total page weight.
- Lists the **top 5 opportunities** (estimated savings in ms/bytes) and the **failed accessibility, best-practice and SEO checks**.
- Records Lighthouse's **CPU benchmarkIndex** for the test machine on every row.
- Optionally saves the **full Lighthouse JSON report** for each page.

### Why use it?

- **No API key, no PSI quota, no Google account**: Lighthouse runs inside the Actor.
- **Bulk**: up to 1,000 URLs per run, in a CSV-ready table.
- **Failures are free**: pages that time out, return errors or are disallowed by robots.txt are listed in `FAILED_URLS` and not charged.

Use cases: SEO and performance audits of many pages, Core Web Vitals monitoring on a schedule, agency client reports, regression checks after a release, and accessibility spot checks.

### How to use it

1. Add the pages under **URLs**.
2. Choose **Device** (mobile or desktop) and the **Categories** to run (fewer categories = faster).
3. Run, then open the **Scores and Core Web Vitals** view or export CSV/Excel/JSON.

### Input example

```json
{
  "urls": ["https://docs.apify.com/", "https://crawlee.dev/"],
  "device": "mobile",
  "categories": ["performance", "accessibility", "best-practices", "seo"]
}
```

| Field | Default | Description |
|---|---|---|
| `urls` | — | Pages to audit. Empty = small example. |
| `device` | `mobile` | `mobile` or `desktop`. |
| `categories` | all four | `performance`, `accessibility`, `best-practices`, `seo`. |
| `pageTimeoutSecs` | `60` | Max page load wait (15–180). |
| `saveFullReports` | `false` | Store full Lighthouse JSON reports. |
| `maxUrls` | `100` | Max URLs per run (1–1,000). |

### Output example

```json
{
  "url": "https://crawlee.dev/",
  "status": "ok",
  "device": "mobile",
  "performance": 37,
  "accessibility": 96,
  "bestPractices": 75,
  "seo": 92,
  "lcpMs": 6721,
  "fcpMs": 1836,
  "tbtMs": 38461,
  "cls": 0.001,
  "speedIndexMs": 9348,
  "ttiMs": 43778,
  "ttfbMs": 91,
  "totalByteWeight": 2383045,
  "topOpportunities": [{"id": "render-blocking-resources", "title": "Eliminate render-blocking resources", "savingsMs": 375}],
  "failedAudits": [{"category": "accessibility", "id": "color-contrast", "title": "Background and foreground colors do not have a sufficient contrast ratio."}],
  "benchmarkIndex": 2595.5,
  "lighthouseVersion": "12.8.2",
  "fetchTime": "2026-10-22T01:34:05.338Z",
  "auditSecs": 46.4
}
```

**About performance scores:** lab scores depend on the test machine's CPU. Cloud containers are slower than a developer laptop, so mobile performance scores (especially TBT) are usually lower than in Chrome DevTools or PageSpeed Insights. Compare pages within the same run, and use `benchmarkIndex` to judge the machine. Accessibility, Best Practices and SEO scores are not affected.

### Pricing

| Event | Free | Bronze | Silver | Gold+ |
|---|---|---|---|---|
| Lighthouse audit returned (per page) | $0.03 | $0.0282 | $0.0261 | $0.024 |
| Run start (once per run) | $0.01 | $0.0091 | $0.0082 | $0.0073 |
| Monitor check (no change) | $0.015 | $0.0141 | $0.01305 | $0.012 |

This Actor has no monitor mode, so *Monitor check* is never charged. Example: 20 pages on Bronze = $0.0091 + 20 × $0.0282 = **$0.573**. Failed pages are free.

### Notes

- robots.txt is respected for each URL; login-only pages and anti-bot walls are not bypassed. Private network addresses are refused.
- Lighthouse runs one page at a time in a single Chrome, so each audit gets the full CPU.

# Actor input Schema

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

Pages to audit (up to 1,000). Empty = small example on docs.apify.com and crawlee.dev.

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

mobile (Moto G Power emulation, slow 4G, 4x CPU slowdown; Lighthouse default) or desktop.

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

Lighthouse categories to run. Fewer categories = faster audits. Example: \["performance", "seo"]. Default: \["performance", "accessibility", "best-practices", "seo"].

## `pageTimeoutSecs` (type: `integer`):

Max wait for a page to load (15–180). Default: 60.

## `saveFullReports` (type: `boolean`):

Also store each complete Lighthouse JSON report in the key-value store (link in fullReportUrl). Default: false.

## `maxUrls` (type: `integer`):

Audit at most this many URLs per run (1–1,000). Default: 100.

## Actor input object example

```json
{
  "urls": [
    "https://docs.apify.com/",
    "https://crawlee.dev/"
  ],
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "pageTimeoutSecs": 60,
  "saveFullReports": false,
  "maxUrls": 100
}
```

# Actor output Schema

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

No description

## `failed` (type: `string`):

No description

## `runStats` (type: `string`):

No description

# 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://docs.apify.com/",
        "https://crawlee.dev/"
    ],
    "device": "mobile",
    "categories": [
        "performance",
        "accessibility",
        "best-practices",
        "seo"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("phaux/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://docs.apify.com/",
        "https://crawlee.dev/",
    ],
    "device": "mobile",
    "categories": [
        "performance",
        "accessibility",
        "best-practices",
        "seo",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("phaux/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://docs.apify.com/",
    "https://crawlee.dev/"
  ],
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ]
}' |
apify call phaux/lighthouse-audit --silent --output-dataset

```

## MCP server setup

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