# Bulk Lighthouse & PageSpeed Test: Sitemap, Core Web Vitals (`datatoolsforall/bulk-lighthouse-pagespeed-audit`) Actor

Run real Lighthouse 13 audits on a URL list or a whole sitemap, mobile and desktop, with no Google API key or quota. Get performance, accessibility, best-practices and SEO scores, LCP, CLS, TBT, FCP, TTFB, top fixes and pass/fail budgets per page. $0.02 per audit; failed audits are free.

- **URL**: https://apify.com/datatoolsforall/bulk-lighthouse-pagespeed-audit.md
- **Developed by:** [Data Tools for All](https://apify.com/datatoolsforall) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.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.
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 & PageSpeed Test: Sitemap, Core Web Vitals

Run real **Lighthouse audits** on many URLs or a whole **sitemap**, for **mobile and desktop**, without a Google API key. Each page gets its **performance, accessibility, best-practices and SEO scores**, **Core Web Vitals lab metrics** (LCP, CLS, TBT, FCP, Speed Index, TTFB), the top suggested fixes and optional pass/fail budgets, as one flat row. It costs **$0.02 per audit** (one URL on one device; less on paid Apify plans), and failed audits are free. To try it, press **Start**: the prefilled input audits `https://example.com` once.

The audits run in **Lighthouse 13.6.0 inside the actor**, in headless Google Chrome. Google's PageSpeed Insights quota does not apply, so no API key is needed. If you have your own PageSpeed Insights API key, you can add it to get real-user **Chrome UX Report (CrUX) field data** as well.

### Use with AI agents

- **Actor ID:** `datatoolsforall/bulk-lighthouse-pagespeed-audit`
- **MCP URL** (Claude, Cursor, VS Code, ChatGPT): https://mcp.apify.com/?tools=datatoolsforall/bulk-lighthouse-pagespeed-audit (sign in with your Apify account; runs bill to it)
- **Claude Code:** `claude mcp add --transport http lighthouse "https://mcp.apify.com/?tools=datatoolsforall/bulk-lighthouse-pagespeed-audit"`
- **Minimal input:** `{"urls":["https://example.com"],"strategies":["mobile"]}` -> one audit, at most $0.02 (plus the $0.0001 start fee)
- **Cost guard:** every pasted URL is audited once per selected device. With `sitemapUrl`, always set `maxUrls`: the default of 50 pages costs at most $1.00 per device.
- **Example prompt:** "Run a mobile Lighthouse audit on https://example.com and give me the performance score, LCP and the top 3 fixes."
- **Python:** `from langchain_apify import ApifyActorsTool; ApifyActorsTool("datatoolsforall/bulk-lighthouse-pagespeed-audit")`

### What data can you get

One row per URL and device. Every row has the same fields, in this order:

| Field | What it is |
|---|---|
| `url`, `finalUrl` | The URL exactly as you entered it (so you can match rows to your list), and where the page ended up after redirects. Sitemap pages show the address from the sitemap |
| `strategy` | `mobile` or `desktop` |
| `engine` | `lighthouse-local` (default) or `pagespeed-insights` (only with your own API key) |
| `lighthouseVersion` | For example `13.6.0` |
| `performanceScore`, `accessibilityScore`, `bestPracticesScore`, `seoScore` | Whole numbers from 0 to 100. `null` if that category was not selected, or if Lighthouse could not compute it (then `errorCode` is `INCOMPLETE_AUDIT`) |
| `lcpMs`, `fcpMs`, `tbtMs`, `speedIndexMs`, `ttfbMs` | Lab timings in milliseconds (Largest Contentful Paint, First Contentful Paint, Total Blocking Time, Speed Index, time to first byte) |
| `cls` | Lab Cumulative Layout Shift, rounded to 3 decimals |
| `fieldData` | Real-user CrUX 75th percentiles `{lcpP75Ms, inpP75Ms, clsP75, fcpP75Ms, ttfbP75Ms, overallCategory, origin}`. Only filled when you add your own PSI key; otherwise `null` |
| `opportunities` | The biggest suggested fixes, `[{id, title, savingsMs, savingsBytes}]`, largest estimated time saving first. Only fixes with an estimated time or size saving are listed, so a fast page can have an empty list |
| `budgetFailures`, `passedBudgets` | Which of your budgets the page missed, for example `"lcpMs: 3815 > 2500"`, and whether it passed all of them |
| `reportUrl` | A link to the full Lighthouse HTML report when `saveFullReport` is on (also in PageSpeed Insights mode) |
| `errorCode`, `error` | `null` on success; otherwise the reason the audit failed (see the FAQ). Rows with an `errorCode` are not charged |
| `warnings` | Lighthouse run warnings, for example when a page never stopped loading |
| `auditedAt` | Time of the audit (ISO 8601) |

In the Console, the **Overview** table shows the URL, device, performance score, LCP, CLS, TBT, SEO score, accessibility score, budget result and error code. The **All metrics** view shows every field, including `errorCode`, `passedBudgets` and `lighthouseVersion`. You can export the results as CSV, Excel, JSON or XML.

### How to use

1. In **URLs to audit**, add the pages you want to test, one per line. Every URL in this list is audited (up to 1,000 per run). You can also add a **Sitemap URL**, or use both.
2. Under **Devices**, choose mobile, desktop or both. Each device is a separate audit.
3. If you use a sitemap, set **Maximum pages from the sitemap** (the form starts at 1 so a first test stays cheap; it does not limit the pasted list). Optionally set **Pass/fail budgets** (for example a minimum performance score of 70 and a maximum LCP of 2,500 ms) and **Save full Lighthouse report**.
4. Click **Start**. Audits run one after another. Rows appear in the dataset as each audit finishes.
5. Download the results, or connect them to Google Sheets, Slack, Make, Zapier or your own code through the API.

Use it for pre-release performance checks, monthly SEO and Core Web Vitals reports across a whole site, comparing mobile and desktop, or flagging slow pages against agreed budgets.

### Input example

```json
{
    "urls": ["https://example.com"],
    "maxUrls": 1
}
```

A larger example that uses a sitemap, both devices and budgets:

```json
{
    "sitemapUrl": "https://www.example.com/sitemap.xml",
    "maxUrls": 50,
    "strategies": ["mobile", "desktop"],
    "categories": ["performance", "accessibility", "best-practices", "seo"],
    "budgets": { "performanceScore": 70, "lcpMs": 2500, "cls": 0.1 },
    "maxOpportunities": 5,
    "saveFullReport": false
}
```

### Output example

This row comes from a real local test run (python.org, mobile, 2026-11-25):

```json
{
    "url": "https://www.python.org/",
    "finalUrl": "https://www.python.org/",
    "strategy": "mobile",
    "engine": "lighthouse-local",
    "lighthouseVersion": "13.6.0",
    "performanceScore": 88,
    "accessibilityScore": 75,
    "bestPracticesScore": 100,
    "seoScore": 92,
    "lcpMs": 3713,
    "fcpMs": 2113,
    "tbtMs": 0,
    "cls": 0,
    "speedIndexMs": 2113,
    "ttfbMs": 600,
    "fieldData": null,
    "opportunities": [
        { "id": "render-blocking-insight", "title": "Render-blocking requests", "savingsMs": 1250, "savingsBytes": null },
        { "id": "unused-css-rules", "title": "Reduce unused CSS", "savingsMs": 650, "savingsBytes": 130676 },
        { "id": "unused-javascript", "title": "Reduce unused JavaScript", "savingsMs": 320, "savingsBytes": 60581 },
        { "id": "unminified-css", "title": "Minify CSS", "savingsMs": 160, "savingsBytes": 24673 },
        { "id": "cache-insight", "title": "Use efficient cache lifetimes", "savingsMs": 150, "savingsBytes": 33146 }
    ],
    "budgetFailures": [],
    "passedBudgets": null,
    "reportUrl": null,
    "errorCode": null,
    "error": null,
    "warnings": [],
    "auditedAt": "2026-11-26T01:47:39.638Z"
}
```

A failed audit has the same fields, with `errorCode` and `error` filled in. Failed audits are not charged:

```json
{ "url": "https://nonexistent-host.invalid/", "strategy": "mobile", "performanceScore": null, "errorCode": "DNS_FAILURE",
  "error": "The domain name \"nonexistent-host.invalid\" could not be resolved (DNS lookup failed)." }
```

### How much does it cost?

You pay per **completed audit**: one URL on one device.

| Event | Price | When it is charged |
|---|---|---|
| `lighthouse-audit` | **$0.02** on the Free plan; **$0.018**, **$0.016** and **$0.014** on the Bronze, Silver and Gold discount tiers of paid Apify plans | A Lighthouse audit run inside the actor that returned scores |
| `psi-audit` | **$0.003** on every plan | An audit run through PageSpeed Insights with **your own** API key that returned scores |

Failed audits (DNS failures, blocked pages, HTTP errors, timeouts) and invalid URLs are **not charged**. Apify also charges its standard small run-start fee ($0.00005 per GB of run memory, so $0.0001 at the default 2 GB). The pricing tab shows the exact price for your plan.

Worked examples with Lighthouse in the actor, at the Free-plan price:

- 100 pages on mobile = 100 audits = **$2.00**
- 1,000 pages on mobile = **$20.00**, or 1,000 pages on mobile and desktop = 2,000 audits = **$40.00**
- 10,000 audits = **$200.00**

Apify's free plan includes $5 of monthly credit. That covers about **250 Lighthouse audits** (or about 1,600 audits with your own PSI key) each month.

To cap spending, set **Maximum cost per run** in the run options. The actor checks the remaining budget before each audit and stops cleanly when it runs out.

### Data source, limits and legality

- **Source:** [Lighthouse](https://github.com/GoogleChrome/lighthouse) 13.6.0 (open source, Apache-2.0) runs in this actor and drives headless Google Chrome. Each audit is one normal page load of the URL you supply, in a fresh browser.
- **Optional source:** the [PageSpeed Insights API v5](https://developers.google.com/speed/docs/insights/v5/get-started), only when you add your own API key. Calls then go to Google under your key and your quota, and are subject to the [Google APIs Terms of Service](https://developers.google.com/terms). The actor never calls PageSpeed Insights without your key, because the shared keyless quota is often used up: our test call without a key on 2026-11-25 returned HTTP 429 "Quota exceeded".
- **Lab data, not real users:** Lighthouse scores are lab measurements under simulated mobile or desktop conditions. Only the optional `fieldData` (with your key) contains real-user data from the Chrome UX Report.
- **Speed:** audits run one at a time, so the scores are not distorted by other audits running in parallel. In our local tests a light page took about 8 to 10 seconds and a heavy, script-rich page about 60 seconds. On the Apify platform, times depend on the memory (and therefore CPU) you give the run. A 1,000-URL run can take many hours. Split very large sites into several runs that can run in parallel.
- **What is not covered:** pages behind a login, pages that need cookies or form input, and sites that refuse automated visitors. A page that refuses the request (HTTP 401, 403 or 429) becomes a `BLOCKED` row. The actor does not try to get around blocks, CAPTCHAs or rate limits.
- **Please audit only sites you own or are authorized to test.**
- **Personal data:** the output contains only performance measurements and Lighthouse findings about the page. The actor collects no personal data.
- **Not affiliated with Google:** this actor is not affiliated with or endorsed by Google. Lighthouse is an open-source Google project, and PageSpeed Insights and Chrome are Google products; the actor runs the published Lighthouse package unchanged.

### Use via API, schedules, integrations, MCP

Start a run and get the results with one call (replace `<YOUR_APIFY_TOKEN>`). This example runs 2 audits ($0.04):

```bash
curl -X POST "https://api.apify.com/v2/acts/datatoolsforall~bulk-lighthouse-pagespeed-audit/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com"],"strategies":["mobile","desktop"]}'
```

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('datatoolsforall/bulk-lighthouse-pagespeed-audit').call({ urls: ['https://example.com'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Use **Schedules** in the Console for weekly or monthly site audits. Connect the dataset to Google Sheets, Slack, Make or Zapier with Apify integrations, or call the actor from AI agents through the Apify MCP server (see **Use with AI agents** above).

### FAQ and troubleshooting

**Why do scores change slightly between runs?** Lighthouse lab scores vary from run to run because of network timing, server response time and CPU load. Variation of a few points is normal. For decisions, compare several runs or use the median.

**Why is desktop usually faster than mobile?** The mobile audit simulates a mid-range phone on a slow 4G connection. The desktop audit simulates a fast computer on a fast connection.

**What do the error codes mean?**

- `INVALID_URL`: the input line is not a public http(s) address. Addresses on `localhost` or a private network (for example `192.168.x.x`, or a domain that resolves to one) are not audited. Not charged; no page was loaded.
- `DNS_FAILURE`: the domain name does not resolve.
- `BLOCKED`: the site answered HTTP 401, 403 or 429, so it refused the visit. Allow-list the audit or test a site you control.
- `HTTP_ERROR`: the page returned another error status, such as 404 or 500.
- `NAVIGATION_ERROR`: Chrome could not load the page, for example because of a certificate or connection error.
- `TIMEOUT`: the audit did not finish within **Audit timeout** (default 120 s).
- `NO_CONTENT`: the page painted nothing (for example, a blank page).
- `NOT_HTML`: the URL is a file, not a web page.
- `INCOMPLETE_AUDIT`: the page loaded, but Lighthouse could not compute a score you selected, usually the performance score because Total Blocking Time could not be measured. The row keeps the values that were measured. This mainly happens with **DevTools** throttling on pages that never stop loading (ads, analytics); the default **Simulate** throttling avoids it.
- `AUDIT_ERROR`: Lighthouse itself failed on this page.
- `PSI_QUOTA` / `PSI_ERROR`: only with your own key. Your Google quota ran out, or the API returned an error. An invalid key stops the run with a clear message.

None of these are charged.

**What does "The page loaded too slowly to finish within the time limit" in `warnings` mean?** Some pages keep loading scripts (analytics, chat widgets) and never become idle. Lighthouse waits up to 45 seconds (or half of **Audit timeout**, if that is shorter) and then audits what has loaded. With the default Simulate throttling the scores are still computed, and the warning tells you this happened. With DevTools throttling such a page can end without a performance score; the row then gets `INCOMPLETE_AUDIT` and is not charged.

**Are `#fragment` addresses audited separately?** Yes. `https://site.com/#/a` and `https://site.com/#/b` are different pages in hash-routed apps, so each is loaded and audited with its fragment. International domain names (for example `bücher.de`) are loaded in their punycode form; `url` still shows what you typed and `finalUrl` shows the loaded address.

**How do I get real-user (field) data?** Add your own PageSpeed Insights API key from the Google Cloud console in the input. The audits then run on Google's servers, `engine` becomes `pagespeed-insights`, and `fieldData` is filled when Google has CrUX data for the URL or its origin (`origin: true`). If your key's daily quota runs out during a run, the remaining pages are not sent to Google; they become `PSI_QUOTA` rows (not charged) and the run's status message says so.

### Related actors

From the same publisher, Data Tools for All:

- [Sitemap URL Extractor & Change Monitor](https://apify.com/datatoolsforall/website-sitemap-extractor) (`datatoolsforall/website-sitemap-extractor`): get every URL of a site from its sitemaps, filter them, then audit the ones you want here.
- [Domain Availability Checker](https://apify.com/datatoolsforall/bulk-domain-availability-checker) (`datatoolsforall/bulk-domain-availability-checker`): check registration status, registrar and expiry dates for many domains.
- [Secretary of State Search & New LLC Filings](https://apify.com/datatoolsforall/state-business-entity-search) (`datatoolsforall/state-business-entity-search`): look up LLCs and corporations in NY, TX, CO, OR and CT from official state open data.

# Changelog

This Actor's version history is a separate document: https://apify.com/datatoolsforall/bulk-lighthouse-pagespeed-audit/changelog.md

# Actor input Schema

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

Web pages to test, one per line, for example https://example.com. Every page in this list is audited (up to 1,000), once per device type, at $0.02 per audit. Each output row shows the address exactly as you typed it here. Audit only sites you own or are allowed to test.

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

Address of a sitemap.xml (or sitemap index, .xml.gz or plain-text sitemap). Up to 'Maximum pages from the sitemap' of its pages are audited (default 50, at most $1.00 per device), in addition to the URLs above.

## `strategies` (type: `array`):

Test as a mobile phone, a desktop computer, or both. Each device counts as one audit ($0.02) per URL, so both devices double the cost.

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

Which Lighthouse scores to compute. Lab metrics (LCP, CLS, TBT...) and opportunities need Performance.

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

How many pages to take from the sitemap. The default of 50 costs at most $1.00 per device. It does not limit the 'URLs to audit' list: every URL you paste is audited. With both devices selected, each page is two audits.

## `maxOpportunities` (type: `integer`):

How many of the biggest suggested fixes (for example 'Reduce unused JavaScript') to list per page. 0 turns the list off.

## `budgets` (type: `object`):

Flag pages that miss your targets. Scores are minimums (0-100); timings in milliseconds and CLS are maximums. Leave empty for no budgets.

## `saveFullReport` (type: `boolean`):

Also save the complete Lighthouse HTML report for every page in the run's key-value store (also with a PageSpeed Insights key). The link is in 'reportUrl'.

## `psiApiKey` (type: `string`):

Leave empty to run Lighthouse in this actor (default). If you add your own key, audits run on Google's PageSpeed Insights API instead and include real-user Chrome UX Report (CrUX) field data. Uses your Google quota under the Google APIs Terms.

## `throttlingMethod` (type: `string`):

'Simulate' (default, same as PageSpeed Insights) loads the page fast and models a slow connection. 'DevTools' really slows the connection down: closer to a real slow device, slower to run and noisier. With DevTools, pages that never stop loading (ads, analytics) can end without a performance score; such rows get errorCode INCOMPLETE_AUDIT and are not charged.

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

Maximum time for one audit (page load plus analysis). The page itself gets up to half of this, at most 45 s, to finish loading; slower pages are still audited with a warning. An audit that runs out of time is reported as a TIMEOUT error and not charged.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "maxUrls": 1,
  "maxOpportunities": 5,
  "saveFullReport": false,
  "throttlingMethod": "simulate",
  "timeoutSecs": 120
}
```

# Actor output Schema

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

Dataset items: one row per URL and device with performance, accessibility, best-practices and SEO scores (0-100), lab LCP, FCP, TBT, CLS, Speed Index and TTFB, top opportunities, budget results and errorCode (null on success).

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

Keys of the run's key-value store. When 'Save full Lighthouse report' is on, it holds one full Lighthouse HTML report per audit; each row's reportUrl links to its report.

# 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://example.com"
    ],
    "maxUrls": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("datatoolsforall/bulk-lighthouse-pagespeed-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://example.com"],
    "maxUrls": 1,
}

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

```

## MCP server setup

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