# PageSpeed & Core Web Vitals Checker: Bulk Lighthouse Audit (`gmyri/pagespeed-checker`) Actor

Bulk Google Lighthouse / PageSpeed audits from a URL list or sitemap: performance, SEO, accessibility scores, Core Web Vitals, top fixes, budget pass/fail, change vs last run, optional CrUX real-user data. $0.01 per page.

- **URL**: https://apify.com/gmyri/pagespeed-checker.md
- **Developed by:** [Giorgos Myrianthous](https://apify.com/gmyri) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

Run **Google Lighthouse (the PageSpeed Insights engine) in bulk** from a **URL list or a sitemap**. Each page gets **Performance, Accessibility, Best practices and SEO scores**, **Core Web Vitals** (LCP, CLS, TBT), TTFB, the **top fixes** with estimated savings, **budget pass/fail**, **change vs the previous run**, optional **real-user CrUX data** (LCP, INP, CLS) and an optional shareable HTML report. CSV-friendly flat fields, and no PageSpeed API key or quota needed.

💲 **$0.01 per page audit ($10 per 1,000).** Failed audits are free. Pay only for results. No subscription, and the Apify free plan's monthly credit covers small jobs.

**Also known as:** PageSpeed Insights bulk, Lighthouse API, Core Web Vitals checker, website speed test, LCP/CLS checker, page speed monitor, SEO score checker, accessibility audit, GTmetrix alternative, sitemap PageSpeed audit, performance budget CI check, Core Web Vitals monitoring, CrUX field data.

### Try it now (free-plan friendly)

1. Click **Start**. The prefilled input works as is. Runs a full mobile Lighthouse audit of books.toscrape.com, with budget pass/fail, in about 30 seconds.
2. Or paste this input into the JSON tab:

```json
{
  "urls": [
    "https://books.toscrape.com/"
  ],
  "budgets": {
    "minPerformanceScore": 70,
    "maxLcpMs": 2500,
    "maxCls": 0.1
  }
}
```

**Example output** (one dataset item, shortened):

```json
{
  "url": "https://books.toscrape.com/",
  "device": "mobile",
  "performanceScore": 97,
  "accessibilityScore": 87,
  "bestPracticesScore": 75,
  "seoScore": 91,
  "coreWebVitals": "good",
  "largestContentfulPaintMs": 2246,
  "cumulativeLayoutShift": 0,
  "totalBlockingTimeMs": 2,
  "serverResponseTimeMs": 102,
  "opportunities": [
    {
      "id": "render-blocking-resources",
      "title": "Eliminate render-blocking resources",
      "savingsMs": 270
    }
  ],
  "failedSeoAudits": [
    "Document does not have a meta description"
  ],
  "reportUrl": null,
  "passed": true,
  "failedBudgets": [],
  "topFix": "Eliminate render-blocking resources (~270 ms)",
  "performanceScoreChange": null
}
```

Small runs cost cents, and you can set a **Max cost per run** so you're never charged more.

### Use with AI agents / Apify MCP

Give your agent (Claude, ChatGPT, Cursor, n8n AI Agent, LangChain, OpenAI Agents SDK) this tool through **Apify's MCP server**:

```text
https://mcp.apify.com?tools=gmyri/pagespeed-checker
```

- **Example prompt:** "Run a mobile PageSpeed audit on https://example.com and list the top 3 fixes."
- **Why agents like it:** the input has one required field and documented defaults and enums. The output has stable, flat field names, errors are returned as items with an `error` field and are never charged, and each run writes a summary to the `OUTPUT` record.
- Agents that use `search-actors` find it by searching for: PageSpeed Insights bulk, Lighthouse API.

### API, Python, n8n, Make, Zapier

```bash
curl -X POST "https://api.apify.com/v2/acts/gmyri~pagespeed-checker/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"sitemapUrl":"https://example.com/sitemap.xml","maxUrls":20,"budgets":{"minPerformanceScore":70},"compareWithPreviousRun":true,"monitorName":"example"}'
```

- **Python:** `ApifyClient(token).actor("gmyri/pagespeed-checker").call(run_input={...})`
- **n8n / Make / Zapier:** use the Apify "Run Actor" action with `gmyri/pagespeed-checker`, then read the dataset items.

### Quick FAQ

- **Is this the same as PageSpeed Insights?** It runs the same engine (Lighthouse) with the same mobile/desktop presets. Lab scores vary a few points between runs and machines, just as they do on PageSpeed Insights.
- **Do I need a Google API key?** No. Lighthouse runs on Apify's servers.
- **Can I audit a whole site?** Yes. Set `sitemapUrl` (sitemap indexes work) and cap it with `maxUrls`.
- **How do budgets work?** Set e.g. `{"minPerformanceScore": 70, "maxLcpMs": 2500}`. Each row gets `passed` and `failedBudgets`, and OUTPUT gets `allBudgetsPassed`, which is handy for CI and alerts.
- **Can I track changes over time?** Turn on `compareWithPreviousRun` with a `monitorName` and schedule the Actor. Each row shows `performanceScoreChange`, `seoScoreChange` and `lcpChangeMs`.
- **Real-user data?** Add a free Google API key with the Chrome UX Report API enabled to get p75 field LCP, INP and CLS.
- **What if I set a spending limit?** The Actor stops cleanly at your *Max cost per run* and you're never charged above it.

### Details

### What you get per page

- **Lighthouse scores (0–100):** Performance, Accessibility, Best practices, SEO. These are the same scores PageSpeed Insights shows.
- **Core Web Vitals (lab):** LCP, CLS and TBT (the lab stand-in for INP), plus a `coreWebVitals` rating of good, needs-improvement or poor using Google's thresholds.
- **Other metrics:** FCP, Speed Index, Time to Interactive, server response time (TTFB), page weight and request count.
- **What to fix:** the top performance opportunities with estimated savings, plus failed SEO and accessibility audits.
- **Optional full HTML report:** a shareable `reportUrl` for each page, so you can send clients the full Lighthouse report.
- **Devices:** mobile (the PageSpeed Insights default), desktop, or both.
- **Bulk from a sitemap:** pass `sitemapUrl` (indexes supported) with a `maxUrls` cap.
- **Budgets (pass/fail):** set min scores and max LCP, TBT, CLS or page weight. Each row gets `passed` and `failedBudgets`, which is ideal for CI and alerts.
- **Trend monitoring:** `compareWithPreviousRun` with a `monitorName` adds `performanceScoreChange`, `seoScoreChange` and `lcpChangeMs`.
- **Real-user data (optional):** with your free Google API key (Chrome UX Report API) you get p75 field LCP, INP, CLS, FCP and TTFB.
- **CSV-friendly:** flat `topFix`, `opportunitiesText`, `seoIssuesText` and `accessibilityIssuesText` columns, alongside the detailed arrays.

### Typical uses

- Bulk PageSpeed checks for a sitemap, a client list or competitors, with no PageSpeed Insights API key and no quota.
- Scheduled Core Web Vitals monitoring: schedule the Actor, then send results to Google Sheets, Slack or a webhook.
- Agency prospecting: find sites with poor performance or SEO scores.
- An AI agent tool that answers "how fast is this page and what should I fix?".

### Input

| Field | Description |
|---|---|
| `urls` | Pages to audit. |
| `sitemapUrl` / `maxUrls` | Audit every page in a sitemap (capped). |
| `budgets` | Pass/fail thresholds, e.g. `{"minPerformanceScore": 70, "maxLcpMs": 2500}`. |
| `compareWithPreviousRun` / `monitorName` | Show changes vs the previous run. |
| `googleApiKey` | Optional: adds CrUX real-user metrics. |
| `device` | `mobile`, `desktop` or `both` (2 audits per URL). |
| `categories` | Any of performance, accessibility, best-practices, seo. All are run by default. |
| `saveHtmlReport` | Save the full HTML report and add `reportUrl`. |
| `maxOpportunities` | Number of top fixes to include. |

### Pricing

Pay per event: **$0.01 per page audit ($10 per 1,000)** plus Apify's standard $0.00005 Actor start. Failed audits (unreachable pages, timeouts) are free. With `device: both`, each URL counts as 2 audits.

### Notes

- Uses Google Lighthouse 12 in headless Chrome on Apify's servers. Lab scores vary a little between runs and differ from real-user (CrUX) field data, just as PageSpeed Insights lab scores do.
- Pages are audited one at a time for consistent results.
- It doesn't log in or bypass bot protection. Pages behind a challenge are reported with an error and not charged.

### Related tools

- [Website Audit All-in-One: SEO, PageSpeed, Broken Links, SSL](https://apify.com/gmyri/website-audit)
- [Broken Link Checker & SEO Audit: 404s, Redirects, Sitemap](https://apify.com/gmyri/site-health-audit)
- [Website Screenshot API: Full Page, Mobile & URL to PDF](https://apify.com/gmyri/website-screenshot)
- [Tech Stack Detector: Website Technology & CMS Lookup](https://apify.com/gmyri/tech-stack-detector)

💡 **Need several checks per site?** [Website Audit All-in-One](https://apify.com/gmyri/website-audit) runs SEO, broken links, PageSpeed, tech stack and SSL/DNS checks in one report for $0.03 per site.

All tools by gmyri: [doc-to-markdown](https://apify.com/gmyri/doc-to-markdown), [dataset-merge-dedup](https://apify.com/gmyri/dataset-merge-dedup), [site-health-audit](https://apify.com/gmyri/site-health-audit), [website-screenshot](https://apify.com/gmyri/website-screenshot), [domain-health-check](https://apify.com/gmyri/domain-health-check), [image-pdf-ocr](https://apify.com/gmyri/image-pdf-ocr), [tech-stack-detector](https://apify.com/gmyri/tech-stack-detector), [rss-feed-reader](https://apify.com/gmyri/rss-feed-reader), [website-audit](https://apify.com/gmyri/website-audit).

# Actor input Schema

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

Pages to audit, e.g. https://example.com/pricing. Domains without https:// are accepted. Each URL x device = 1 audit.

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

Optional sitemap.xml or sitemap index. All page URLs in it are audited (up to 'Max URLs'), in addition to 'urls'.

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

Cap on the number of URLs audited (protects your budget with big sitemaps).

## `device` (type: `string`):

Lighthouse form factor and throttling preset.

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

Lighthouse categories to run. Default: all four.

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

Optional thresholds. Each result gets passed=true/false and failedBudgets. Keys: minPerformanceScore, minAccessibilityScore, minBestPracticesScore, minSeoScore (0-100), maxLcpMs, maxTbtMs, maxCls, maxPageWeightKb. Example: {"minPerformanceScore": 70, "maxLcpMs": 2500, "maxCls": 0.1}

## `compareWithPreviousRun` (type: `boolean`):

Store scores in a named key-value store and add previousPerformanceScore, performanceScoreChange, seoScoreChange and lcpChangeMs. Use with a schedule for monitoring.

## `monitorName` (type: `string`):

Name for the comparison state (one per site or client), e.g. 'acme-weekly'.

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

Optional, free key with the Chrome UX Report API enabled. Adds field (real-user) p75 LCP, INP, CLS, FCP, TTFB and fieldCoreWebVitalsPassed from Google's CrUX dataset.

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

Store the full Lighthouse HTML report per audit and add a shareable reportUrl.

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

Top performance fixes (by estimated savings) per page.

## `pageTimeoutSecs` (type: `integer`):

Max wait for page load per audit.

## Actor input object example

```json
{
  "urls": [
    "https://books.toscrape.com/"
  ],
  "maxUrls": 100,
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "budgets": {
    "minPerformanceScore": 70,
    "maxLcpMs": 2500,
    "maxCls": 0.1
  },
  "compareWithPreviousRun": false,
  "monitorName": "default",
  "saveHtmlReport": false,
  "maxOpportunities": 5,
  "pageTimeoutSecs": 60
}
```

# Actor output Schema

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

One item per URL and device with Lighthouse scores and Core Web Vitals.

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

Totals and per-input 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://books.toscrape.com/"
    ],
    "budgets": {
        "minPerformanceScore": 70,
        "maxLcpMs": 2500,
        "maxCls": 0.1
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("gmyri/pagespeed-checker").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://books.toscrape.com/"],
    "budgets": {
        "minPerformanceScore": 70,
        "maxLcpMs": 2500,
        "maxCls": 0.1,
    },
}

# Run the Actor and wait for it to finish
run = client.actor("gmyri/pagespeed-checker").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://books.toscrape.com/"
  ],
  "budgets": {
    "minPerformanceScore": 70,
    "maxLcpMs": 2500,
    "maxCls": 0.1
  }
}' |
apify call gmyri/pagespeed-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gmyri/pagespeed-checker"
        }
    }
}
```

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/f50NscbBZRFxQljat/builds/g9oQ5be8i7zK9RVqn/openapi.json
