# Bulk Lighthouse & Core Web Vitals Audit with Budgets (`creativefour/lighthouse-audit`) Actor

Run real Google Lighthouse on hundreds of pages or a whole sitemap, on mobile and desktop. Get performance, accessibility, SEO scores and Core Web Vitals (LCP, CLS, TBT) with pass/fail budgets. No API key needed.

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

## Pricing

$15.00 / 1,000 results

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/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

### What does the Bulk Lighthouse & Core Web Vitals Audit do?

It runs **real Google Lighthouse**, the same engine behind PageSpeed Insights and Chrome DevTools, on **a list of pages or a whole sitemap**, on **mobile and desktop**. Each page gets its **performance, accessibility, best-practices, and SEO scores**, its **Core Web Vitals** (LCP, CLS, TBT), and a **pass/fail result against your performance budgets**.

**No Google API key and no PageSpeed quota.** Lighthouse runs inside the Actor on its own Chrome. Because it runs on Apify, you can schedule it (for example, a nightly check after each deploy), call it from the API, or send failures to Slack, email, or Google Sheets.

### Why use it?

- **Audit a whole site at once** instead of pasting URLs into PageSpeed Insights one by one.
- **Catch regressions.** Set budgets (for example, LCP ≤ 2.5 s, CLS ≤ 0.1, performance ≥ 90) and get a clear pass/fail list after every release.
- **Prioritize fixes.** Each failing page lists its biggest Lighthouse opportunities, such as "Reduce unused JavaScript (~2,730 ms)".
- **Report to clients.** The flat, one-row-per-page output drops straight into a spreadsheet or dashboard.
- **Pay for problems only.** With **Save only pages that fail a budget**, healthy pages are counted but not charged.

### How to use it

1. Open the **Input** tab and paste your page URLs, or add your sitemap URL.
2. Choose **Mobile**, **Desktop**, or both.
3. Optional: adjust the budgets, or turn on **Save only pages that fail a budget**.
4. Click **Start**. Each audit takes about 15-40 seconds.
5. Open the **Output** tab. Use **Scores and Core Web Vitals** for the overview, or **What to fix** for the biggest wins.

### Input

| Field | What it does |
|---|---|
| **URLs to audit** | One page per line. |
| **Sitemaps to expand** | Audits every page in a sitemap or sitemap index (up to Max URLs). |
| **Device** | Lighthouse's official mobile emulation (throttled 4G on a mid-range phone), desktop, or both. |
| **Lighthouse categories** | Performance, accessibility, best practices, SEO. Fewer categories run faster. |
| **Budgets** | Minimum performance score, and maximum LCP, CLS, and TBT. Defaults use Google's "good" thresholds. |
| **Save only pages that fail a budget** | Skip saving (and paying for) healthy pages. |
| **Max URLs / Timeout** | A safety limit per run, and per audit. |

```json
{
  "sitemapUrls": ["https://example.com/sitemap.xml"],
  "device": "both",
  "lcpMaxMs": 2500,
  "clsMax": 0.1,
  "onlyFailures": true
}
```

### Output

One row per page and device. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
  "url": "https://example.com/pricing",
  "device": "mobile",
  "budgetPass": false,
  "failedBudgets": ["performance: 30 (budget ≥ 90)", "lcpMs: 19220 (budget ≤ 2500)", "tbtMs: 4967 (budget ≤ 200)"],
  "performance": 30,
  "accessibility": 94,
  "bestPractices": 96,
  "seo": 92,
  "lcpMs": 19220,
  "fcpMs": 3100,
  "cls": 0.02,
  "tbtMs": 4967,
  "speedIndexMs": 9800,
  "ttfbMs": 120,
  "totalBytes": 2854301,
  "requests": 112,
  "topOpportunities": ["Reduce unused JavaScript (~2730 ms)"],
  "runtimeError": null,
  "lighthouseVersion": "13.5.0",
  "checkedAt": "2026-09-24T17:00:00.000Z"
}
```

A **SUMMARY** record in the run's key-value store counts audits, passes, failures, errors, and saved rows.

### Data fields

| Field | Description |
|---|---|
| `performance`, `accessibility`, `bestPractices`, `seo` | Lighthouse category scores (0-100) |
| `lcpMs`, `cls`, `tbtMs` | Core Web Vitals lab metrics. TBT is Lighthouse's stand-in for INP. |
| `fcpMs`, `speedIndexMs`, `ttfbMs` | First Contentful Paint, Speed Index, and server response time |
| `budgetPass`, `failedBudgets` | Pass/fail against your budgets, with each failure spelled out |
| `topOpportunities` | Lighthouse's biggest estimated savings for the page |
| `totalBytes`, `requests` | Page weight and request count |
| `runtimeError` | Why an audit couldn't finish (for example, the page didn't load) |

### How much does it cost to run Lighthouse on many pages?

You pay per result: one result is one page on one device. With **Save only pages that fail a budget**, passing pages cost nothing. Set a **maximum charge per run** in the run options, and the Actor stops cleanly at that limit, keeping everything audited so far.

### Tips

- **Audits run one at a time on purpose.** Parallel Lighthouse runs on one machine skew each other's performance scores, so results here are consistent from run to run.
- **Lab data, not field data.** Lighthouse measures a controlled, simulated load. Real-user field data (CrUX) can differ, and trends between runs are what matter most.
- **Schedule it after deploys**, and send failures to Slack with an Apify integration.

### Use it from AI agents (MCP)

AI agents can find and run this Actor through the [Apify MCP server](https://docs.apify.com/integrations/mcp).

- **Claude, ChatGPT, or any MCP client:** add `https://mcp.apify.com?tools=creativefour/lighthouse-audit` as a custom connector, and sign in to Apify when prompted.
- **Claude Code, Cursor, VS Code, or Codex:** run `apify mcp install claude-code` (swap in your client's name), then ask your agent to "run a Lighthouse audit of example.com with creativefour/lighthouse-audit".

### FAQ and support

**Is this the same as PageSpeed Insights?** It's the same Lighthouse engine and the same scoring. PageSpeed Insights also shows Google's real-user field data, which this Actor doesn't include.

**Why does a score change between runs?** Network and server timing vary a little on every load. For decisions, compare a few runs or look at trends.

**Can it audit pages behind a login?** No. It audits public pages only.

**Found a bug or need a feature?** Open an issue on the **Issues** tab. Custom versions are available on request.

# Actor input Schema

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

One page per line. A missing scheme is treated as https.

## `sitemapUrls` (type: `array`):

Sitemap or sitemap-index URLs; every page they list is audited (up to Max URLs).

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

Lighthouse's official mobile emulation (throttled 4G, mid-range phone), desktop, or both. Each URL and device is one result.

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

Performance is always included. Fewer categories run faster.

## `onlyFailures` (type: `boolean`):

Healthy pages are counted in the summary but not saved, so you aren't charged for them.

## `performanceMinScore` (type: `integer`):

Pages scoring below this (0-100) fail. Google's 'good' band starts at 90.

## `lcpMaxMs` (type: `integer`):

Google's Core Web Vitals 'good' threshold is 2500 ms.

## `clsMax` (type: `number`):

Google's Core Web Vitals 'good' threshold is 0.1.

## `tbtMaxMs` (type: `integer`):

Lighthouse's lab stand-in for responsiveness (INP). 200 ms or less is good.

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

Upper limit on pages audited in one run, after sitemap expansion. Each audit takes about 15-40 seconds.

## `timeoutSecs` (type: `integer`):

A page that takes longer is recorded as an error and the next one starts on a fresh browser.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "onlyFailures": false,
  "performanceMinScore": 90,
  "lcpMaxMs": 2500,
  "clsMax": 0.1,
  "tbtMaxMs": 200,
  "maxUrls": 2,
  "timeoutSecs": 120
}
```

# Actor output Schema

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

No description

## `summary` (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://apify.com",
        "https://example.com"
    ],
    "device": "mobile",
    "maxUrls": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("creativefour/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://apify.com",
        "https://example.com",
    ],
    "device": "mobile",
    "maxUrls": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("creativefour/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://apify.com",
    "https://example.com"
  ],
  "device": "mobile",
  "maxUrls": 2
}' |
apify call creativefour/lighthouse-audit --silent --output-dataset

```

## MCP server setup

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