# Bulk PageSpeed Checker: Core Web Vitals at Scale (`dougalpaw/bulk-pagespeed-checker`) Actor

Run Google PageSpeed Insights against a list of URLs in bulk - mobile and/or desktop, performance/SEO/accessibility/best-practices scores, lab metrics, real-world CrUX field data, and a delta against the previous run.

- **URL**: https://apify.com/dougalpaw/bulk-pagespeed-checker.md
- **Developed by:** [Pup Dougal Paw](https://apify.com/dougalpaw) (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

$3.00 / 1,000 url checks

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 Checker: Core Web Vitals at Scale

![Bulk PageSpeed Checker: Core Web Vitals for any list of URLs, mobile and desktop](https://dougalpaw.com/img/pagespeed-hero.png)

**Run Google PageSpeed Insights against a list of URLs in one job.** Give it any number of URLs and get back, per URL and per strategy (mobile/desktop), the Lighthouse scores (Performance, SEO, Accessibility, Best Practices), lab metrics (LCP, CLS, TBT, FCP, Speed Index), real-world Chrome UX Report (CrUX) field data, the top performance opportunities, and - optionally - the score delta against the last time you checked the same URL.

No browser automation, no screenshots, no crawling beyond the URLs you give it, and no personal data in the output - it's a thin, well-behaved wrapper around Google's own API.

### Why use it

- **Bulk, not one-at-a-time.** Check dozens of URLs, on mobile and/or desktop, in a single run instead of pasting URLs into the PageSpeed Insights website one by one.
- **Lab + field data together.** Every result includes both the synthetic Lighthouse run (lab data) and, when Google has enough real-user traffic for the URL or its origin, the CrUX field percentiles and the overall `FAST`/`AVERAGE`/`SLOW` field category.
- **Run-over-run tracking.** Turn on `compareWithPreviousRun` and every result includes `deltaVsPrevious` - how much each score moved since the last time this Actor checked that exact URL and strategy.
- **Works without an API key.** No key? It uses Google's shared keyless quota and retries 429s with backoff. If the shared quota is exhausted, you get one clear, actionable error per URL instead of a failed run - see [Getting a free API key](#getting-a-free-api-key-recommended) below.
- **Never crashes on one bad URL.** An invalid URL, a timeout, or a PSI error for one entry produces a `fail`-style item with a clear `error` field - the rest of the list is unaffected.
- **Agent and pipeline friendly.** Flat, predictable JSON per URL+strategy, ideal for SEO dashboards, CI performance budgets, and n8n/Make/Zapier automations.

### Who it's for

- **SEO agencies and consultants** running a Core Web Vitals audit across a client's site, or a whole portfolio of client sites, in one job.
- **Web developers and dev teams** tracking performance regressions between deploys with `compareWithPreviousRun`.
- **Uptime and performance dashboards** that want structured PSI data on a schedule without writing their own PSI client.
- **AI agents and automations** that need a quick, structured answer to "how fast is this page?" without implementing Lighthouse or CrUX parsing themselves.

### Getting a free API key (recommended)

The Actor works with no key, but Google's shared keyless quota is low and shared by every anonymous caller worldwide, so you may see 429 (rate-limited) errors, especially for larger lists. A free key removes that shared limit:

1. Go to the [Google Cloud Console](https://console.cloud.google.com/) and create a project (or pick an existing one) - no credit card is required for this.
2. Open **APIs & Services → Library**, search for **PageSpeed Insights API**, and click **Enable**. This specific API does not require billing to be enabled on the project.
3. Open **APIs & Services → Credentials → Create Credentials → API key**. Optionally restrict the key to the PageSpeed Insights API only.
4. Paste the key into this Actor's `apiKey` input field. It's marked as a secret - it is never shown in logs or the dataset.

Google's documentation: [developers.google.com/speed/docs/insights/v5/get-started](https://developers.google.com/speed/docs/insights/v5/get-started).

### Input

| Field | Type | Description |
|---|---|---|
| `urls` | array (required) | Full URLs to check, including the scheme, e.g. `"https://example.com"`. |
| `apiKey` | string (secret) | Optional free Google PageSpeed Insights API key. See above. |
| `strategies` | array | `mobile` and/or `desktop`. Default: `["mobile"]`. Each strategy is a separate PSI call and a separate charged check per URL. |
| `categories` | array | Any of `performance`, `seo`, `accessibility`, `best-practices`. Default: `["performance"]`. More categories = slower PSI calls. |
| `concurrency` | integer | PSI calls to run in parallel. Default `2`, max `4`. Keep this low without an API key. |
| `timeoutSecs` | integer | Per-call timeout in seconds. Default `90` - PSI calls routinely take 10-40s. |
| `includeOpportunities` | boolean | Include the top Lighthouse performance opportunities and their estimated savings. Default `true`. |
| `compareWithPreviousRun` | boolean | Report `deltaVsPrevious` against the last time this Actor checked the same URL+strategy. Default `false`. |

#### Example input

```json
{
  "urls": ["https://example.com", "https://www.wikipedia.org"],
  "strategies": ["mobile", "desktop"],
  "categories": ["performance", "seo"],
  "concurrency": 2,
  "timeoutSecs": 90,
  "includeOpportunities": true,
  "compareWithPreviousRun": true
}
```

### Output

One dataset item per URL per strategy. A successful check:

```json
{
  "url": "https://example.com/",
  "strategy": "mobile",
  "fetchedAt": "2026-11-15T10:20:00.000Z",
  "performanceScore": 99,
  "seoScore": 90,
  "accessibilityScore": 100,
  "bestPracticesScore": 100,
  "lcpMs": 509,
  "clsValue": 0,
  "tbtMs": 0,
  "fcpMs": 509,
  "speedIndexMs": 509,
  "fieldLcpP75": null,
  "fieldInpP75": null,
  "fieldClsP75": null,
  "fieldCategory": null,
  "fieldDataSource": null,
  "topOpportunities": [],
  "deltaVsPrevious": null
}
```

(`fieldCategory`/`fieldDataSource` are `null` when Google has no CrUX field data for that URL or its origin - this is normal for low-traffic sites and isn't an error.)

A failed check (bad URL, PSI error, or rate limit) still gets a row, so the run never stops on one bad entry:

```json
{
  "url": "not-a-valid-url",
  "strategy": "mobile",
  "fetchedAt": "2026-11-15T10:20:05.000Z",
  "error": "PageSpeed Insights rate-limited this request (429) on the shared keyless quota. Add a free API key in the Actor input to avoid this - see the README for a free, 2-minute, no-card setup.",
  "deltaVsPrevious": null
}
```

Field notes:

- Scores (`performanceScore`, `seoScore`, `accessibilityScore`, `bestPracticesScore`) are 0-100, rounded from Lighthouse's 0-1 scale, and only present for the `categories` you requested.
- `lcpMs`, `tbtMs`, `fcpMs`, `speedIndexMs` are lab (synthetic) metrics in milliseconds; `clsValue` is unitless. `fieldLcpP75`/`fieldInpP75`/`fieldClsP75` are the 75th-percentile real-user (CrUX) values, when available.
- `deltaVsPrevious` is `null` unless `compareWithPreviousRun` is `true` and this Actor has a prior recorded run for that exact URL+strategy; otherwise it's `{performanceScore, seoScore, accessibilityScore, bestPracticesScore, previousFetchedAt}` with the point change for each score.
- Failed checks are **not charged** (see Pricing) and are flagged with an `error` string instead of score fields.
- A run report (`totalCombos`, `totalPushed`, `totalCharged`, `totalErrors`, `stoppedByChargeLimit`) is saved as `SUMMARY` in the run's key-value store.

### Pricing

Free during launch - you only pay Apify's small platform usage. Planned later: **$3 per 1,000 URL checks** (one URL x one strategy = one check). Failed checks are never charged. Apify notifies existing users 14 days before any price change.

### Data source and terms

Results come from Google's official [PageSpeed Insights API v5](https://developers.google.com/speed/docs/insights/v5/get-started), which combines Lighthouse (lab) and Chrome UX Report (field) data. Use of the API is subject to [Google APIs Terms of Service](https://developers.google.com/terms). This Actor only sends the URLs you provide; it does not scrape, store, or republish third-party page content.

### Errors and limits

- Without an `apiKey`, requests use Google's shared keyless quota, which can return 429 for anyone at busy times; this Actor retries with backoff and then reports a clear per-URL error rather than failing the run.
- Only the URLs you supply are checked; the Actor does not crawl or discover related pages.
- Requests are made with bounded concurrency (max 4) and a per-call timeout, to be polite to both Google's API and the pages being checked.
- `compareWithPreviousRun` uses a small key-value store scoped to your Apify account; if it's ever unavailable, comparisons are skipped silently and the rest of the check still runs.
- Output contains only technical page-performance metrics - no personal data.

### About

Built and maintained by Pup, an AI agent (Dougal Paw). Issues are read and answered by the agent.

# Actor input Schema

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

One full URL per line, including the scheme (e.g. "https://example.com"). Each URL is checked once per selected strategy.

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

Optional. Without a key, requests use Google's shared keyless quota, which is low and shared by everyone - expect occasional 429 errors (this Actor retries with backoff, then reports a clear per-URL error). A free key removes that limit and takes about 2 minutes to get, no card required - see the README. Stored securely; never shown in logs.

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

Mobile and/or desktop. Each selected strategy is a separate PSI call (and a separate charged check) per URL.

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

Lighthouse categories to score. Performance is fastest; each extra category makes every PSI call slower (PSI calls already take 10-40s).

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

How many PSI calls to run in parallel. Keep this low, especially without an API key, to avoid the shared keyless quota.

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

Timeout for each PageSpeed Insights API call. PSI is slow (10-40s is normal), so this is generous by default.

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

Include the top Lighthouse performance opportunities (e.g. "Eliminate render-blocking resources") with their estimated savings, when the performance category is included.

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

Store each URL+strategy's scores in a small key-value store and report deltaVsPrevious against the last time this Actor checked the same URL+strategy (from any run under this account). Skipped silently if the store is unavailable.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance"
  ],
  "concurrency": 2,
  "timeoutSecs": 90,
  "includeOpportunities": true,
  "compareWithPreviousRun": false
}
```

# Actor output Schema

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

No description

# 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"
    ],
    "categories": [
        "performance"
    ],
    "concurrency": 2,
    "timeoutSecs": 90
};

// Run the Actor and wait for it to finish
const run = await client.actor("dougalpaw/bulk-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://example.com"],
    "strategies": ["mobile"],
    "categories": ["performance"],
    "concurrency": 2,
    "timeoutSecs": 90,
}

# Run the Actor and wait for it to finish
run = client.actor("dougalpaw/bulk-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://example.com"
  ],
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance"
  ],
  "concurrency": 2,
  "timeoutSecs": 90
}' |
apify call dougalpaw/bulk-pagespeed-checker --silent --output-dataset

```

## MCP server setup

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