# Bulk PageSpeed Insights & Core Web Vitals Checker (`mediapro-tools/pagespeed-crux-bulk`) Actor

Bulk Google PageSpeed Insights and Core Web Vitals scores for many URLs. Requires your own free Google API key; runs without one are refused before they start and cost nothing. No login. Export JSON/CSV/Excel.

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

## Pricing

Pay per event

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

**Bulk Google PageSpeed Insights and Core Web Vitals scores for many URLs (bring your own free Google API key), with no login, no browser and no code. Export to JSON, CSV or Excel, or use the API.**

Run Google PageSpeed Insights (official API) on many URLs, mobile and desktop: Lighthouse scores, lab metrics, real-user Core Web Vitals (CrUX) pass/fail, top fix opportunities, optional 6-month CrUX history, and score-drop alerts.

> **Requires your own Google API key (free).** This Actor calls Google's official PageSpeed Insights API with *your* key, so tests use your own Google quota (25,000 requests/day free). Runs without a key are refused before they start and cost nothing.

### Setup: get your free Google API key

1. Go to [Google Cloud Console](https://console.cloud.google.com/) and create or select a project.
2. Open **APIs & Services > Library**, search **PageSpeed Insights API**, click **Enable**. For CrUX history, also enable **Chrome UX Report API**.
3. Open **APIs & Services > Credentials > Create credentials > API key**.
4. (Recommended) Click the key > **API restrictions** > restrict it to the two APIs above.
5. Paste it into the **Your Google API key (required)** input field. It is stored as an encrypted secret input.

No billing account is needed for the free quota.

### Input

| Field | Type | Notes |
|---|---|---|
| `urls` | array | **Required.** Pages or domains to test, 1 to 250 per run. Invalid entries get an `error` row and are not charged. |
| `strategies` | array | mobile and/or desktop. |
| `categories` | array |  |
| `googleApiKey` | string | **Required.** Your own free Google API key with PageSpeed Insights API enabled (see Setup). |
| `includeCruxHistory` | boolean | Origin-level p75 LCP/INP/CLS over ~25 weeks (needs Chrome UX Report API enabled on your key). |
| `maxConcurrency` | integer | Tests run in parallel (1-10, default 4). |
| `monitorMode` | boolean | Store last score and flag drops. |
| `scoreDropAlert` | integer |  |
| `stateStoreName` | string |  |

### Example input

```json
{
 "googleApiKey": "YOUR_GOOGLE_API_KEY",
 "urls": [
  "https://example.com"
 ],
 "strategies": [
  "mobile"
 ]
}
```

### How long does a run take?

Each Google PageSpeed test (one URL on one device) usually takes 10-40 seconds on Google's side. Tests run 4 at a time by default, so 20 URLs on mobile typically finish in a few minutes. Runs without a valid key end within seconds with a clear error and no charge.

### Output

One dataset item per result. Main columns: `url`, `strategy`, `performanceScore`, `passesCoreWebVitals`, `lab`, `fieldUrl`, `opportunities`, `scoreDelta`, `error`. A `RUN_SUMMARY` record is saved to the default key-value store.

### Pricing

Pay per result, with no monthly rental or subscription:

- **Page x device tested**: $0.0025
- **Score drop alert (monitor)**: $0.01

Example: 1,000 results cost about $2.50 in fees. Apify's free plan includes $5 of monthly credit, which is enough to test this Actor.

### FAQ

**Do I need an account, cookies or a login for the source site?** No. Bulk PageSpeed Insights & Core Web Vitals Checker uses public data sources only, so there is nothing to connect and no account to risk.

**How much will a run cost?** You pay only for results delivered (see Pricing above), plus Apify platform usage, which the free plan's monthly credit easily covers for test runs. Start with a small limit to see the exact cost per run.

**Can I export to CSV, Excel or Google Sheets?** Yes. Every run's dataset can be downloaded as JSON, CSV, Excel, XML or HTML, or pushed to Google Sheets, Make, Zapier, n8n, Slack or a webhook through Apify integrations.

**Can I run it on a schedule or from my own code?** Yes. Add an Apify Schedule (hourly, daily, weekly) or call it through the Apify API / Python & JavaScript clients. It also works with AI agents through the Apify MCP server.

**What happens if I forget the Google API key?** Apify refuses the run before it starts, so nothing is charged. If the key is wrong, expired or missing the PageSpeed Insights API, every row gets an `error` explaining exactly what to fix, and those rows are not charged.

**What happens if an input is invalid or a source is down?** The run keeps going. The bad input gets a row with an `error` field so you can see what failed, and you are not charged for results that were not delivered.

**Is this legal to use?** It collects publicly available data. You are responsible for using the output in line with the source's terms and privacy laws such as GDPR/CCPA; don't use it for spam.

**Something missing or broken?** Open an issue on the Issues tab. Feature requests are usually added within a few days.

### Scheduling / monitoring

Create a Schedule (daily/weekly) with monitor mode on, and connect a webhook or Slack/email integration to get only the changes.

### Fair use

Uses public files/official APIs only, no login. Only audit sites and data you are entitled to; do not use output for spam.

### Related tools

- [On-Page SEO Audit & Metadata Extractor (bulk + crawl)](https://apify.com/mediapro-tools/seo-onpage-audit-metadata)
- [Bulk Website Screenshot (full page, mobile & desktop)](https://apify.com/mediapro-tools/bulk-website-screenshot)
- [Broken Link Checker & Redirect Chain Auditor](https://apify.com/mediapro-tools/broken-link-redirect-auditor)
- [Bulk Website Tech Stack Detector & Change Monitor](https://apify.com/mediapro-tools/bulk-tech-stack-detector)

### REST API

`GET https://api.mediaprotools.com/v1/pagespeed-bulk?items=...` (header `X-API-Key`). Up to 5 items per call, separated by `,`. Or POST `{"items":[...],"options":{...}}`.

| Parameter | Type | Notes |
|---|---|---|
| `items` | token | Pages or domains to test. |
| `googleApiKey` | string | REQUIRED. This tool runs on YOUR own free Google API key, so tests count against your own Google quota (25,000 PageSpeed requests/day free). Create an API key in Google Cloud Console, enable 'PageSpeed Insights API' for that project, and send it as googleApiKey. |
| `strategies` | array | mobile and/or desktop. |
| `categories` | array | Lighthouse categories |
| `includeCruxHistory` | boolean | Origin-level p75 LCP/INP/CLS over ~25 weeks (needs API key). |
| `scoreDropAlert` | integer 1-1000000 | Score drop alert (points) |

Output fields: error, strategy, testedAt, url.

# Actor input Schema

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

REQUIRED. This Actor runs on YOUR own free Google API key, so tests count against your own Google quota (25,000 PageSpeed requests/day free). Runs without a key are refused before they start and cost nothing. Setup: 1) Open console.cloud.google.com and create/select a project. 2) APIs & Services > Library > enable 'PageSpeed Insights API' (and 'Chrome UX Report API' if you want CrUX history). 3) APIs & Services > Credentials > Create credentials > API key. 4) Recommended: restrict the key to those two APIs. 5) Paste the key here. It is stored encrypted as a secret input.

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

Pages or domains to test (1 to 250 per run; duplicates are removed). Entries that are not valid URLs get a row with an error and are not charged.

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

mobile and/or desktop.

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

No description

## `includeCruxHistory` (type: `boolean`):

Origin-level p75 LCP/INP/CLS over ~25 weeks (needs API key).

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

Tests run in parallel. Each Google PageSpeed test usually takes 10-40 s.

## `monitorMode` (type: `boolean`):

Store last score and flag drops.

## `scoreDropAlert` (type: `integer`):

No description

## `stateStoreName` (type: `string`):

No description

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://web.dev"
  ],
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance"
  ],
  "includeCruxHistory": false,
  "maxConcurrency": 4,
  "monitorMode": false,
  "scoreDropAlert": 10,
  "stateStoreName": "pagespeed-bulk"
}
```

# Actor output Schema

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

All result records in the default dataset (table view: overview).

## `files` (type: `string`):

Files saved by this run (download links are also in each result record).

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

Counts and stats for this run (JSON).

# 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("mediapro-tools/pagespeed-crux-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("mediapro-tools/pagespeed-crux-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 mediapro-tools/pagespeed-crux-bulk --silent --output-dataset

```

## MCP server setup

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