# Lighthouse Audit: Core Web Vitals, SEO & Speed Scores (`subtleasianmerch/lighthouse-audit`) Actor

Run Google Lighthouse audits on up to 2,000 pages a run and get scores, Core Web Vitals and failed audits as rows. Mobile and desktop, sitemaps, HTML reports and score-drop alerts. $0.025 an audit, or $0.004 with your own PageSpeed Insights key.

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

## Pricing

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

## Lighthouse Audit: Core Web Vitals, SEO & Speed Scores

Run **Google Lighthouse in bulk** and get every page's performance, accessibility, best-practices and SEO scores, Core Web Vitals and failed audits as table rows. Audit up to 2,000 pages a run on mobile and desktop, and pay nothing for pages that fail.

- 🚦 **The real Lighthouse 13.5,** run in Chrome on Apify with its default settings. No API key needed.
- ⚡ **Or PageSpeed Insights** with your free Google key: $0.004 an audit, with real-visitor data when available.
- 📊 **Scores, Core Web Vitals, failed audits and the HTML report** for every page and device.
- 🗺️ **Whole sites from a sitemap,** including sitemap indexes and .gz files.
- 🔔 **Score-drop alerts:** schedule it with a monitor ID and see what changed since the last run.
- 💸 **$0.025 per audit run here.** Pages that fail to load, time out or show a bot check are free.

**Try it:** the input comes pre-filled with two pages. Click **Start** to audit them on mobile, for $0.055, then add your own pages or sitemap.

### What you get

One row per page and device:

| Data | Details |
|---|---|
| Scores out of 100 | Performance, accessibility, best practices and SEO, plus agentic browsing if you choose it (new in Lighthouse 13: how well AI agents can read and use the page) |
| Core Web Vitals (lab) | Largest Contentful Paint, Cumulative Layout Shift and Total Blocking Time (the lab stand-in for Interaction to Next Paint), each rated good, needs improvement or poor |
| Other metrics | First Contentful Paint, Speed Index, Time to Interactive and server response time |
| Page weight | Bytes, number of requests, main-thread work and JavaScript execution time |
| Failed audits | Every audit scoring under 90 in the chosen categories, most important first, with Lighthouse's estimated savings, such as "Reduce unused CSS: Est savings of 129 KiB" |
| Report | A link to the full Lighthouse report, as HTML, or JSON for your own tools |
| Field data (PageSpeed Insights only) | Real Chrome users' LCP, INP, CLS, FCP and TTFB at the 75th percentile, each rated, when Google has them |
| Monitoring | The previous scores, the change, and `alert: true` when a score fell by your threshold (5 points by default) or more |

Each row also has the final address after redirects, the page title, Lighthouse's own warnings, its version, and the test machine's CPU benchmark.

**Fair charging:** you pay per page audited. Pages that don't load, time out, return an error or show a bot check are listed with the reason, free.

### Who it's for

- **SEO and web agencies:** audit every client page in one run, and send the scores and the HTML reports with your monthly report.
- **Developers and site owners:** check a release didn't make pages slower or less accessible, on a schedule, with alerts.
- **E-commerce teams:** compare product and category pages, and find the slow templates.
- **Accessibility reviewers:** list the accessibility audits each page fails, page by page.
- **Data teams:** feed Lighthouse scores into dashboards through the Apify API.

### How much does it cost?

| Event | Price each | Per 1,000 |
|---|---|---|
| Audit run here, per page and device | $0.025 | $25 |
| Audit through PageSpeed Insights, with your own key | $0.004 | $4 |
| Run start | $0.005 | |

**Worked examples:**

- **50 pages on mobile and desktop, run here:** 100 audits × $0.025 = $2.50, plus $0.005 for the run.
- **1,000 pages on mobile through PageSpeed Insights:** 1,000 × $0.004 = $4.00, plus $0.005. Google doesn't charge for the key within its free quota.
- **A weekly monitor of 20 pages on mobile, run here:** 20 × $0.025 = $0.50, plus $0.005: $0.505 a week.

**Free:** pages that fail to load, time out or return an error, pages that show a bot check, and audits stopped by your maximum cost. Apify's platform usage is included in the price.

**Spending limit:** set a maximum cost per run, and the run stops cleanly when it's reached. Fewer categories make audits faster, but the price is the same.

### How to use it

1. **Add your pages,** one address per line, and/or **sitemaps**.
2. **Choose mobile, desktop or both,** and the **categories** you need. Each device is a separate audit.
3. **Choose how to run the audits:** here, in the Actor's own Chrome (the default), or through Google PageSpeed Insights with your own key.
4. **Click Start.** Run here, pages are audited one at a time: about 10 seconds for a light page, up to two minutes for the heaviest.
5. **Open the Scores view,** or download the results as Excel, CSV or JSON. Click a **Report** link to open that page's Lighthouse report.

#### Use PageSpeed Insights (your own Google API key)

1. In [Google Cloud Console](https://console.cloud.google.com/), create a project (or pick one), open **APIs & Services → Library**, and enable the **PageSpeed Insights API**.
2. Under **APIs & Services → Credentials**, create an **API key**. It's free; Google gives each key a daily quota (see the key's **Quotas** page). Restricting the key to the PageSpeed Insights API is a good idea.
3. In this Actor, set **How to run the audits** to **Google PageSpeed Insights** and paste the key. Apify stores it encrypted; it never appears in the results or the log.

Audits then run on Google's machines, 8 at a time. Each row also gets `fieldData`: real Chrome users' Core Web Vitals for the page, or for the site when the page has few visitors. The "agentic browsing" category isn't available this way.

#### Audit a whole site

Add the site's sitemap (usually `https://www.example.com/sitemap.xml`) under **Sitemaps** and set **Pages per sitemap**. Sitemap indexes are followed one level down, and `.xml.gz` files are fine.

#### Get alerts when scores drop

1. Enter a **Monitor ID**, for example `my-site`.
2. Set **Alert when a score falls by** (5 points by default).
3. Schedule the Actor with the same input, for example weekly.

Each run then compares every page with the last run. Use the **Score changes** view, or filter on `alert = true`.

### Example input

```json
{
  "urls": ["https://www.example.com", "https://www.example.com/pricing"],
  "sitemapUrls": ["https://www.example.com/sitemap.xml"],
  "maxPagesPerSitemap": 50,
  "devices": ["mobile", "desktop"],
  "categories": ["performance", "accessibility", "best-practices", "seo"],
  "saveReport": "html",
  "monitorId": "my-site",
  "alertDrop": 5
}
```

### Example output

One row per page and device. A real row from a test run on Apify (2 November 2026), shortened:

```json
{
  "url": "https://www.python.org/",
  "finalUrl": "https://www.python.org/",
  "device": "mobile",
  "status": "ok",
  "pageTitle": "Welcome to Python.org",
  "performance": 85,
  "accessibility": 75,
  "bestPractices": 100,
  "seo": 92,
  "agenticBrowsing": null,
  "largestContentfulPaintMs": 3891,
  "cumulativeLayoutShift": 0.003,
  "totalBlockingTimeMs": 98,
  "firstContentfulPaintMs": 2126,
  "speedIndexMs": 2126,
  "timeToInteractiveMs": 3891,
  "serverResponseTimeMs": 3,
  "lcpRating": "needs improvement",
  "clsRating": "good",
  "tbtRating": "good",
  "fcpRating": "needs improvement",
  "pageWeightBytes": 474141,
  "requestCount": 23,
  "mainThreadWorkMs": 1378,
  "javascriptExecutionMs": 319,
  "failedAuditCount": 17,
  "failedAudits": [
    {
      "category": "performance",
      "id": "render-blocking-insight",
      "title": "Render-blocking requests",
      "score": 0,
      "displayValue": "Est savings of 1,190 ms",
      "savings": {
        "FCP": 1200,
        "LCP": 1200
      }
    },
    {
      "category": "performance",
      "id": "unused-css-rules",
      "title": "Reduce unused CSS",
      "score": 0,
      "displayValue": "Est savings of 129 KiB",
      "savings": {
        "FCP": 550,
        "LCP": 450
      }
    },
    "… 15 more"
  ],
  "runWarnings": [],
  "lighthouseVersion": "13.5.0",
  "benchmarkIndex": 2824,
  "auditedAt": "2026-11-02T10:19:03.910Z",
  "error": null,
  "reportUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/report-0011-mobile?signature=<signature>"
}
```

**With a monitor ID,** each row also has `isNew`, `previousScores`, `scoreChanges` (for example `{ "performance": -12 }`), `previousAuditedAt`, `alert` and `alertReasons` (for example `["performance fell from 90 to 78"]`).

**With PageSpeed Insights,** each row has `engine: "pagespeed"` and `fieldData`, or `null` when Google has no field data for the page or site. `fieldData` holds:

- `scope`: `page`, or the whole site when the page has too few visitors;
- `overall`: Google's overall rating;
- `lcpP75Ms`, `inpP75Ms`, `clsP75`, `fcpP75Ms` and `ttfbP75Ms`: the 75th percentiles;
- `lcpRating`, `inpRating`, `clsRating`, `fcpRating` and `ttfbRating`: good, needs improvement or poor.

**Reports:** the report link is signed, so it opens without logging in to Apify. Reports are kept as long as the run's storage (your plan's data retention).

**Pages that couldn't be audited** have `status` `failed` or `blocked`, no scores, and the reason in `error`. They are free.

**Run summary:** the `RUN_SUMMARY` record in the run's key-value store has:

- pages and audits, and how many were audited, blocked or failed;
- average scores per device, and the alerts;
- each sitemap's page count.

### Integrations

- **Apify API:** start a run and get the rows back in one call.

  ```bash
  curl -X POST "https://api.apify.com/v2/acts/subtleasianmerch~lighthouse-audit/run-sync-get-dataset-items?token=YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"urls": ["https://www.example.com"], "devices": ["mobile", "desktop"]}'
  ```

- **Schedules:** audit the same pages weekly with a monitor ID, and each run shows what changed.

- **Webhooks, Make, Zapier and n8n:** pass the scores, or only the rows with `alert = true`, to your own tools when a run finishes.

- **Slack or email:** connect the run with Apify's integrations to hear about score drops.

- **Monitoring:** Apify's monitoring can alert you by email or Slack when a scheduled run fails.

### FAQ

**Is it legal to use?** Run here, the Actor uses the open-source Lighthouse (Apache-2.0 licence) in its own Chrome, on public pages you choose. In PageSpeed Insights mode, you call Google's API with your own key, so Google's API terms apply to you as Google's customer. Make sure your use of the pages and the data fits their terms. This isn't legal advice.

**Do I need a Google API key?** No, unless you choose PageSpeed Insights. By default Lighthouse runs inside the Actor.

**Which should I choose?** Run here for audits that don't depend on Google, the "agentic browsing" category, or pages Google can't reach. Choose PageSpeed Insights for lower prices, faster runs and real visitors' data.

**Is my Google API key safe?** It's a secret input: Apify stores it encrypted, and the Actor never writes it to the results, the log or the run summary.

**What's the difference between lab data and field data?** Lighthouse loads each page once in a controlled setting: that's lab data. Real visitors' Core Web Vitals (field data, as in Google Search Console) come from Chrome users through Google's Chrome UX Report. They're only available with PageSpeed Insights, and only for pages or sites with enough visitors.

**Why is my score different from the PageSpeed Insights website?** Lighthouse's performance score varies between machines and between runs, more on heavy pages; Google says the same. Every audit run here uses the same machine type (2 CPU cores, 8 GB), and each row shows the machine's CPU benchmark. So runs of this Actor compare well with each other. PageSpeed Insights mode uses Google's machines, like the website. Don't mix the two in one comparison.

**How are mobile audits run?** Mobile audits simulate a mid-range phone on a slow 4G connection, as Lighthouse does by default. Desktop audits use Lighthouse's desktop settings.

**How long does a big run take?** Run here, pages are audited one at a time, so they don't slow each other down. Expect about 60 audits an hour for very heavy home pages, up to 300 an hour for light pages. PageSpeed Insights runs 8 at a time.

**Can I audit pages behind a login?** No. Only pages anyone can open. Sites that block cloud servers with a bot check are listed as blocked, free. The Actor doesn't try to get past bot checks.

**What does "agentic browsing" mean?** It's a Lighthouse 13 category that checks whether AI agents can understand and use the page (its accessibility tree, llms.txt and forms). Turn it on under Categories.

**Can I get the report as a PDF?** Open the HTML report and print it to PDF from your browser.

**What happens with a page that doesn't exist?** It's listed with `status: failed` and the reason, and costs nothing.

### Related Actors

More Actors from the same developer that work well with this one:

| Actor | Use it to |
|---|---|
| [SEO Site Audit Crawler](https://apify.com/subtleasianmerch/seo-site-audit) | crawl the whole site for on-page SEO issues, broken links and redirects |
| [Website Screenshot API](https://apify.com/subtleasianmerch/website-screenshot-api) | capture how the same pages look on desktop and phones |

Questions, bugs or ideas? Open an issue on this Actor's **Issues** tab.

# Actor input Schema

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

Web addresses, one per line, e.g. https://www.example.com/pricing. "example.com" works too (https is added). Each page is audited once per chosen device.

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

Audit the pages listed in these sitemaps (XML or .xml.gz; a sitemap index is followed one level down), e.g. https://www.example.com/sitemap.xml. Added to the pages above.

## `maxPagesPerSitemap` (type: `integer`):

At most this many pages from each sitemap, in the order the sitemap lists them. A run audits up to 2,000 pages in all.

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

Mobile is Lighthouse's default (a mid-range phone on a slow 4G connection). Desktop uses Lighthouse's desktop settings. Choosing both audits each page twice, and each audit is charged.

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

Lighthouse categories to score. Fewer categories make each audit faster; the price per audit is the same. "Agentic browsing" (new in Lighthouse 13) checks how well AI agents can read and use the page.

## `engine` (type: `string`):

Run Lighthouse here: in this Actor's own Chrome, no key needed, $0.025 an audit. Google PageSpeed Insights: Google's machines run Lighthouse with your own free Google API key, which is faster and cheaper ($0.004 an audit) and adds real visitors' Core Web Vitals (field data) when Google has them. Scores from the two can differ.

## `pageSpeedApiKey` (type: `string`):

Only for "Google PageSpeed Insights". Free: in Google Cloud Console create a project, enable the "PageSpeed Insights API", then create an API key under APIs & Services → Credentials. Google gives each key a free daily quota. The key is stored encrypted and never shown in results or logs.

## `saveReport` (type: `string`):

Saves each page's full Lighthouse report in the run's key-value store and links it in the results (reportUrl). HTML opens as the familiar Lighthouse report in a browser; JSON is the raw result for your own tools.

## `locale` (type: `string`):

The language of audit titles and the report.

## `monitorId` (type: `string`):

Give scheduled runs the same ID (letters, digits and dashes) to compare each page's scores with the last run: the results then show the previous scores, the change and an alert when a score falls. Leave empty for one-off audits.

## `alertDrop` (type: `integer`):

Points (out of 100). With a monitor ID, a page whose score in any category falls by this much or more since the last run is marked alert: true, with the reason.

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

A page that takes longer is stopped and listed as failed, free. Heavy pages (big news and shop home pages) can take 60–100 s.

## Actor input object example

```json
{
  "urls": [
    "https://www.wikipedia.org",
    "https://developer.mozilla.org/en-US/"
  ],
  "maxPagesPerSitemap": 50,
  "devices": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "engine": "local",
  "saveReport": "html",
  "locale": "en-US",
  "alertDrop": 5,
  "timeoutSecs": 120
}
```

# Actor output Schema

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

The dataset rows this run produced.

## `runSummary` (type: `string`):

Counts, costs and anything skipped, saved as RUN_SUMMARY.

## `files` (type: `string`):

Files saved in the run's key-value store; each dataset row links to its own.

# 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",
        "https://developer.mozilla.org/en-US/"
    ],
    "devices": [
        "mobile"
    ],
    "categories": [
        "performance",
        "accessibility",
        "best-practices",
        "seo"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("subtleasianmerch/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",
        "https://developer.mozilla.org/en-US/",
    ],
    "devices": ["mobile"],
    "categories": [
        "performance",
        "accessibility",
        "best-practices",
        "seo",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("subtleasianmerch/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",
    "https://developer.mozilla.org/en-US/"
  ],
  "devices": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ]
}' |
apify call subtleasianmerch/lighthouse-audit --silent --output-dataset

```

## MCP server setup

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