# Lighthouse PageSpeed Audit: Core Web Vitals & Score Monitor (`promur/lighthouse-pagespeed-audit`) Actor

Bulk PageSpeed audits with Google Lighthouse in our own Chrome: performance, accessibility, best-practices and SEO scores, LCP, CLS, TBT, fixes with savings, real-user Core Web Vitals (CrUX, your own key) and a score-drop monitor. No API quota.

- **URL**: https://apify.com/promur/lighthouse-pagespeed-audit.md
- **Developed by:** [PROMUR s.r.o.](https://apify.com/promur) (community)
- **Features:** Limited permissions
- **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 auditeds

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 PageSpeed Audit: Core Web Vitals & Score Monitor

Audit **hundreds of pages with Google Lighthouse** in one run - **performance, accessibility, best-practices and SEO scores (0-100)**, the **Core Web Vitals lab metrics** (LCP, CLS, TBT, FCP, Speed Index), the **fixes with their estimated savings**, and the checks that failed - in one clean table ready for Google Sheets, Looker Studio, your client report or an AI agent. Add your own free Google API key and every row also gets the **real-user Core Web Vitals** from the Chrome UX Report (passed / failed, with up to 40 weeks of history). Or switch on the **monitor** and get only the pages whose scores really moved.

Lighthouse runs in the Actor's own Chrome with Google's own settings - no PageSpeed Insights quota, no shared API key.

### Why this Actor

**Price, quality, reliability, responsibility - in balance:**

- 💵 **Fair price** - $0.025 per audited page and device, no start fee. Pages that robots.txt does not allow, that do not load or that are not web pages are free rows.
- 🔍 **Actionable rows** - four category scores, seven lab metrics, the improvements that did not pass with time and byte savings, and the failed accessibility / best-practices / SEO checks.
- 🔁 **Dependable runs** - pages are audited one after another on two dedicated CPU cores, so they never compete for the CPU and scores stay comparable; in monitor mode a score drop is confirmed by a second audit before it is reported.
- 🤝 **Responsible auditing** - each site's robots.txt is respected (a disallowed page is never opened), bot checks are never worked around, and real-user data comes from Google's open CrUX dataset with your own key.

**What you get:**

- 📊 **Lighthouse 13 scores** - performance, accessibility, best practices, SEO, on mobile (Google's ranking device), desktop or both.
- ⏱️ **Lab Core Web Vitals** - Largest Contentful Paint, Cumulative Layout Shift, Total Blocking Time, First Contentful Paint, Speed Index, Time to Interactive, server response time, page weight, main-thread and JavaScript time.
- 🛠️ **Fixes ranked by saving** - render-blocking resources, unused CSS / JavaScript, caching, image delivery, LCP discovery and the other Lighthouse insights, largest saving first.
- 👥 **Real users (optional)** - with your free Google API key: the 75th-percentile LCP, INP, CLS, FCP and TTFB of real Chrome users over the last 28 days, the Core Web Vitals verdict, and a 40-week weekly history.
- 🔔 **Score monitor** - each page is compared with its usual score (median of its last 6 audits); only real moves are saved, with the old and new value.

### Use cases

- **SEO and web agencies** - a weekly Core Web Vitals report for every client site, with the fixes to give developers.
- **Release checks** - audit key pages after each deploy and get an alert when performance drops.
- **E-commerce** - watch product and category templates on mobile, where Google ranks.
- **Competitor benchmarks** - compare your pages with competitors' on the same settings.
- **AI agents** - structured performance data via the Apify API or MCP server.

### How to use

1. Paste the page URLs under **Page URLs** (one per line).
2. Pick **Device** (mobile, desktop or both) and the **Categories**.
3. Optional: add your **Google API key** for real-user data, or switch on **Monitor mode** with a feed name and schedule the Actor (Console → Schedules), e.g. weekly.
4. Click **Start**. Open the **Audits** and **Fixes** views, or download JSON, CSV or Excel.

```json
{
    "urls": ["https://www.example.com", "https://www.example.com/shoes"],
    "strategy": "both",
    "onlyChanges": true,
    "feedName": "example-weekly"
}
```

**Getting a Google API key (2 minutes, free):** Google Cloud Console → APIs & Services → Library → *Chrome UX Report API* → Enable; then Credentials → Create credentials → API key. Paste it under *Google API key*. It is stored encrypted, sent only to Google in a request header, and never logged. Lighthouse itself needs no key.

### Output

One row per page and device:

`url`, `finalUrl`, `strategy`, `status`, `message`, `performanceScore`, `accessibilityScore`, `bestPracticesScore`, `seoScore`, `lcpMs`, `fcpMs`, `tbtMs`, `cls`, `speedIndexMs`, `ttiMs`, `serverResponseMs`, `totalByteWeight`, `mainThreadMs`, `jsExecutionMs`, `opportunities`, `failedAudits`, `runWarnings`, `lighthouseVersion`, `benchmarkIndex`, `auditedAt`, real-user fields (`fieldSource`, `fieldCoreWebVitals`, `fieldLcpP75Ms`, `fieldInpP75Ms`, `fieldClsP75`, `fieldFcpP75Ms`, `fieldTtfbP75Ms`, `fieldPeriodStart`, `fieldPeriodEnd`, `fieldHistory`, `fieldDataSource`), monitor fields (`changeType`, `changes`, `usualPerformanceScore`, `confirmedByRerun`), `input`, `scrapedAt`.

```json
{
    "url": "https://www.example.com/",
    "strategy": "mobile",
    "status": "ok",
    "performanceScore": 71,
    "accessibilityScore": 92,
    "bestPracticesScore": 96,
    "seoScore": 100,
    "lcpMs": 3410,
    "cls": 0.02,
    "tbtMs": 280,
    "opportunities": [
        { "id": "render-blocking-insight", "title": "Render blocking requests", "displayValue": "Est savings of 1,200 ms", "savingsMs": 1200, "savingsBytes": null, "score": 0 }
    ],
    "fieldSource": "page",
    "fieldCoreWebVitals": "failed",
    "fieldLcpP75Ms": 3100,
    "fieldInpP75Ms": 180,
    "fieldClsP75": 0.05
}
```

| Field | Meaning |
| --- | --- |
| `performanceScore` ... `seoScore` | Lighthouse category scores, 0-100 |
| `lcpMs`, `cls`, `tbtMs` ... | lab metrics measured by Lighthouse on the chosen device |
| `opportunities` | improvements that did not pass, largest saving first: `savingsMs`, `savingsBytes` |
| `failedAudits` | failed accessibility, best-practices and SEO checks (`category`, `id`, `title`) |
| `fieldSource` | `page` (data for this exact page), `origin` (the whole site, when the page has too little traffic) or `none` |
| `fieldCoreWebVitals` | `passed` when real users' LCP ≤ 2.5 s, INP ≤ 200 ms and CLS ≤ 0.1 at the 75th percentile; otherwise `failed` |
| `changeType` | monitor mode: `first-check` or `changed`, with `changes` (`field`, `usual`, `now`) |
| `status` | `ok`; free rows: `robots_disallowed`, `not_found`, `blocked`, `not_html`, `invalid`, `error` |

**Run report:** a `SUMMARY` record (Storage → Key-value store) with pages, audits charged, pages changed and counts per status.

### Pricing

**$0.025 per audited page and device** - no start fee, no subscription.

- 50 pages on mobile: **$1.25**.
- A weekly monitor of 20 client pages on mobile and desktop: **$1.00 a week**.

In monitor mode every audited page is charged, also when nothing moved (the audit still ran); the confirming second audit of a score move is free. Set *Maximum cost per run* in the run options: the Actor stops cleanly at that amount.

### FAQ

**Is this the same as PageSpeed Insights?** It runs the same open-source Lighthouse with the same mobile and desktop settings. Scores can differ by a few points from PageSpeed Insights, as they also do between two PageSpeed Insights runs, because the measuring machine differs. Use the same Actor for comparisons over time.

**Why do scores move between runs?** Lighthouse performance scores vary by about 5-10 points for the same page. The monitor compares with the median of recent audits and re-checks a drop before reporting it.

**Why is real-user data empty?** Add a Google API key with the Chrome UX Report API enabled. If the key is set and `fieldSource` is `none`, Chrome has too few visitors on that page and site to publish data.

**How long does an audit take?** Usually 10-30 seconds. A page that keeps loading (endless analytics or chat widgets) is scored after 35 seconds, with a run warning, as Lighthouse does.

**Does it log in or fill forms?** No. Public pages only; pages behind a login or a bot check are reported, not worked around.

### Support

A page that scores oddly? Open an issue on the **Issues** tab with the URL and the run link - we usually look at it fast.

# Actor input Schema

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

One page per line (up to 500 per run). <code>example.com</code> and <code>https://example.com</code> both work; the same page twice is audited once. Each audit takes about 10-35 seconds, one after another, so a long list needs a longer run timeout.

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

Lighthouse's own mobile settings (Moto G Power screen, slow 4G, 4× CPU slowdown, simulated - the same as PageSpeed Insights' mobile tab) or its desktop settings. Both = two rows per page, each one audit.

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

Which Lighthouse categories to score (0-100). The price is the same whatever you pick.

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

How many performance improvements that did not pass to list (largest estimated saving first), with the time and bytes they could save. 0 = none.

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

Your own free Google API key with the <b>Chrome UX Report API</b> enabled (Google Cloud Console → APIs & Services → Library → Chrome UX Report API → Enable; then Credentials → Create API key). With it, each row also gets the real-user Core Web Vitals of the last 28 days (LCP, INP, CLS, FCP, TTFB at the 75th percentile, and passed / failed) for the page, or for the whole site when the page has too little traffic. Your key, your free quota (150 lookups a minute); it is stored encrypted and never logged.

## `includeFieldHistory` (type: `boolean`):

With a Google API key: add the weekly 75th-percentile LCP, INP and CLS of the last 40 weeks (fieldHistory), to see trends and the effect of releases.

## `onlyChanges` (type: `boolean`):

Compare each page and device with its usual scores (the median of its last 6 audits under the same feed name) and save only pages that moved: performance by the threshold or more (confirmed by a second, free audit, so Lighthouse's normal score noise is not reported), another category by its threshold, or the real-user Core Web Vitals verdict flipping. The first run saves every page as first-check. Every audited page is charged, also when it did not change.

## `performanceThreshold` (type: `integer`):

Monitor mode: how many points the performance score must move from its usual value. The same page can vary by about 5-10 points between audits.

## `otherThreshold` (type: `integer`):

Monitor mode: how many points accessibility, best practices or SEO must move. These change only when the page changes.

## `feedName` (type: `string`):

Keeps separate memories for separate monitors (e.g. one per client). Stored in your own account (key-value store <code>pagespeed-audit-state</code>).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://www.allbirds.com"
  ],
  "strategy": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "maxOpportunities": 10,
  "includeFieldHistory": false,
  "onlyChanges": false,
  "performanceThreshold": 10,
  "otherThreshold": 5,
  "feedName": "default"
}
```

# Actor output Schema

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

url, finalUrl, strategy, status, performanceScore, accessibilityScore, bestPracticesScore, seoScore, lcpMs, fcpMs, tbtMs, cls, speedIndexMs, ttiMs, serverResponseMs, totalByteWeight, mainThreadMs, jsExecutionMs, opportunities, failedAudits, field data (fieldCoreWebVitals, fieldLcpP75Ms, fieldInpP75Ms, fieldClsP75 ...), monitor fields (changeType, changes, usualPerformanceScore), lighthouseVersion, auditedAt.

## `summary` (type: `string`):

Pages, devices, audits charged, pages changed (monitor), counts per status and the real-user data status.

# 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://apify.com",
        "https://www.allbirds.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("promur/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://apify.com",
        "https://www.allbirds.com",
    ] }

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

```

## MCP server setup

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