# Bulk Lighthouse Audit: PageSpeed Scores & Core Web Vitals (`malmurk/bulk-lighthouse-audit`) Actor

Run Google Lighthouse on a list of URLs: performance, accessibility, best practices and SEO scores, Core Web Vitals (LCP, CLS, TBT, FCP) and the failing audits for each page, mobile or desktop. No Google API key needed. Failed pages are free.

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

## Pricing

from $25.00 / 1,000 page 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

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

Run **Google Lighthouse** on a whole list of URLs and get one clean row per page: **performance, accessibility, best practices and SEO scores**, the **Core Web Vitals** lab metrics (LCP, CLS, TBT, FCP, Speed Index) and the **list of failing audits** that explain the score. Mobile, desktop or both.

- **No Google API key, no quota.** Every page is audited by Lighthouse 13 in a fresh headless Chrome inside the Actor, the same engine that powers PageSpeed Insights and Chrome DevTools.
- **$25 per 1,000 audits ($0.025 per page), and failed pages are free.** A page that is down, returns 404 or never paints costs nothing; you still get a row with the reason.
- **What to fix, not just a number.** Each row lists the failing audits (score below 90) per category, worst first: unused JavaScript, render-blocking requests, missing alt text, colour contrast, missing meta description...
- **Optional full HTML report** per page, the same report you see in Chrome DevTools, saved in the run's key-value store and linked from the row.
- **Paste a list of domains** (`acme.com`) or full URLs (`https://acme.com/pricing`); duplicates are removed.

### Who it's for

- **SEO and web agencies** auditing every client site, or a prospect list, in one run and exporting the scores to a spreadsheet or a report.
- **Developers and site owners** tracking Core Web Vitals across all important pages after each release (schedule the Actor daily or weekly).
- **Lead generation**: find businesses with slow or broken websites, then pitch them a fix.
- **AI agents and automations** (MCP, Make, Zapier, n8n) that need page-quality scores through one API call.

### Input

| Field | Default | Description |
|---|---|---|
| `startUrls` | | Pages to audit: full URLs or plain domains (audited over `https://`). |
| `strategy` | `mobile` | `mobile` (PageSpeed Insights default: emulated phone, slow 4G, 4x CPU slowdown), `desktop`, or `both` (two audits per URL). |
| `categories` | all four | Any of `performance`, `accessibility`, `best-practices`, `seo`. |
| `saveHtmlReport` | `false` | Also save Lighthouse's HTML report for each page (0.5-1 MB each) and link it in `report_url`. |
| `maxWaitForLoadSecs` | `45` | How long Lighthouse waits for a page to finish loading. |

```json
{
  "startUrls": ["acme-dental.com", "https://www.example-bakery.co.uk/menu"],
  "strategy": "both",
  "categories": ["performance", "seo"],
  "saveHtmlReport": true
}
```

### Output

One row per URL and device.

| Field | Description |
|---|---|
| `url`, `strategy`, `final_url` | The page you gave, `mobile` or `desktop`, and the URL after redirects. |
| `performance`, `accessibility`, `best_practices`, `seo` | Lighthouse scores, 0-100 (`null` for categories you didn't ask for). |
| `lcp_ms`, `cls`, `tbt_ms`, `fcp_ms`, `speed_index_ms`, `tti_ms` | Largest Contentful Paint, Cumulative Layout Shift, Total Blocking Time, First Contentful Paint, Speed Index, Time to Interactive. |
| `server_response_ms`, `total_byte_weight` | Time to first byte of the HTML document, and the total page weight in bytes. |
| `issues`, `issue_count` | Failing audits (`category`, `id`, `title`, `score`, `display_value`), worst first; up to 25 in `issues`, the full count in `issue_count`. |
| `report_url` | Link to the full HTML report when `saveHtmlReport` is on. |
| `lighthouse_version`, `run_warnings`, `audited_at` | Lighthouse version, its warnings for this page, UTC timestamp. |
| `error` | Why a page could not be audited (`ERRORED_DOCUMENT_REQUEST: Status code: 404`, `NO_FCP`, DNS errors...). These rows are free. |

Example row from a real run (issues shortened to 2):

```json
{
  "url": "https://www.python.org/",
  "strategy": "mobile",
  "final_url": "https://www.python.org/",
  "performance": 82,
  "accessibility": 75,
  "best_practices": 100,
  "seo": 92,
  "fcp_ms": 2585,
  "lcp_ms": 4307,
  "tbt_ms": 0,
  "cls": 0.003,
  "speed_index_ms": 2585,
  "tti_ms": 4307,
  "server_response_ms": 3,
  "total_byte_weight": 515809,
  "issues": [
    {"category": "accessibility", "id": "aria-required-children", "title": "Elements with an ARIA `[role]` that require children to contain a specific `[role]` are missing some or all of those required children.", "score": 0, "display_value": null},
    {"category": "accessibility", "id": "aria-hidden-focus", "title": "`[aria-hidden=\"true\"]` elements contain focusable descendents", "score": 0, "display_value": null}
  ],
  "issue_count": 19,
  "report_url": null,
  "lighthouse_version": "13.5.0",
  "run_warnings": [],
  "audited_at": "2026-10-24T03:42:57.765Z",
  "error": null
}
```

The dataset has three views: **Scores**, **Core Web Vitals and metrics** and **All fields**. Export to CSV, Excel or JSON, send it to Google Sheets through an Apify integration, or read it from the API:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("malmurk/bulk-lighthouse-audit").call(run_input={
    "startUrls": ["acme-dental.com", "example-bakery.co.uk"],
    "strategy": "mobile",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["url"], row["performance"], row["seo"], row["lcp_ms"], row["error"])
```

### Pricing

**Pay per event:**

| Event | Price | Charged for |
|---|---|---|
| `audit` | **$25 per 1,000 audits** ($0.025 each) | One page audited on one device with at least one score. |
| Actor start | $0.00005 per GB of memory | Once per run. |

- Failed audits (page down, 404, DNS error, page never paints) are **free**.
- `strategy: both` is two audits per URL.
- The run stops cleanly at the **maximum charge** you set for it.

200 pages on mobile only = **$5**. 500 pages on mobile and desktop = 1,000 audits = **$25**.

### FAQ

**Why do my scores differ from PageSpeed Insights?**
Lighthouse lab scores always vary from run to run and machine to machine; Google's own docs say to expect a few points of difference on every run. This Actor uses the same Lighthouse version and the same mobile/desktop settings as PageSpeed Insights, but runs on Apify's servers, not Google's. Compare pages within one run (or across runs of this Actor) rather than against a score taken elsewhere. PageSpeed Insights also shows *field data* from real Chrome users (CrUX); this Actor reports lab data only.

**How long does it take?**
About 10 seconds for a light page and 30-60 seconds for a heavy one (big JavaScript bundles, many third-party scripts); a few very heavy pages take up to 2 minutes. Pages are audited one at a time on purpose: running several audits in parallel on the same CPU makes the performance scores unreliable. 100 pages take roughly 20-60 minutes; for thousands of pages, split the list into several runs and start them in parallel.

**Does it use proxies or bypass bot protection?**
No. A site that blocks headless Chrome or shows a CAPTCHA gets audited as served (often a low score) or gets an error row, which is free.

**Why is the memory fixed at 4 GB?**
Chrome plus Lighthouse needs it: with less memory the CPU share is too small and heavy pages time out or never paint. You pay per audit, not for memory, so there is nothing to tune.

**Can it audit pages behind a login?**
No. Only publicly reachable pages.

**Can I schedule it?**
Yes: save the input as an Apify task and add a schedule (daily, weekly) to track your Core Web Vitals over time.

### Limitations

- Lab data only (no CrUX field data).
- One page at a time, so very large lists take hours.
- Each audit has a hard limit of 150 seconds; a page that never finishes loading in that time gets an error row (free).

### Local development

```bash
npm install
npm test   # unit tests + a real Lighthouse audit of a local page (needs Chrome installed)
```

Built on [Lighthouse](https://github.com/GoogleChrome/lighthouse) (Apache-2.0) and [chrome-launcher](https://github.com/GoogleChrome/chrome-launcher) (Apache-2.0).

# Actor input Schema

## `startUrls` (type: `array`):

Pages to audit, one per line (use Bulk edit to paste a whole list). A full URL (https://acme.com/pricing) or just a domain (acme.com, audited at https://).

## `strategy` (type: `string`):

Mobile (the PageSpeed Insights default: emulated phone, slow 4G, 4x CPU slowdown), desktop, or both. 'Both' runs two audits per URL.

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

Lighthouse categories to score. Fewer categories make each audit a bit faster; the price per audit is the same.

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

Also save Lighthouse's own HTML report for every page in the run's key-value store, linked from the report_url column. About 0.5-1 MB per page.

## `maxWaitForLoadSecs` (type: `integer`):

How long Lighthouse waits for a page to finish loading before scoring what it has.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.python.org/",
    "https://example.com/"
  ],
  "strategy": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "saveHtmlReport": false,
  "maxWaitForLoadSecs": 45
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        "https://www.python.org/",
        "https://example.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("malmurk/bulk-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 = { "startUrls": [
        "https://www.python.org/",
        "https://example.com/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("malmurk/bulk-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 '{
  "startUrls": [
    "https://www.python.org/",
    "https://example.com/"
  ]
}' |
apify call malmurk/bulk-lighthouse-audit --silent --output-dataset

```

## MCP server setup

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