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

Bulk PageSpeed Insights and Lighthouse audits for URLs or a sitemap: mobile/desktop scores, Core Web Vitals (CrUX + lab), top fixes. Uses your free API key.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

### What does PageSpeed Insights Bulk Checker do?

**PageSpeed Insights Bulk Checker** runs Google **PageSpeed Insights / Lighthouse** audits for hundreds or thousands of pages in one run. For every URL and device (mobile and/or desktop) you get:

- **Lighthouse scores**: Performance, Accessibility, Best Practices, SEO (0–100)
- **Core Web Vitals from real users** (Chrome UX Report / CrUX field data): LCP, INP, CLS, FCP, TTFB at p75, for the page and for the whole origin, plus a clear **passed / failed** assessment
- **Lab metrics**: FCP, LCP, TBT, CLS, Speed Index, TTI, server response time, page weight
- **The top opportunities to fix**, ranked by estimated savings (e.g. "Improve image delivery – Est savings of 955 KiB")

Paste a list of URLs, or give a **sitemap or a domain** and the Actor pulls the pages from its sitemap (robots.txt, nested sitemap indexes and .gz supported). It calls the official Google API over HTTP; no browser runs on your side, so runs are cheap.

### Why use a bulk PageSpeed checker?

- **SEO audits at scale.** Check every template of a site (home, category, product, article) in one go instead of pasting URLs into pagespeed.web.dev one by one.
- **Core Web Vitals monitoring.** Schedule a weekly run and export to Google Sheets or a dashboard to track LCP, INP and CLS over time.
- **Client reporting for agencies.** Mobile and desktop scores for a whole sitemap in a CSV/Excel file.
- **Before/after deployments.** Run on staging and production and compare.
- **Competitor benchmarking.** Audit competitor home pages and landing pages side by side.
- **Find what to fix first.** Opportunities are sorted by estimated time savings, so developers get a prioritised list.

### Google API key: bring your own (free)

The Actor uses **your own Google API key** (input `apiKey`, stored as an encrypted secret and never written to logs or results). Google gives each Cloud project a free PageSpeed quota, commonly cited as 25,000 audits per day; check the real figure on your project's Quotas page.

How to get a key (about 2 minutes, free):

1. Open the [Google Cloud console](https://console.cloud.google.com/) and select or create a project.
2. Go to **APIs & Services → Library**, search **PageSpeed Insights API**, click **Enable**.
3. Go to **APIs & Services → Credentials → Create credentials → API key**. Optionally restrict it to the PageSpeed Insights API.
4. Paste the key into the **Google API key** field.

**Without a key**, the Actor falls back to Google's keyless access, one request every 10 seconds. Google currently sets the shared keyless quota to zero (tested October 2026: every keyless request returns HTTP 429 "Queries per day"), so in practice **a key is required**. When the keyless quota is unavailable, the Actor stops after the first request with a clear message.

### How to run bulk PageSpeed audits

1. Add page URLs, or a sitemap URL / domain in **Sitemaps or domains**.
2. Paste your **Google API key**.
3. Choose **mobile**, **desktop** or both, and the Lighthouse categories.
4. Click **Start**. Results appear in the **Output** tab; export as CSV, Excel, JSON or HTML.

### Input example

```json
{
    "apiKey": "AIza...your key...",
    "urls": ["https://apify.com", "https://web.dev"],
    "sitemapUrls": ["https://vite.dev/sitemap.xml"],
    "maxUrlsFromSitemap": 50,
    "excludePatterns": ["/tag/", "\\.pdf$"],
    "strategies": ["mobile", "desktop"],
    "categories": ["performance", "accessibility", "best-practices", "seo"],
    "opportunitiesLimit": 5
}
```

### Output example

One row per URL and device:

```json
{
    "url": "https://shop.example.org/",
    "strategy": "mobile",
    "status": "ok",
    "performanceScore": 32,
    "accessibilityScore": 75,
    "bestPracticesScore": 31,
    "seoScore": 75,
    "coreWebVitals": "failed",
    "fieldDataScope": "url",
    "fieldLcpMs": 2100,
    "fieldInpMs": 260,
    "fieldCls": 0.05,
    "fieldFcpMs": 1500,
    "fieldTtfbMs": 700,
    "originCoreWebVitals": "passed",
    "labFcpMs": 6795,
    "labLcpMs": 10885,
    "labTbtMs": 1055,
    "labCls": 0.1,
    "labSpeedIndexMs": 8296,
    "totalByteWeight": 1871037,
    "topOpportunity": "Use efficient cache lifetimes (Est savings of 1,791 KiB)",
    "opportunities": [
        { "id": "cache-insight", "title": "Use efficient cache lifetimes", "displayValue": "Est savings of 1,791 KiB", "score": 0, "savingsMs": 3600, "savingsBytes": 1834075 },
        { "id": "image-delivery-insight", "title": "Improve image delivery", "displayValue": "Est savings of 955 KiB", "score": 0, "savingsMs": 1200, "savingsBytes": 978394 }
    ],
    "lighthouseVersion": "13.6.0"
}
```

`coreWebVitals` uses Google's rule: **passed** when LCP, INP and CLS are all "good" at the 75th percentile of real users. It reads `insufficient-data` when some metrics have no data, and `no-field-data` when the page and its origin have too little Chrome traffic (common for small sites; lab data is still returned). Turn on `saveFullReport` to keep the complete Lighthouse JSON of each audit in the key-value store.

### How much does it cost?

The Actor itself is **free to use**: there is no Actor fee for now. You only pay the Apify platform usage of your runs (compute units and data transfer), which stays small because the Actor uses plain HTTP requests, without a browser or proxy. The Apify Free plan includes $5 of monthly credit, which covers a lot of test runs.

Google's PageSpeed API is free within the quota of your own key.

### Tips

- Each audit takes Google 10–60 seconds. With a key the Actor runs 4 audits in parallel by default (max 10); 1,000 audits take roughly 1–2 hours.
- Lighthouse results vary from run to run (network, server load). For decisions, compare several runs or rely on the field data.
- Use `includePatterns` to audit one section only (e.g. `/products/`).

### FAQ

**Is this the same data as pagespeed.web.dev?**
Yes. It is the official PageSpeed Insights API v5, which runs the same Lighthouse version and returns the same CrUX field data.

**Why is field data empty for my page?**
CrUX only publishes data for pages and origins with enough real Chrome visits over the last 28 days. Then `fieldDataScope` is `origin` (site-level data) or the field columns are empty.

**Can I audit pages behind a login or on localhost?**
No. Google's servers load the page, so it must be publicly reachable. Local and private addresses are rejected.

**Does the Actor crawl my site?**
Only to read sitemaps, with a clear user-agent (`PageSpeedBulkAuditor/1.0`) and following robots.txt for guessed sitemap locations. The pages themselves are loaded by Google's PageSpeed service.

**What happens if my key's quota runs out?**
The Actor detects the daily-quota error, stops, marks the remaining URLs as `skipped`, and explains why in the run status. Short-term rate limits are retried automatically.

**I found a bug or need a feature.**
Open an issue in the **Issues** tab. Issues are usually answered quickly.

### Is it legal to run PageSpeed audits?

The Actor uses Google's public PageSpeed Insights API under your own API key and [Google APIs Terms of Service](https://developers.google.com/terms). It reads only public pages and returns no personal data. Only audit sites you have a legitimate reason to test, and keep request volumes reasonable. If unsure, consult a lawyer.

### Related actors

More Actors by the same author ([innovative_cookie on Apify](https://apify.com/innovative_cookie)):

- [Sitemap URL Extractor](https://apify.com/innovative_cookie/sitemap-extractor): list every URL of a website from its XML sitemaps.
- [Bulk Domain Availability Checker](https://apify.com/innovative_cookie/domain-availability): check whether domain names are free via RDAP.
- [Logo & Favicon Extractor](https://apify.com/innovative_cookie/logo-favicon): get the logo and favicon of any website.
- [Bulk Image Converter & Compressor](https://apify.com/innovative_cookie/image-converter): convert and compress images to WebP, AVIF, JPEG or PNG.
- [Broken Link Checker](https://apify.com/innovative_cookie/broken-link-checker): find 404s and dead links on any website.
- [Website Image Extractor](https://apify.com/innovative_cookie/website-image-extractor): list every image of a page with size, format and alt text.

# Actor input Schema

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

Pages to audit (one per line). Domains without https:// are accepted.

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

Audit pages listed in a sitemap. Enter a sitemap URL (nested indexes and .gz supported) or a domain: its sitemaps are found via robots.txt.

## `maxUrlsFromSitemap` (type: `integer`):

Limit the number of pages taken from each sitemap source.

## `includePatterns` (type: `array`):

Optional regular expressions for sitemap URLs, e.g. /blog/.

## `excludePatterns` (type: `array`):

Optional regular expressions, e.g. \\.pdf$ or /tag/.

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

Your own free Google Cloud API key with the PageSpeed Insights API enabled (25,000 audits/day free from Google). Without a key the Actor uses Google's keyless access, which is very slow and frequently out of quota. The key is stored encrypted and never written to logs or results.

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

Mobile, desktop, or both (one audit per device).

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

Categories to score.

## `opportunitiesLimit` (type: `integer`):

How many improvement opportunities (biggest estimated savings first) to return.

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

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

## `saveFullReport` (type: `boolean`):

Store the complete PageSpeed/Lighthouse JSON of each audit in the key-value store (large, ~0.5-2 MB each).

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

Audits run in parallel when you provide a key (Google allows 400 queries / 100 s). Keyless mode always uses 1.

## `requestTimeoutSecs` (type: `integer`):

Google needs 10-60 s per audit.

## `retries` (type: `integer`):

Retries on network errors, rate limits and Google 5xx errors.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://web.dev"
  ],
  "maxUrlsFromSitemap": 50,
  "strategies": [
    "mobile",
    "desktop"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "opportunitiesLimit": 5,
  "locale": "en",
  "saveFullReport": false,
  "maxConcurrency": 4,
  "requestTimeoutSecs": 120,
  "retries": 2
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with one row per result

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

SUMMARY record

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

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

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

```

## MCP server setup

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