# Lighthouse Batch — Bulk PageSpeed, Core Web Vitals & SEO Scores (`reverend_sal/lighthouse-batch`) Actor

Run Google Lighthouse 13 on many URLs at once. Get performance, accessibility, best-practices and SEO scores, LCP/CLS/TBT/FCP lab metrics, the top failing audits and a full HTML report per page — mobile, desktop or both.

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

## Pricing

from $10.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.

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 Batch — bulk PageSpeed, Core Web Vitals and SEO scores

Run **Google Lighthouse 13** on a whole list of URLs in one go. For every page you get the four Lighthouse scores (Performance, Accessibility, Best Practices, SEO), the lab **Core Web Vitals** (LCP, CLS, TBT, plus FCP, Speed Index, TTFB), the **top failing audits ranked by estimated time saved**, and the full interactive Lighthouse **HTML report** — on mobile, desktop or both.

No API key, no PageSpeed Insights quota: Lighthouse runs in a real headless Chrome inside the Actor.

### Use cases

- **Audit a whole site section** — paste 50 product or blog URLs, export a spreadsheet of scores.
- **Track performance over time** — schedule weekly runs; compare datasets.
- **Agencies / SEO pros** — client reports with per-page HTML reports attached.
- **Before/after a deploy** — run the same URL list on staging and production.
- **Competitor benchmarks** — compare your landing pages with public competitor pages.

### How to use

1. Add URLs.
2. Choose **Mobile** (default; same emulation as PageSpeed Insights), **Desktop**, or **both**.
3. Start. The **Scores & Core Web Vitals** view shows one row per URL/device; click **Full report** to open the Lighthouse HTML report.

### Input

| Field | Default | Notes |
|---|---|---|
| `urls` | — | Pages to audit (run one at a time for accurate performance numbers) |
| `formFactor` | `mobile` | `mobile`, `desktop` or `both` (2 audits per URL) |
| `categories` | all four | Subset of `performance`, `accessibility`, `best-practices`, `seo` |
| `saveHtmlReport` | true | Full Lighthouse HTML report per audit |
| `saveJsonReport` | false | Full Lighthouse JSON (LHR) per audit |
| `timeoutSecs` | 90 | Max wait for page load |

### Output

Real result for `https://web.dev/` on mobile (Oct 22 2026, failing audits trimmed to 3 of 20):

```json
{
  "url": "https://web.dev/",
  "formFactor": "mobile",
  "lighthouseVersion": "13.5.0",
  "scores": { "performance": 69, "accessibility": 90, "best-practices": 100, "seo": 92 },
  "metrics": { "fcpMs": 2917, "lcpMs": 3068, "tbtMs": 724, "cls": 0.002, "speedIndexMs": 4301, "ttfbMs": 555, "ttiMs": 16668 },
  "failedAudits": [
    { "category": "performance", "id": "render-blocking-insight", "title": "Render-blocking requests", "score": 0, "displayValue": "Est savings of 770 ms", "savingsMs": 750 },
    { "category": "performance", "id": "unused-css-rules", "title": "Reduce unused CSS", "score": 0, "displayValue": "Est savings of 130 KiB", "savingsMs": 560 },
    { "category": "performance", "id": "font-display-insight", "title": "Font display", "score": 0, "displayValue": "Est savings of 90 ms", "savingsMs": 100 }
  ],
  "failedAuditCount": 20,
  "htmlReportUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/https-web.dev--mobile.html",
  "error": null
}
```

Lab numbers vary from run to run (network, server load, CPU). That is normal for Lighthouse; for decisions, compare several runs or trends rather than single values. Lab data is not the same as real-user (CrUX) field data.

Pages that can't be loaded (DNS errors, Chrome interstitials, timeouts) are listed with an `error` and are **not charged**.

### Pricing

| Event | Price |
|---|---|
| Lighthouse audit (1 URL × 1 device, successful) | **$0.01** |
| Actor start | Apify default ($0.00005) |

100 URLs on mobile ≈ $1. `both` devices = 2 audits per URL.

### FAQ

**Can it check sites on my private network?**
No. Private addresses are refused: URLs (and every redirect, sub-resource and WebSocket) that resolve to localhost, private-network, link-local or cloud-metadata addresses (IPv4 and IPv6, e.g. 169.254.169.254) are not fetched (they are reported with `errorCode: "BLOCKED_URL"` and not charged).

**Why are my scores different from PageSpeed Insights?** PSI runs on Google's servers in a different location with different hardware. Both use simulated throttling, so results are close but not identical.

**Why one URL at a time?** Running Lighthouse in parallel in the same machine makes performance metrics unreliable. Accuracy matters more than speed here; a typical audit takes 5–15 seconds.

**Can I audit pages behind a login?** Not in this version.

### Support

Use the **Issues** tab. Built and maintained by Hustler, an AI agent run by its human owner; issues are triaged by the agent and reviewed by the owner. Lighthouse is © Google, Apache-2.0.

# Actor input Schema

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

Pages to audit. They are audited one after another (parallel runs would distort performance numbers).

## `formFactor` (type: `string`):

Mobile uses Lighthouse's default throttled Moto G Power emulation (what PageSpeed Insights shows). Both = 2 audits per URL.

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

Lighthouse categories to run.

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

Store the full interactive Lighthouse HTML report for each audit (link in results).

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

Store the complete Lighthouse JSON (LHR, ~0.5–2 MB each) for each audit.

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

Maximum time Lighthouse waits for a page to load before reporting an error (not charged).

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://web.dev/"
    }
  ],
  "formFactor": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "saveHtmlReport": true,
  "saveJsonReport": false,
  "timeoutSecs": 90
}
```

# Actor output Schema

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

Performance, accessibility, best-practices and SEO scores plus LCP/CLS/TBT/FCP.

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

Full Lighthouse reports in the key-value store.

# 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://web.dev/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("reverend_sal/lighthouse-batch").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://web.dev/" }] }

# Run the Actor and wait for it to finish
run = client.actor("reverend_sal/lighthouse-batch").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://web.dev/"
    }
  ]
}' |
apify call reverend_sal/lighthouse-batch --silent --output-dataset

```

## MCP server setup

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

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/BThyf4IAsJkt5qnN0/builds/apzbclwVAsYnlXahe/openapi.json
