# Bulk PageSpeed Insights Audit (Core Web Vitals, Lighthouse) (`psypherz/bulk-pagespeed-audit`) Actor

Audit up to 1,000 pages per run with Google PageSpeed Insights. Get Core Web Vitals field data, Lighthouse scores and top speed fixes, for mobile and desktop.

- **URL**: https://apify.com/psypherz/bulk-pagespeed-audit.md
- **Developed by:** [Muhammad Yasin Bin Abdul Rahman](https://apify.com/psypherz) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 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 Audit (Core Web Vitals, Lighthouse)

Audit up to 1,000 pages per run with Google PageSpeed Insights. For every page, on mobile and desktop, get the four Lighthouse scores, real-user Core Web Vitals from Chrome (when Google has them), lab metrics, a pass or fail verdict, and the biggest speed fixes ranked by time saved.

**Price: US$0.003 per audit, plus a US$0.0005 run fee.** 50 pages on mobile and desktop (100 audits) cost US$0.3005.

You need your own free Google API key. It takes about 2 minutes, and the steps are below.

### What people use it for

- **SEO audits:** check a whole site, or a client's top 100 pages, in one run.
- **Core Web Vitals monitoring:** schedule weekly runs and catch regressions before rankings drop.
- **Competitor benchmarks:** compare your speed with the sites that outrank you.
- **Agency reporting:** export a clean table to Sheets or Looker Studio.
- **Dev checks:** run before and after a release to prove a fix worked.

### Example output

Real output from the sample input (27 Oct 2026). Scores change from run to run.

| url | strategy | performance | accessibility | bestPractices | seo | coreWebVitalsPass | field LCP ms | field INP ms | field CLS |
|---|---|---|---|---|---|---|---|---|---|
| https://developer.mozilla.org/ | mobile | 72 | 95 | 96 | 100 | true | 1944 | 161 | 0.04 |
| https://developer.mozilla.org/ | desktop | 96 | 95 | 100 | 100 | true | 1682 | 54 | 0.03 |
| https://web.dev/ | mobile | 56 | 90 | 96 | 92 | false | 3057 | 227 | 0.01 |
| https://web.dev/ | desktop | 72 | 90 | 96 | 92 | false | 2684 | 71 | 0.07 |

One full item:

```json
{
  "url": "https://web.dev/",
  "finalUrl": "https://web.dev/",
  "strategy": "mobile",
  "scores": {
    "performance": 56,
    "accessibility": 90,
    "bestPractices": 96,
    "seo": 92
  },
  "coreWebVitalsPass": false,
  "fieldDataSource": "page",
  "field": {
    "lcpMs": 3057,
    "inpMs": 227,
    "cls": 0.01,
    "fcpMs": 3074,
    "ttfbMs": 1744,
    "overall": "SLOW"
  },
  "lab": {
    "lcpMs": 3907,
    "fcpMs": 3907,
    "tbtMs": 776,
    "cls": 0.119,
    "speedIndexMs": 3907,
    "serverResponseMs": 4
  },
  "topOpportunities": [
    {
      "id": "render-blocking-insight",
      "title": "Render-blocking requests",
      "savingsMs": 2350
    },
    {
      "id": "mainthread-work-breakdown",
      "title": "Minimize main-thread work",
      "savingsMs": 800
    },
    {
      "id": "bootup-time",
      "title": "Reduce JavaScript execution time",
      "savingsMs": 800
    }
  ],
  "lighthouseVersion": "13.5.0",
  "auditedAt": "2026-10-27T10:25:17+00:00"
}
```

- `field` is real-user data from the Chrome UX Report, 75th percentile. `fieldDataSource` is `page`, `origin` (whole-site data when the page has too few visits), or `null` when Google has none.
- `coreWebVitalsPass` is `true` when field LCP is 2,500 ms or less, INP 200 ms or less and CLS 0.1 or less. It is `null` without field data.
- `lab` comes from one Lighthouse test run by Google.

### Input

| Field | What it does | Default |
|---|---|---|
| `urls` | One page per line, up to 1,000. `https://` is added if missing. | 2 sample pages |
| `googleApiKey` | Your free Google API key. Required. Stored encrypted and only sent to Google. | none |
| `strategies` | `mobile`, `desktop`, or both. | both |
| `categories` | Lighthouse scores to return. | all four |
| `maxOpportunities` | How many speed fixes to list per audit, 0 to 10. | `3` |

#### Get your free Google API key (about 2 minutes)

1. Open [console.cloud.google.com](https://console.cloud.google.com) and sign in. Create a project if asked.
2. Go to **APIs & Services > Library**, search for **PageSpeed Insights API**, and click **Enable**.
3. Go to **APIs & Services > Credentials > Create credentials > API key**.
4. Copy the key into `googleApiKey`. Google gives each key a free daily quota.

### Pricing

| Event | Price |
|---|---|
| Run fee, once per run | US$0.0005 |
| Audit (one page on one device) | US$0.003 |

Examples: 1 page on mobile costs US$0.0035. 50 pages on both devices cost US$0.3005. Failed audits are listed with the reason and not charged.

### Limits

- 1,000 pages per run (2,000 audits with both devices).
- Google usually needs 10 to 30 seconds per audit, since it loads the page in a real browser. The Actor runs 6 audits at a time.
- Your Google key's daily quota applies. If it runs out, the remaining audits are marked and not charged.
- Pages behind a login cannot be audited.

### FAQ

**Why do I need my own key?** Google's API terms do not allow reselling access on one shared key. With your own key the audits run under your free Google quota, so the price here stays low.

**Why do scores differ from my last run?** Lighthouse lab scores vary a few points between runs. Field data is a 28-day average and moves slowly.

**What is the difference between field and lab data?** Field data is what real Chrome users experienced. Lab data is one simulated test. Google uses field data for rankings.

**Can an AI agent call it?** Yes. Compact JSON with stable field names and pay-per-event pricing.

### More tools from the same developer

Same style: clean JSON output, pay only for results, no charge on failed items.

| Tool | What it does |
|---|---|
| [Bulk Keyword Search Volume](https://apify.com/PsypherZ/keyword-search-volume) | Google Ads search volume, CPC, competition and 12-month trend for up to 10,000 keywords |
| [Google Trends API](https://apify.com/PsypherZ/google-trends-api) | Interest over time, by region, and rising queries and topics for up to 500 keywords |
| [Google SERP Results](https://apify.com/PsypherZ/google-serp-results) | Organic results, featured snippets and People Also Ask for any keyword, country and device |
| [Google AI Overview Tracker](https://apify.com/PsypherZ/google-ai-overview-tracker) | Which keywords show an AI Overview, what it says, and whether it cites your site |
| [Audio and Video Transcriber](https://apify.com/PsypherZ/audio-video-transcriber) | Timestamped transcripts from audio and video files in 90+ languages |
| [Subtitle Generator](https://apify.com/PsypherZ/subtitle-generator) | Ready-to-use SRT and WebVTT subtitles from audio and video files |
| [Podcast Transcriber](https://apify.com/PsypherZ/podcast-transcriber) | Timestamped transcripts of podcast episodes from any RSS feed or Apple Podcasts link |
| [Image OCR](https://apify.com/PsypherZ/image-ocr) | Text from images in 20 languages, with confidence scores |
| [PDF to Text and Markdown](https://apify.com/PsypherZ/pdf-to-text-markdown) | Clean text and Markdown from PDFs, with OCR for scanned pages |

# Actor input Schema

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

One page address per line. Up to 1,000 per run. https:// is added if missing.

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

Free, takes about 2 minutes. In Google Cloud Console: APIs & Services > Library > enable "PageSpeed Insights API" > Credentials > Create credentials > API key. Google gives each key a free daily quota. The key is stored encrypted and only sent to Google.

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

Audit as a mobile device, a desktop, or both. Each page and device is one audit.

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

Which Lighthouse scores to return.

## `maxOpportunities` (type: `integer`):

How many of the biggest speed fixes to list for each audit, ranked by time saved.

## Actor input object example

```json
{
  "urls": [
    "https://web.dev/",
    "https://developer.mozilla.org/"
  ],
  "strategies": [
    "mobile",
    "desktop"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "maxOpportunities": 3
}
```

# Actor output Schema

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

One row per URL and device: Lighthouse scores, Core Web Vitals and top speed fixes.

# 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/",
        "https://developer.mozilla.org/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("psypherz/bulk-pagespeed-audit").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/",
        "https://developer.mozilla.org/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("psypherz/bulk-pagespeed-audit").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/",
    "https://developer.mozilla.org/"
  ]
}' |
apify call psypherz/bulk-pagespeed-audit --silent --output-dataset

```

## MCP server setup

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

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/u8UfUJ8zCKeq7uUXn/builds/rVHoPXLxmgNJsu48i/openapi.json
