# PageSpeed Monitor — Core Web Vitals & Lighthouse in Bulk (`alaudinburki/pagespeed-monitor`) Actor

Bulk PageSpeed Insights for any list of URLs on mobile and desktop: Lighthouse scores, lab metrics, real-user Core Web Vitals for the page and the whole site, the top fixes, and regression alerts between runs. Uses your free Google API key.

- **URL**: https://apify.com/alaudinburki/pagespeed-monitor.md
- **Developed by:** [alaudin burki](https://apify.com/alaudinburki) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

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

## PageSpeed Monitor — Core Web Vitals & Lighthouse in Bulk, with Alerts

Test any number of pages with **Google's official PageSpeed Insights** — mobile and desktop — and get one row per
page and device: **Lighthouse scores** (performance, accessibility, best practices, SEO), **lab metrics** (LCP, FCP,
TBT, CLS, Speed Index), **real-user Core Web Vitals** from Chrome users for the page and for the whole site, whether it
**passes Core Web Vitals**, and the **top five fixes** with their estimated savings.

Run it on a schedule with `onlyRegressions` and you only hear about pages that got worse: a performance score that
dropped by 10+ points, or a real-user LCP, INP or CLS that crossed Google's "good" line.

Built for agencies reporting on client sites, SEO teams watching templates after a release, and developers who want a
performance check across hundreds of URLs without opening PageSpeed one page at a time.

### You need a free Google API key

Google Cloud Console → APIs & Services → **enable "PageSpeed Insights API"** → Credentials → **Create API key**, then
paste it into `apiKey` (stored as a secret). The free quota is 25,000 tests a day. Without a key, PageSpeed's shared
public quota is used up and every request fails — which is why this Actor asks for yours.

### Input

```json
{ "urls": ["https://www.example.com/", "https://www.example.com/pricing"], "apiKey": "…", "strategies": ["mobile", "desktop"], "onlyRegressions": false }
```

### Output

`url`, `strategy`, `finalUrl`, `performanceScore`, `accessibilityScore`, `bestPracticesScore`, `seoScore`,
`labLcpMs`, `labFcpMs`, `labTbtMs`, `labCls`, `labSpeedIndexMs`, `labTtiMs`, `serverResponseMs`, `fieldCategory`,
`fieldLcpMs`, `fieldInpMs`, `fieldCls`, `fieldFcpMs`, `fieldTtfbMs`, `originFieldCategory`, `originLcpMs`,
`originInpMs`, `originCls`, `passesCoreWebVitals`, `topOpportunities`, `previousPerformanceScore`, `regressions`,
`hasRegression`, `lighthouseVersion`, `warnings`, `analyzedAt`.

Tested 2026-11-11: python.org mobile 89 / desktop 94, real-user LCP 1.3 s (FAST); GOV.UK mobile 78 / desktop 88.

### Good to know

- Lab scores move a few points between runs on their own; that is why a score drop counts only past `scoreDropAlert`.
- Field data needs enough Chrome traffic; small pages show `null` there, and the site-wide values still help.
- An invalid or restricted key stops the run with the reason; your key is never written to the log or the output.

### More from this developer

- [Wayback Machine Scraper — Website History & Snapshots](https://apify.com/alaudinburki/wayback-machine-snapshots)
- [AI Crawler Audit — Are You Blocking ChatGPT?](https://apify.com/alaudinburki/ai-crawler-audit)
- [Broken Link Checker — Honest Link Health](https://apify.com/alaudinburki/broken-link-checker)
- [Bulk DNS Lookup — A, MX, TXT, NS & CNAME Records](https://apify.com/alaudinburki/dns-lookup-bulk)

### Pricing

**$5.00 / 1,000 results** (`$0.005` per result), plus a near-zero start fee. One result is one page on one device.
Google's API usage is free on your own key.

# Actor input Schema

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

Full page URLs to test.

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

Your free key: Google Cloud Console → APIs & Services → enable PageSpeed Insights API → Credentials → Create API key. Free quota: 25,000 tests a day.

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

mobile, desktop or both.

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

performance, accessibility, best-practices, seo.

## `onlyRegressions` (type: `boolean`):

Return only results that got worse since the last run with the same state key. Schedule daily for alerts.

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

Performance-score points a page must lose to count as a regression (lab scores move a few points on their own).

## `stateKey` (type: `string`):

Where last run's results are kept. One key per URL list.

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

Tests run at once.

## Actor input object example

```json
{
  "urls": [
    "https://www.python.org/",
    "https://www.gov.uk/"
  ],
  "strategies": [
    "mobile",
    "desktop"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "onlyRegressions": false,
  "scoreDropAlert": 10,
  "stateKey": "PAGESPEED",
  "maxConcurrency": 3
}
```

# Actor output Schema

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

Every row of the run, in the dataset (fields as listed under Output in the README).

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

Counts, items not found and other notes for the run.

# 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://www.python.org/",
        "https://www.gov.uk/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("alaudinburki/pagespeed-monitor").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://www.python.org/",
        "https://www.gov.uk/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("alaudinburki/pagespeed-monitor").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://www.python.org/",
    "https://www.gov.uk/"
  ]
}' |
apify call alaudinburki/pagespeed-monitor --silent --output-dataset

```

## MCP server setup

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

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/mzzhqmLwRnodEaeyZ/builds/LshZu9DcFgkgky9B6/openapi.json
