# Bulk Lighthouse Audit as a PageSpeed Insights Alternative (`cleanscrape/lighthouse-audit`) Actor

Bulk Lighthouse audit for many pages: performance, accessibility, best practices, SEO and agentic-browsing scores, Core Web Vitals, top fixes, HTML reports and screenshots, mobile and desktop. No API key; changes since the last run. Maintained by CleanScrape.

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

## Pricing

from $32.00 / 1,000 page auditeds

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

## Bulk Lighthouse Audit as a PageSpeed Insights Alternative

Run Google Lighthouse on many pages at once and get one row per page and device: performance, accessibility, best-practices, SEO and agentic-browsing scores, Core Web Vitals (LCP, TBT, CLS, FCP, Speed Index), the top fixes ranked by time saved, every failed check, and links to the full HTML report and a screenshot. Mobile and desktop. No API key and no PageSpeed Insights quota: Lighthouse runs inside the Actor.

Paste pages or domains, give a sitemap, or point it at another Actor's results. Turn on **Show changes since the last run** and schedule it to see which pages got slower.

**$0.04 per page audit. No start fee.** Pages that cannot be audited are free. The form's first run (one page, mobile) costs $0.04.

### Watch the walkthrough

Ten well-known websites on mobile and desktop give 19 audits in about six minutes: Wikipedia scores 100 on desktop and 88 on mobile, Debian's mobile page takes 10.2 seconds to show its main content, and its top fix would save 1,801 KiB of images. This 77-second demo uses real runs.

https://youtu.be/PIdlYUf0wOE

### Start with a small run

1. Under **Pages**, keep the sample or paste your own: full links or just domains (`example.com`), one per line.
2. Choose **Devices** (mobile, desktop or both) and the **Categories** you want.
3. Click **Start**. Each page takes 10-60 seconds. The scores are in the Output tab; **Full report** opens the same report Chrome DevTools shows.

Ready inputs: a whole site from its sitemap (**Sitemap** `https://example.com/sitemap.xml`, **Maximum pages** 50); mobile and desktop side by side (**Devices** both); a weekly check of key pages (**Show changes since the last run** plus a schedule).

Ready-made example: [compare the Lighthouse scores of three sites on mobile and desktop](https://apify.com/cleanscrape/lighthouse-audit/examples/compare-lighthouse-scores-mobile-desktop).

### What you get

| Column | What it means |
| --- | --- |
| `performance`, `accessibility`, `bestPractices`, `seo`, `agenticBrowsing` | Lighthouse scores, 0-100 (90+ good, 50-89 needs work, under 50 poor) |
| `lcpMs`, `tbtMs`, `cls`, `fcpMs`, `speedIndexMs` | Core Web Vitals and other lab metrics from the test |
| `serverResponseMs`, `pageWeightKb`, `requests` | Time to the first byte, total download size, number of requests |
| `lcpElement` | The HTML of the element that was the largest paint |
| `topFixes` | Performance problems, biggest time or byte saving first, such as "Improve image delivery: Est savings of 412 KiB" |
| `failedChecks` | Every failed accessibility, best-practices, SEO and agentic-browsing check, with how many elements it affects |
| `topFixesText`, `failedChecksText` | The same in one line each, for CSV and Excel |
| `reportUrl`, `screenshotUrl` | The full Lighthouse HTML report and a full-page screenshot, links that work without a token |
| `change`, `previousCheckedAt` | With change tracking: differences against your previous run, such as `performance: -7`, `lcpMs: +420` |
| `field`, `fieldScope` | With your Google API key: what real Chrome users experienced (see below) |
| `runs`, `performanceRuns`, `performanceSpread` | With several runs per page: every run's score and the spread |

Pages that could not be audited are in the **Not audited** table with the reason: the site cannot be reached, it answered with an error, it showed nothing, or it is a private address.

The table views: **Scores**, **Core Web Vitals**, **Fixes** (with screenshots) and **Changes since last run**.

### Lab test and real users

Lighthouse measures a page in a test browser, the same way PageSpeed Insights and Chrome DevTools do: on mobile it emulates a mid-range phone on a slow 4G connection, on desktop a fast connection. The Actor runs it in Apify's cloud in the US with 8 GB of memory (two CPU cores), which keeps the scores steady: in our tests the same page scored within 4 points across runs.

The numbers are close to, but not the same as, PageSpeed Insights:

- Google's own servers run the test from different places and machines.
- Sites show visitors from US data centers different content, such as more ads and trackers.
- Some sites change from load to load.

For decisions, use **Runs per page** 3 or 5: the median run is kept, the way Lighthouse CI does it.

Real-user data is different: it is what actual Chrome visitors experienced over the last 28 days (the Chrome UX Report, also shown on top of PageSpeed Insights). Add your own free Google API key to get it in the `field` column (LCP, INP, CLS, FCP and time to first byte at the 75th percentile, with Google's FAST / AVERAGE / SLOW verdict). For pages with too few visits it falls back to the whole site (`fieldScope: origin`). To get a key: in Google Cloud Console, create a project, enable the **Chrome UX Report API**, and create an API key. It is free.

### Audit the websites another Actor found

Choose a run's dataset under **Pages from a dataset**: for example the result pages of a Google search ([Google Search Results Scraper](https://apify.com/apify/google-search-scraper)), the pages a [Website Content Crawler](https://apify.com/apify/website-content-crawler) run visited, the developer websites from an app store search, or company websites from a lead list. From a Google search results row the Actor takes the result links in `organicResults`; from other rows the `url`, `website`, `link`, `pageUrl` or `domain` field. Or name the field under **Field with the page link**, also a path through a list such as `organicResults.url`. A search engine's own results page is never audited. As an integration, give it `{"datasetId": "{{resource.defaultDatasetId}}"}`.

### Use it from the API

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("cleanscrape/lighthouse-audit").call(run_input={
    "urls": ["https://www.python.org/", "wordpress.org/news"],
    "devices": ["mobile", "desktop"],
    "categories": ["performance", "seo", "accessibility"],
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["url"], row["device"], row["performance"], row["lcpMs"], row["seo"])
    for fix in row["topFixes"][:3]:
        print("   ", fix["title"], fix["detail"])
```

### Input

| Field | What it does |
| --- | --- |
| Pages | Links or bare domains, one per line or inside any text. Repeats are audited once. |
| Sitemap | A sitemap, sitemap index or `.xml.gz`; its pages are added, up to Maximum pages. |
| Pages from a dataset | Another run's dataset; its page links are added. |
| Field with the page link | Optional: the dataset field to read, such as `website` or `organicResults.url`. |
| Devices | Mobile, desktop or both. Each page and device is one audit. |
| Categories | Any of performance, accessibility, best practices, SEO, agentic browsing. |
| Runs per page | 1 to 5; with more, the median run is kept. Each run is charged. |
| Maximum pages | Default 100. |
| Page load wait | How long to wait for a page to load, default 35 seconds. |
| Save the full HTML reports / screenshots | On by default. |
| Show changes since the last run | Remembers scores in your account and shows the differences. |
| Google API key | Optional, for real-user data. Stored encrypted. |

### What it can and cannot do

- **Public pages only:** it audits what anyone can open. No logins or cookies; a page behind a login is audited as its login page.
- **Speed:** one page at a time, so the scores are not disturbed. A light page takes about 10 seconds, a heavy news or shop page up to a minute: about 100 pages an hour. Raise the run timeout for more.
- **Memory:** keep it at 8 GB. With less, Chrome gets less CPU, scores drop and vary more, and the run message says so.
- **Failed pages are free:** a page that does not load (missing site, error page, nothing shown) or answers with an error status (such as a 403 bot check that some sites show cloud servers) is listed in **Not audited** with the reason and not charged. Lighthouse retries once on a passing problem.
- **Internal addresses:** private network and cloud-internal addresses are refused.
- **Agentic browsing:** a new Lighthouse 13 category that rates how well AI agents can read and use the page.

### Pricing

| Event | Price |
| --- | ---: |
| Page audited (one Lighthouse run of one page on one device) | $0.04 |

| Run | Cost |
| --- | ---: |
| The form's first run: 1 page, mobile | $0.04 |
| 25 pages, mobile and desktop | $2.00 |
| 50 pages from a sitemap, mobile | $2.00 |
| 10 key pages, median of 3 runs | $1.20 |
| 10 pages that do not load | $0 |

Bronze, Silver and Gold Apify plans get 10%, 15% and 20% off. Set **Maximum cost per run** to cap a run; it stops cleanly at the limit and keeps everything it saved.

### Use it from an AI agent

This Actor works as a tool in Claude, ChatGPT, Cursor and other AI assistants that support MCP, through Apify's MCP server. Add this server and sign in with your Apify account when asked:

```
https://mcp.apify.com?tools=cleanscrape/lighthouse-audit
```

Then ask in plain words, for example: "Run Lighthouse on these five pages on mobile and list the top fix for each." The assistant runs the Actor in your Apify account and reads the results. The price per result is the same as in Console.

For coding agents (Claude Code, Codex, Cursor and others), a free skill explains the inputs, costs and how to read the results: `npx skills add CleanScrape/agent-skills --skill apify-cleanscrape-lighthouse-audit`. From a terminal, the [Apify CLI](https://docs.apify.com/cli) runs it too:

```bash
apify call cleanscrape/lighthouse-audit -i '{"urls":["https://www.wikipedia.org/","https://www.python.org/"],"devices":["mobile","desktop"]}' --output-dataset
```

### Common questions

#### Is this the same as PageSpeed Insights?

The audit is the same Lighthouse that PageSpeed Insights runs, with the same mobile and desktop settings, so the checks, fixes and scoring match. The machine and location differ, so the numbers come out close but not identical; see "Lab test and real users" above. With a Google API key you also get the real-user data PageSpeed Insights shows.

#### Why do the scores change between runs?

Pages load ads, experiments and third-party scripts differently each time. Use **Runs per page** 3 or 5 for a steady median, and keep 8 GB of memory.

#### Can I monitor my site's Core Web Vitals every week?

Yes: turn on **Show changes since the last run**, save the input as a task and add a schedule. Each row then shows the change since the previous run.

#### Can it check a whole website?

Give the sitemap and a **Maximum pages**. Pages are audited one at a time, about 100 an hour.

### Support

Questions or a result that looks wrong: open an issue on the Issues tab or email contact.cleanscrape@gmail.com. Include the run ID.

If the Actor was useful, an honest review on its Store page helps other people find it.

This Actor is not affiliated with Google. Lighthouse and PageSpeed Insights are Google products; Lighthouse is open source (Apache 2.0).

Maintained by CleanScrape.

### More tools from CleanScrape

- [Google People Also Ask Scraper with Related Searches](https://apify.com/cleanscrape/google-people-also-ask-scraper): Google People Also Ask questions with Google's AI Overview answer and top result for each, plus related searches, for any keyword and country
- [Google Trends Scraper API for Interest Over Time](https://apify.com/cleanscrape/google-trends-scraper): search interest over time, by region, related queries and trending searches

All CleanScrape tools: [apify.com/cleanscrape](https://apify.com/cleanscrape)

# Actor input Schema

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

One page per line: a full link or just a domain (example.com). You can also paste any text with links in it. Each repeated page is audited once.

## `sitemapUrl` (type: `string`):

Audit the pages listed in a sitemap, such as https://example.com/sitemap.xml. Sitemap indexes and .xml.gz files work too. Up to "Maximum pages".

## `datasetId` (type: `string`):

A dataset whose rows hold page links, for example the results of a scraper run.

## `datasetField` (type: `string`):

The field that holds each row's link, such as website, or a path through a list, such as organicResults.url. Empty: the result links of a search-results row (organicResults), else the first of url, website, link, pageUrl, domain and the like.

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

Each page is audited once per device; each audit is one row and one charge.

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

The Lighthouse categories to score. All five take about as long as one.

## `maxPages` (type: `integer`):

The most pages to audit in one run, after repeats are removed. An audit takes 10-60 seconds, so about 100 pages fit in an hour.

## `runsPerPage` (type: `integer`):

Lighthouse scores move a little between runs. With 3 or 5, each page is audited that many times and the median run is kept (the method Lighthouse CI uses); the row shows the score of every run. Each run is charged.

## `maxWaitSeconds` (type: `integer`):

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

## `saveReports` (type: `boolean`):

The complete Lighthouse report for each audit, the one Chrome DevTools shows, with a link in each row.

## `saveScreenshots` (type: `boolean`):

A full-page screenshot of each page as loaded, with a link in each row.

## `trackChanges` (type: `boolean`):

Remember each page's scores in your account and show how they changed since your previous run: handy on a schedule, to spot a page that got slower.

## `googleApiKey` (type: `string`):

A Google Cloud API key with the "Chrome UX Report API" enabled. It is stored encrypted and used only for that API.

## Actor input object example

```json
{
  "urls": [
    "https://www.wikipedia.org/"
  ],
  "devices": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo",
    "agentic-browsing"
  ],
  "maxPages": 100,
  "runsPerPage": 1,
  "maxWaitSeconds": 35,
  "saveReports": true,
  "saveScreenshots": true,
  "trackChanges": false
}
```

# Actor output Schema

## `audits` (type: `string`):

No description

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

No description

## `reports` (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://www.wikipedia.org/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cleanscrape/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://www.wikipedia.org/"] }

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

```

## MCP server setup

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