# Bulk PageSpeed & Core Web Vitals Auditor (`dailypalslab/bulk-pagespeed-cwv-auditor`) Actor

Audit hundreds of pages with Google PageSpeed Insights in one run: Performance, Accessibility, Best Practices and SEO scores, lab LCP/CLS/TBT, real-user Core Web Vitals (LCP, INP, CLS) pass/fail and top issues. Paste URLs or a sitemap.

- **URL**: https://apify.com/dailypalslab/bulk-pagespeed-cwv-auditor.md
- **Developed by:** [DailyPals Lab](https://apify.com/dailypalslab) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Bulk PageSpeed Insights & Core Web Vitals Checker

Run **Google PageSpeed Insights** on hundreds of pages in one go. Paste a list of URLs or just a **sitemap**, and get one clean row per page and device with:

- **Lighthouse scores** (0–100): Performance, Accessibility, Best Practices and SEO
- **Lab metrics**: LCP, CLS, TBT, FCP, Speed Index and TTI
- **Real-user Core Web Vitals** from the Chrome UX Report (CrUX): LCP, INP and CLS at the 75th percentile with FAST / AVERAGE / SLOW categories, for the **page and the whole origin**
- **`passesCoreWebVitals`**: a simple true/false pass or fail
- **Top 5 issues** to fix, ranked by estimated savings (e.g. "Reduce unused JavaScript, Est savings of 120 KiB")

Built by **Daily Pals Labs**. It uses the official PageSpeed Insights API v5, with no browser to run, so it is light, fast and cheap.

### What you can use it for

- **SEO audits.** Check every page in a sitemap for Core Web Vitals, which are a Google ranking signal, and find the slow templates.
- **Agency and client reporting.** Get scores for many sites as CSV or Excel in minutes instead of pasting URLs into pagespeed.web.dev one by one.
- **Regression monitoring.** Schedule a weekly run on your key pages and alert when performance drops or CWV starts failing.
- **Mobile vs desktop comparison.** Audit both strategies in one run.
- **Lead generation.** Find prospects whose sites fail Core Web Vitals.

### Input

| Field | Description |
|---|---|
| `urls` | Pages to audit (`https://example.com/pricing`). A missing `https://` is added for you. |
| `sitemapUrl` | Optional XML sitemap or **sitemap index**. Nested sitemaps and `.xml.gz` files are followed. |
| `maxUrls` | Max pages to audit (default 50, hard cap 2,000). |
| `strategies` | `["mobile"]`, `["desktop"]` or both. Each URL x device is one audit. |
| `categories` | Any of `performance`, `accessibility`, `best-practices`, `seo` (default: all four). |
| `includeTopIssues` | Add the top 5 failing performance audits (default `true`). |
| `apiKey` | Optional: your own free Google PageSpeed Insights API key, for higher quota. |
| `concurrency` | Audits running in parallel (default 4). HTTP 429 rate limits are retried with exponential backoff. |

```json
{
    "urls": ["https://example.com", "https://web.dev"],
    "sitemapUrl": "https://www.example.com/sitemap.xml",
    "maxUrls": 100,
    "strategies": ["mobile", "desktop"],
    "includeTopIssues": true
}
```

### Output

```json
{
    "url": "https://web.dev/",
    "finalUrl": "https://web.dev/",
    "strategy": "mobile",
    "performance": 87,
    "accessibility": 100,
    "bestPractices": 96,
    "seo": 92,
    "labLcpMs": 2765,
    "labCls": 0.012,
    "labTbtMs": 120,
    "labFcpMs": 1301,
    "labSiMs": 2400,
    "labTtiMs": 3501,
    "fieldLcpMs": 2400,
    "fieldLcpCategory": "FAST",
    "fieldInpMs": 180,
    "fieldInpCategory": "FAST",
    "fieldCls": 0.05,
    "fieldClsCategory": "FAST",
    "fieldOverallCategory": "FAST",
    "originLcpMs": 2100,
    "originLcpCategory": "FAST",
    "originInpMs": 150,
    "originInpCategory": "FAST",
    "originCls": 0.02,
    "originClsCategory": "FAST",
    "originOverallCategory": "FAST",
    "passesCoreWebVitals": true,
    "cwvDataSource": "url",
    "topIssues": [
        { "id": "render-blocking-resources", "title": "Eliminate render-blocking resources", "displayValue": "Est savings of 900 ms", "score": 0.5, "savingsMs": 900, "savingsBytes": 0, "clsSavings": 0 },
        { "id": "unused-javascript", "title": "Reduce unused JavaScript", "displayValue": "Est savings of 120 KiB", "score": 0, "savingsMs": 450, "savingsBytes": 122880, "clsSavings": 0 }
    ],
    "lighthouseVersion": "12.8.2",
    "fetchedAt": "2026-11-21T12:00:00.000Z",
    "error": null
}
```

- `field*` values are real-user (CrUX) data for **this exact URL**. They are `null` when the page has too little Chrome traffic.
- `origin*` values are real-user data for the **whole site**.
- `passesCoreWebVitals` follows Google's thresholds at p75: LCP ≤ 2.5 s, INP ≤ 200 ms and CLS ≤ 0.1. It uses URL data when available, otherwise origin data (see `cwvDataSource`). It is `null` when there is no field data at all.
- A failed audit (page unreachable, timeout, quota) still gets a row with `error` set, and is **not charged**.

### Pricing (pay per event)

| Event | Price |
|---|---|
| `audit`: one successful URL x device audit | **$0.008** |

Examples: 50 pages on mobile cost **$0.40**. 500 pages on mobile and desktop (1,000 audits) cost **$8.00**. Failed audits are free. The Actor never starts more audits than your **max cost per run** allows.

### FAQ

**Do I need a Google API key?** No, it works out of the box. Google's keyless quota is shared and small, though, and on busy days it can be used up. Failed audits then show `"error": "Quota exceeded ... Queries per day"`, and you are not charged for them. For reliable bulk runs, add your own **free** key: in the Google Cloud console, enable the "PageSpeed Insights API", create an API key and paste it into `apiKey`. The free tier allows about 25,000 audits per day.

**Why do my scores differ slightly from pagespeed.web.dev?** Lighthouse lab results vary from run to run because of network and server conditions. Field (CrUX) data is a rolling 28-day window and is stable.

**Why is field data empty for my page?** CrUX only includes pages and origins with enough real Chrome traffic. Small sites often have origin data but no URL data, or neither.

**How long does it take?** Each audit takes about 10–30 seconds on Google's side. With concurrency 4, 100 audits finish in roughly 10 minutes.

**Can it audit pages behind a login?** No. PageSpeed Insights loads pages from Google's servers, so pages must be publicly reachable.

### Limits

- Up to 2,000 URLs per run (`maxUrls`). Up to 50 sitemap files are read from a sitemap index.
- Keyless runs share Google's quota. Use `apiKey` for volume.
- Rate-limit responses (429) and server errors are retried up to 4 times with backoff. A daily quota error stops further calls in that run.

### Data source

The data comes from Google's official **PageSpeed Insights API v5** (`googleapis.com/pagespeedonline/v5/runPagespeed`), which runs Lighthouse and returns Chrome UX Report field data. This Actor is not affiliated with or endorsed by Google. PageSpeed Insights, Lighthouse and Core Web Vitals are Google products and trademarks.

# Actor input Schema

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

Pages to audit, one per line (e.g. https://example.com/pricing). Leave empty if you use a sitemap.

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

Optional XML sitemap or sitemap index (e.g. https://www.example.com/sitemap.xml). Page URLs are read from it, up to "Max URLs".

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

Maximum number of pages to audit (hard cap 2000). Each page is audited once per strategy.

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

"mobile", "desktop" or both. Each URL x device is one audit.

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

Which Lighthouse category scores to compute.

## `includeTopIssues` (type: `boolean`):

Adds the top 5 failing performance audits by estimated savings (e.g. "Reduce unused JavaScript - Est savings 1.2 s").

## `apiKey` (type: `string`):

Your own free PageSpeed Insights API key from Google Cloud, for higher quota. Optional.

## `concurrency` (type: `integer`):

How many audits run at once. Rate limits (HTTP 429) are retried automatically with backoff.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "maxUrls": 50,
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "includeTopIssues": true,
  "concurrency": 4
}
```

# Actor output Schema

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

PageSpeed audits as a dataset (JSON, CSV, Excel via the API).

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

Counts, failures and settings for this run.

# 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"
    ],
    "strategies": [
        "mobile"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dailypalslab/bulk-pagespeed-cwv-auditor").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"],
    "strategies": ["mobile"],
}

# Run the Actor and wait for it to finish
run = client.actor("dailypalslab/bulk-pagespeed-cwv-auditor").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"
  ],
  "strategies": [
    "mobile"
  ]
}' |
apify call dailypalslab/bulk-pagespeed-cwv-auditor --silent --output-dataset

```

## MCP server setup

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

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/j5ll0gsc85bP5nVpN/builds/x0FpDPhe3g68cgGgZ/openapi.json
