# PageSpeed Insights Bulk Checker (Core Web Vitals) (`brisaworks/pagespeed-bulk`) Actor

Run Google PageSpeed Insights on hundreds of URLs: Lighthouse scores, lab metrics and real-user Core Web Vitals (LCP, INP, CLS) for mobile and desktop. Keeps score history between runs and flags regressions. Uses your free Google API key.

- **URL**: https://apify.com/brisaworks/pagespeed-bulk.md
- **Developed by:** [Brisa Works](https://apify.com/brisaworks) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

Run Google **PageSpeed** Insights on hundreds of URLs in one go and get a clean table: Lighthouse performance (and optionally SEO, accessibility, best-practices) scores, lab metrics, and real-user Core Web Vitals from the Chrome UX Report — LCP, INP, CLS, FCP, TTFB — for mobile and desktop. Schedule it to keep a score history and flag regressions.

### What it does

- Calls the official PageSpeed Insights API v5 for each URL and device.
- Returns 0–100 category scores, lab metrics (LCP, FCP, CLS, TBT, Speed Index, server response time) and field data (URL-level and origin-level p75 values with FAST/AVERAGE/SLOW ratings).
- **History and regressions:** with **Compare with previous run** on, each row carries the previous score, the change, and a `regression` flag when the score drops by your threshold or more.
- Runs four audits in parallel with your key; stops at once on an invalid key or an exhausted quota instead of burning through the list.

Typical uses: monthly performance reports for client sites, checking templates across a large site, catching regressions after deploys.

### How to use

1. Create a free Google API key: Google Cloud Console → APIs & Services → enable **PageSpeed Insights API** → Credentials → API key. No billing needed.
2. Paste your URLs and the key.
3. Choose mobile and/or desktop and the extra categories you want.
4. Run, or schedule it (e.g. weekly) with **Compare with previous run** on to track scores over time.
5. Export the table as CSV, Excel or JSON, call the Actor through the Apify API, or send results to your tools with Apify integrations.

### Input

| Field | Description |
|---|---|
| `urls` | Pages to audit (required). |
| `googleApiKey` | Your Google API key (secret; strongly recommended). |
| `mobile`, `desktop` | Devices to audit (mobile on by default). |
| `includeSeo`, `includeAccessibility`, `includeBestPractices` | Extra Lighthouse categories. |
| `compareWithPrevious`, `regressionThreshold` | Score history and regression flag (default 5 points). |
| `locale` | Locale for formatted values. |

```json
{ "urls": ["https://example.com"], "googleApiKey": "••••••", "desktop": true, "includeSeo": true }
```

### Output

One row per URL and device (illustrative values):

```json
{
  "url": "https://example.com/",
  "strategy": "mobile",
  "status": "ok",
  "performanceScore": 100,
  "seoScore": 80,
  "lab": { "lcpMs": 1520, "fcpMs": 980, "cls": 0.002, "tbtMs": 30, "speedIndexMs": 1101, "serverResponseMs": 120 },
  "field": { "overallCategory": "FAST", "lcpMs": 1900, "lcpCategory": "FAST", "inpMs": 120, "cls": 0.02, "fcpMs": 1100, "ttfbMs": 700 },
  "lighthouseVersion": "12.8.2",
  "previousPerformanceScore": 96,
  "scoreDelta": 4,
  "regression": false
}
```

Rows with `status` `quota_exhausted`, `rate_limited`, `invalid_key`, `skipped` or `error` are free.

### Pricing

| Event | Price | Per 1,000 | Charged when |
|---|---|---|---|
| `audit` | $0.003 | $3.00 | One URL is audited on one device |

A URL audited on mobile and desktop counts as two audits. Failed audits, quota and key errors are free.

#### How much does a bulk PageSpeed check cost?

- 100 URLs on mobile: $0.30.
- 500 URLs on mobile and desktop (1,000 audits): $3.00.
- Google does not charge for the PageSpeed Insights API within your key's daily quota. Apify adds its standard small run-start fee.

Set a maximum cost per run in the run options: the Actor checks it before starting each audit and stops before going over it.

### FAQ

#### Do I need a Google API key?

In practice, yes. Google's shared keyless quota was at 0 queries a day when we checked on 2026-10-14, so keyless runs return free `quota_exhausted` rows. A key is free and takes a few minutes to create (see How to use).

#### What is the difference between lab and field data?

Lab data (`lab`) comes from one Lighthouse run in Google's data centre. Field data (`field`, `originField`) is the 75th percentile of real Chrome users over 28 days from the Chrome UX Report, and exists only for pages and sites with enough traffic.

#### How do I monitor Core Web Vitals over time?

Turn on **Compare with previous run** and schedule the Actor. Each row then carries `previousPerformanceScore`, `scoreDelta` and a `regression` flag when the score drops by your threshold or more.

#### Why did the run stop after the first URL?

The first audit runs alone: an invalid key or an exhausted quota stops the run there, with a free row explaining why, instead of failing every URL.

### Limits

- **Use your own key.** Without one, requests go to Google's shared keyless quota; on 2026-10-14 that quota answered HTTP 429 "Queries per day" with a limit of 0, so keyless runs usually return `quota_exhausted` rows (free). A key gives your Google Cloud project its own daily quota (commonly 25,000 audits a day).
- Each audit takes Google 10–30 seconds; with a key the Actor runs four at a time, so 1,000 audits take roughly 1–2 hours.
- Field data exists only for pages and origins with enough Chrome traffic; otherwise `field` is null. Google says CrUX data in this API will eventually be retired in favour of the CrUX API.

### Data source

- PageSpeed Insights API v5, `https://www.googleapis.com/pagespeedonline/v5/runPagespeed` — <https://developers.google.com/speed/docs/insights/v5/get-started> and <https://developers.google.com/speed/docs/insights/v5/reference/pagespeedapi/runpagespeed>, read on 2026-10-14 (parameters `url`, `strategy`, `category`, `locale`, `key`; "a key is recommended for frequent, automated queries"). Keyless quota behaviour observed with one live call on 2026-10-14.

### Privacy

Only the URLs you submit and your key are processed; the key is used for this run's requests and never logged or stored.

### Support

Open an issue on the Actor's Issues tab; issues are answered within a few days and fixed within 14 days.

# Actor input Schema

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

Pages to audit, one per line.

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

A free key from Google Cloud with the PageSpeed Insights API enabled (25,000 audits a day). Without one, runs use Google's shared keyless quota, which is often exhausted; those audits come back as quota_exhausted and are not charged.

## `mobile` (type: `boolean`):

Audit with the mobile strategy.

## `desktop` (type: `boolean`):

Also audit with the desktop strategy (one more audit per URL).

## `includeSeo` (type: `boolean`):

Add the Lighthouse SEO category.

## `includeAccessibility` (type: `boolean`):

Add the Lighthouse accessibility category.

## `includeBestPractices` (type: `boolean`):

Add the Lighthouse best-practices category.

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

Optional locale for formatted results, e.g. en, es.

## `compareWithPrevious` (type: `boolean`):

Keep each URL's last performance score and add previousPerformanceScore, scoreDelta and a regression flag. Schedule the Actor for monitoring.

## `regressionThreshold` (type: `integer`):

Flag a regression when the performance score drops by at least this many points.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "mobile": true,
  "desktop": false,
  "includeSeo": false,
  "includeAccessibility": false,
  "includeBestPractices": false,
  "compareWithPrevious": false,
  "regressionThreshold": 5
}
```

# Actor output Schema

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

One row per result, in the dataset (overview view).

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("brisaworks/pagespeed-bulk").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"] }

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

```

## MCP server setup

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

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/skvcU7XqvcgQapwYf/builds/2YhNnO1g0VPC8rcFs/openapi.json
