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

Test hundreds of URLs or a whole sitemap with Google's official PageSpeed Insights API. Lighthouse scores, lab metrics, real-user Core Web Vitals (CrUX), top fixes, history and score drop alerts. Bring your free Google key.

- **URL**: https://apify.com/solidactors/bulk-pagespeed-insights.md
- **Developed by:** [Solid Actors](https://apify.com/solidactors) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 url 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 Insights & Core Web Vitals Checker

Test hundreds of pages, or a whole sitemap, with Google's official PageSpeed Insights API. For every URL you get the Lighthouse scores, the lab metrics, the real-user Core Web Vitals from the Chrome UX Report, the biggest fixes, and the change since your last run with an alert when the score drops.

### What it does

- **Bulk input**: a list of URLs, a file, or a `sitemap.xml` (sitemap indexes and `.gz` included).
- **Mobile, desktop or both.**
- **Lighthouse scores**: performance, and optionally accessibility, best practices and SEO (0 to 100).
- **Lab metrics**: FCP, LCP, TBT, CLS, Speed Index, TTI, server response time.
- **Real-user Core Web Vitals (CrUX, 75th percentile)**: LCP, INP, CLS, FCP, TTFB, Google's FAST/AVERAGE/SLOW verdict and a simple `cwvPass` true/false. Falls back to origin data when the page itself has too little traffic (`fieldSource` says which).
- **Top opportunities**: the biggest savings Lighthouse found, in milliseconds.
- **History and alerts**: each run remembers the last score per URL in a named key-value store. Schedule the Actor daily or weekly and get `deltaVsLastRun` and `scoreDropAlert` per page.
- **Link to the full Google report** for every URL.

It uses only Google's official API (no scraping of Google pages). Pages that cannot be tested (DNS error, server error, blocked) get a plain-language `error` and are not charged.

### Your Google API key (free, 2 minutes, required)

The key is required. Google's keyless access is a quota shared with everyone and it is used up every day (checked in November 2026: every keyless call got "quota exceeded"). With your own free key you get 25,000 audits per day (30 per minute).

1. Open https://console.cloud.google.com/ and pick or create a project.
2. Enable the PageSpeed Insights API: https://console.cloud.google.com/apis/library/pagespeedonline.googleapis.com
3. Go to **APIs and services, Credentials, Create credentials, API key**. Optionally restrict it to the PageSpeed Insights API.
4. Paste the key into **Your Google API key**. Apify stores it encrypted.

No billing account is needed for this API.

### Input example

```json
{
  "urls": [{ "url": "https://example.com" }, { "url": "https://example.com/pricing" }],
  "sitemapUrl": "https://example.com/sitemap.xml",
  "maxSitemapUrls": 200,
  "strategy": "both",
  "categories": ["performance", "seo"],
  "apiKey": "AIza...",
  "alertIfScoreDropsBy": 10
}
```

### Output example

```json
{
  "url": "https://web.dev",
  "strategy": "mobile",
  "performanceScore": 69,
  "seoScore": 92,
  "fcpMs": 2552,
  "lcpMs": 2552,
  "tbtMs": 723,
  "clsValue": 0.119,
  "speedIndexMs": 4864,
  "ttfbMs": 4,
  "fieldLcpP75": 3047,
  "fieldInpP75": 234,
  "fieldClsP75": 0.01,
  "fieldSource": "url",
  "fieldOverall": "SLOW",
  "cwvPass": false,
  "topOpportunities": [{ "id": "unused-css-rules", "title": "Reduce unused CSS", "savingsMs": 900 }],
  "previousScore": 74,
  "deltaVsLastRun": -5,
  "scoreDropAlert": false,
  "checkedAt": "2026-11-09T23:54:07+00:00",
  "reportUrl": "https://pagespeed.web.dev/analysis?url=https%3A%2F%2Fweb.dev&form_factor=mobile",
  "error": null
}
```

The **Scores and Core Web Vitals** view shows the main columns as a table; export as CSV, Excel or JSON.

### Pricing

Pay per event: a small fee per run plus **$0.004 per successful audit** (one URL on one device). 100 URLs on mobile and desktop = 200 audits = $0.80. Failed URLs are not charged. Google does not charge for the API.

### Limits

- Google's default quota for a free key is 25,000 audits per day and 30 per minute. The Actor paces itself at 28 per minute (setting `maxRequestsPerMinute`), so 1,000 audits take about 40 minutes. If you raise the quota in Google Cloud, raise the setting too.
- Each audit takes Google 5 to 60 seconds; up to 8 run in parallel with a key (2 without). Rate-limit answers (HTTP 429) are retried with backoff.
- Lab scores vary a few points from run to run (that is how Lighthouse works). The alert threshold default (10 points) avoids noise.
- Real-user data exists only for pages and sites with enough Chrome traffic; otherwise the field metrics are empty.
- Pages behind a login or that block Google's Lighthouse agent cannot be tested.

### Questions and issues

Open an issue on the Actor page with the run ID.

# Actor input Schema

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

Pages to test. Paste one per line or upload a file. URLs without https:// get it added.

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

A sitemap.xml (or sitemap index, also .gz). Its page URLs are added to the list.

## `maxSitemapUrls` (type: `integer`):

Only the first N URLs of the sitemap are tested.

## `strategy` (type: `string`):

mobile, desktop or both (both counts as two audits per URL).

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

performance is always useful; accessibility, best-practices and seo add their scores.

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

A free key from Google Cloud with the PageSpeed Insights API enabled. Steps in the README. Stored encrypted.

## `compareWithLastRun` (type: `boolean`):

Keeps each URL's last score in a named key-value store, so scheduled runs show the change (deltaVsLastRun).

## `alertIfScoreDropsBy` (type: `integer`):

scoreDropAlert is true when the score fell by at least this many points since the last run.

## `historyStoreName` (type: `string`):

Named key-value store for the history. Use different names for different projects.

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

How many URLs are tested at the same time. Default: 8 with a key, 2 without.

## `maxRequestsPerMinute` (type: `integer`):

Google's default quota for a key is 30 requests per minute (and 25,000 per day). Raise this only if you raised your quota in Google Cloud. Default: 28 with a key, 6 without.

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

Safety limit on the total number of URLs. Empty means no limit.

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

Language for the opportunity titles, for example en, pt, de.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://www.wikipedia.org"
    }
  ],
  "maxSitemapUrls": 100,
  "strategy": "mobile",
  "categories": [
    "performance"
  ],
  "compareWithLastRun": true,
  "alertIfScoreDropsBy": 10,
  "historyStoreName": "pagespeed-history",
  "locale": "en"
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        {
            "url": "https://apify.com"
        },
        {
            "url": "https://www.wikipedia.org"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidactors/bulk-pagespeed-insights").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": [
        { "url": "https://apify.com" },
        { "url": "https://www.wikipedia.org" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("solidactors/bulk-pagespeed-insights").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": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://www.wikipedia.org"
    }
  ]
}' |
apify call solidactors/bulk-pagespeed-insights --silent --output-dataset

```

## MCP server setup

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

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/zNToRR7qbsYIEcISv/builds/7tmtnWaVORsZ9i7Hk/openapi.json
