# PageSpeed & Core Web Vitals Monitor (own Google API key) (`jwaiworks/pagespeed-cwv-monitor`) Actor

Bring your own Google API key: bulk PageSpeed and Core Web Vitals (LCP, INP, CLS) for many URLs on mobile and desktop. Monitor mode outputs only pages whose scores or vitals changed. Not affiliated with or endorsed by Google LLC.

- **URL**: https://apify.com/jwaiworks/pagespeed-cwv-monitor.md
- **Developed by:** [JW AI Works](https://apify.com/jwaiworks) (community)
- **Categories:** Developer tools, SEO tools
- **Security:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

**Bring your own Google API key.** You enter your own key for your own run; it is never stored, logged or shown.

Check PageSpeed scores and Core Web Vitals (LCP, INP, CLS) for hundreds of URLs in one run, on mobile and desktop, using **your own free Google API key**. Turn on monitor mode and schedule it: each run outputs only pages whose scores moved or whose Core Web Vitals status changed.

*Not affiliated with or endorsed by Google LLC. PageSpeed Insights and Lighthouse are Google trademarks, named only to describe compatibility.*

### What does this PageSpeed Insights bulk checker do?

For each URL and device it calls Google's official PageSpeed Insights API v5 and returns one clean row: Lighthouse scores (0-100) for performance, accessibility, best practices and SEO; lab metrics (FCP, LCP, TBT, CLS, Speed Index, TTI, server response time); real-user field data from the Chrome UX Report (p75 LCP, INP, CLS, FCP, TTFB and pass/fail) for the URL or its origin; and the top 5 speed opportunities with estimated savings.

### Your Google API key: used only for your run

- You create the key yourself in Google Cloud Console (APIs & Services > Credentials, enable "PageSpeed Insights API"). Google's default quota is often about 25,000 checks a day at no cost; check your own Cloud console Quotas page for the number that applies to your project.
- The key is used **only for your run** and is sent **only to www.googleapis.com** (any other API address is refused).
- It is **never stored, logged or shown** by this Actor: it is not written to the dataset, the key-value store, the monitor memory, logs, status messages or error messages. If Google ever echoes it back in an error, it is masked as `***`. Apify keeps the input field encrypted as a secret.
- Tip: restrict the key to the PageSpeed Insights API only.

### Core Web Vitals monitor mode

Lab scores wobble a few points between runs, so a URL counts as changed only when a score moves by at least the threshold (default 5 points) or a Core Web Vitals category flips (for example LCP goes from FAST to AVERAGE). Changed rows include `changedFields` and the previous values. Unchanged URLs are not output and cost less. Use a different monitor name per client or site.

### Example output

| url | strategy | performanceScore | fieldCwvAssessment | fieldLcpP75 | labTbtMs | changeType |
|---|---|---|---|---|---|---|
| https://example.com/pricing | mobile | 62 | failed | 3100 | 480 | changed |
| https://example.com/ | desktop | 94 | passed | 1700 | 30 | new |

### Pricing

Users on the free Apify plan get up to 100 results per run (then the run stops with a clear status message).

Pay per event: **$0.005 per URL audit** delivered (one URL on one device), **$0.002 per unchanged monitor check**. Failed pages and checks blocked by Google quota are never charged. Example: 200 URLs on mobile + desktop checked daily = 400 checks. First run $2.00; a typical day after that with 20 changes = 20 x $0.005 + 380 x $0.002 = $0.86. Free Apify plan users get up to 100 checks per run.

### Input

`apiKey` (required), `urls`, `strategies` (mobile/desktop), `categories`, `monitorMode`, `monitorStateName`, `scoreChangeThreshold`, `alertBelowPerformanceScore` (sets `belowThreshold`), `maxConcurrency`.

### FAQ

**Why do I need my own key?** Google's keyless quota is shared and often exhausted; Google's terms say your credentials identify your own API client, so each user brings their own.
**How long does a check take?** Google runs a real Lighthouse test, usually 10-40 seconds per URL; checks run in parallel.
**Why is field data empty?** The Chrome UX Report only has data for pages with enough real Chrome traffic; the origin-level values are used as a fallback.
**Can it test pages behind a login or on my local network?** No. Only public URLs; private and local addresses are refused.

### Is it legal?

It's built to use only public data via Google's official PageSpeed Insights API with your own credentials. It uses Google's official, documented PageSpeed Insights API with your own credentials, under the Google APIs Terms of Service. It tests public pages only and collects no personal data. You are responsible for your own Google Cloud account and quota. This isn't legal advice.

### Example input / example output

**Example input**

```json
{
  "apiKey": "YOUR_GOOGLE_PSI_API_KEY",
  "urls": ["https://example.com/"],
  "strategies": ["mobile"],
  "monitorMode": false
}
```

**Example output** (one URL × device)

```json
{
  "url": "https://example.com/",
  "strategy": "mobile",
  "performanceScore": 62,
  "fieldCwvAssessment": "failed",
  "fieldLcpP75": 3100,
  "labTbtMs": 480,
  "changeType": "new"
}
```

### Use it with Make, Zapier, n8n, or AI agents (Apify MCP)

- **Make:** In Make, add the Apify module, connect your Apify account, then run this Actor (or an Actor task) and map dataset items into your scenario. See [Make integration](https://docs.apify.com/integrations/make).
- **Zapier:** In Zapier, use Apify as a trigger (finished Actor/task run) or action (Run Actor / Run Task / Fetch dataset items). See [Zapier integration](https://docs.apify.com/integrations/zapier).
- **n8n:** Install the Apify node, authenticate, then use **Run an Actor** or **Run an Actor and get dataset**. See [n8n integration](https://docs.apify.com/integrations/n8n).
- **AI agents (Apify MCP):** Connect your MCP client to `https://mcp.apify.com`, then use `search-actors`, `fetch-actor-details`, and `call-actor`. Pull results with `get-dataset-items`. See [Apify MCP server](https://docs.apify.com/mcp).

**Related actors:** [Email Auth Checker](https://apify.com/jwaiworks/email-auth-checker) · [ATS Jobs Feed](https://apify.com/jwaiworks/ats-jobs-feed) · [SEC Form D Funding Monitor](https://apify.com/jwaiworks/sec-form-d-funding-monitor) · [Texas New Business Entities Feed](https://apify.com/jwaiworks/texas-new-business-entities) · [Copycat Store & Lookalike Domain Suspect Checker](https://apify.com/jwaiworks/copycat-store-checker)

### Disclaimer

Provided as is. Scores come from Google and vary between runs. Not affiliated with or endorsed by Google LLC.

# Actor input Schema

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

Your own key from Google Cloud Console with the PageSpeed Insights API enabled (free; Google's default quota is 25,000 checks a day). Used only for this run: sent only to www.googleapis.com, never stored, logged or shown by the Actor (Apify keeps run input encrypted as a secret field). Tip: restrict the key to the PageSpeed Insights API.

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

Public pages to test, e.g. https://example.com/pricing.

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

Each device is one check.

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

Extra categories make each check slower.

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

Output only URLs whose scores moved by the threshold or whose Core Web Vitals status changed.

## `monitorStateName` (type: `string`):

Separate monitors keep separate memory.

## `scoreChangeThreshold` (type: `integer`):

Lab scores vary run to run; smaller moves are ignored.

## `alertBelowPerformanceScore` (type: `integer`):

Sets belowThreshold=true on results under this score.

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

Each check takes ~10-40 s at Google.

## `apiBaseUrl` (type: `string`):

Only https://www.googleapis.com is accepted, so your key only goes to Google.

## Actor input object example

```json
{
  "urls": [
    "https://web.dev/"
  ],
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance"
  ],
  "monitorMode": false,
  "monitorStateName": "default",
  "scoreChangeThreshold": 5,
  "maxConcurrency": 4,
  "apiBaseUrl": "https://www.googleapis.com"
}
```

# Actor output Schema

## `overview` (type: `string`):

Default dataset items in the overview view.

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

Default dataset items with every field.

## `runSummary` (type: `string`):

RUN_SUMMARY record in the default key-value store (counts, warnings, free-plan cap).

# 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://web.dev/"
    ]
};

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

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

```

## MCP server setup

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