# Bulk PageSpeed & Core Web Vitals Checker (`avisommer/pagespeed-checker`) Actor

Run Google PageSpeed Insights (Lighthouse) on hundreds of URLs or a whole sitemap. Get performance, SEO, accessibility scores, Core Web Vitals (lab + real-user CrUX) and top fixes per page.

- **URL**: https://apify.com/avisommer/pagespeed-checker.md
- **Developed by:** [Avi Som](https://apify.com/avisommer) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Bulk PageSpeed & Core Web Vitals Checker

Test **hundreds of pages, or an entire sitemap,** with Google PageSpeed Insights (Lighthouse) in one run. For every URL you get Performance, SEO, Accessibility and Best-practices scores, lab metrics (LCP, CLS, TBT, FCP, Speed Index, TTFB), **real-user Core Web Vitals** from Chrome UX Report data with a pass/fail verdict, and the **top 5 fixes** with estimated savings.

No API key or setup needed. Paste URLs or a sitemap and click Start.

### Why use it

- **Bulk:** audit a whole site from its `sitemap.xml` (sitemap indexes supported) instead of testing pages one by one on pagespeed.web.dev.
- **Mobile and desktop** in the same run.
- **Real-user data:** Core Web Vitals (LCP, INP, CLS) at p75 from CrUX, falling back to origin-level data for low-traffic pages, with a Google-threshold **passed/failed** verdict.
- **Actionable:** top fixes per page, such as "Reduce unused JavaScript: 900 ms / 200 KB".
- **Monitor over time:** schedule it weekly, send results to Google Sheets, Slack or Looker Studio, and catch regressions after deploys.
- **Summary:** average scores per device, how many pages pass Core Web Vitals, and the 10 slowest pages (`OUTPUT` record).

### Who it's for

SEO agencies running client audits, developers checking a release, e-commerce teams tracking speed, and anyone comparing their site to competitors.

### Input

| Field | What it does |
|---|---|
| `urls` | Pages to test (`https://` added if missing). |
| `sitemapUrls` | Sitemap or sitemap-index URLs; pages are added to the list. |
| `maxUrlsFromSitemaps` | Cap on pages taken from sitemaps (default 50). |
| `strategies` | `mobile`, `desktop` or both. Each URL × device = one result. |
| `categories` | Any of performance, accessibility, best-practices, seo. |
| `includeOpportunities` | Include top 5 fixes per page (default on). |
| `locale` | Language of audit titles (e.g. `en`, `de`). |
| `apiKey` | Optional: your own free Google PageSpeed API key for very large jobs. |

```json
{
  "sitemapUrls": ["https://example.com/sitemap.xml"],
  "maxUrlsFromSitemaps": 200,
  "strategies": ["mobile", "desktop"]
}
```

### Output (one row per URL × device)

```json
{
  "url": "https://web.dev/",
  "finalUrl": "https://web.dev/",
  "strategy": "mobile",
  "performanceScore": 48,
  "accessibilityScore": 90,
  "bestPracticesScore": 96,
  "seoScore": 92,
  "lcpMs": 7804,
  "fcpMs": 7804,
  "tbtMs": 287,
  "cls": 0.121,
  "speedIndexMs": 7804,
  "ttiMs": 19934,
  "ttfbMs": 3,
  "totalPageKb": 3631,
  "fieldDataSource": "url",
  "fieldLcpMs": 3069,
  "fieldInpMs": 233,
  "fieldCls": 0.01,
  "fieldFcpMs": 3079,
  "fieldTtfbMs": 1784,
  "fieldOverall": "SLOW",
  "coreWebVitals": "failed",
  "opportunities": [
    {
      "id": "unused-javascript",
      "title": "Reduce unused JavaScript",
      "savingsMs": 3450,
      "savingsKb": 878
    },
    {
      "id": "unused-css-rules",
      "title": "Reduce unused CSS",
      "savingsMs": 1190,
      "savingsKb": 140
    }
  ],
  "lighthouseVersion": "13.6.0",
  "analyzedAt": "2026-11-05T15:30:02.018Z",
  "reportUrl": "https://pagespeed.web.dev/analysis?url=https%3A%2F%2Fweb.dev%2F&form_factor=mobile"
}
```

Export to CSV/Excel/JSON or connect with Google Sheets, Zapier, Make or n8n.

### Pricing

Pay per result: you pay only for successfully analyzed pages (one URL on one device = one result). Failed pages (e.g. the site is down) are listed in the summary and are **not charged**. Set a maximum cost per run and it stops cleanly.

### FAQ

**Are scores identical to pagespeed.web.dev?** Yes. It uses the same Google PageSpeed Insights API. Lab scores naturally vary a few points between runs.

**Why is real-user data sometimes empty?** Google only has Chrome UX Report data for pages and sites with enough traffic. Lab metrics are always included.

**How long does it take?** Each audit takes about 10–30 seconds on Google's side, and several run in parallel, so roughly 100 pages take about 10 minutes.

**Something wrong?** Open an issue with the URL and it will be fixed quickly.

# Actor input Schema

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

Pages to test. "https://" is added if missing.

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

Sitemap or sitemap-index URLs (e.g. https://example.com/sitemap.xml). Pages are added to the list above.

## `maxUrlsFromSitemaps` (type: `integer`):

Stop collecting sitemap pages after this many.

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

Test as mobile, desktop or both. Each URL x device is one result.

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

Which scores to compute.

## `includeOpportunities` (type: `boolean`):

Add the 5 biggest improvement opportunities per page (e.g. unused JavaScript, image sizes) with estimated savings.

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

Language for audit titles, e.g. en, de, fr, es.

## `maxConcurrency` (type: `integer`):

How many pages to test at once.

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

Optional. Use your own free Google PageSpeed Insights API key for very large jobs. Leave empty to use the built-in key.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://web.dev",
    "https://developer.mozilla.org"
  ],
  "maxUrlsFromSitemaps": 50,
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "includeOpportunities": true,
  "locale": "en",
  "maxConcurrency": 4
}
```

# Actor output Schema

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

Scores and Core Web Vitals per page (overview).

## `resultsFull` (type: `string`):

Every field, including top fixes.

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

Averages per device, slowest pages and failures.

# 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://web.dev",
        "https://developer.mozilla.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("avisommer/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://apify.com",
        "https://web.dev",
        "https://developer.mozilla.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("avisommer/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://apify.com",
    "https://web.dev",
    "https://developer.mozilla.org"
  ]
}' |
apify call avisommer/pagespeed-checker --silent --output-dataset

```

## MCP server setup

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