# PageSpeed & Lighthouse Bulk Audit: Core Web Vitals, SEO Scores (`spellzcode/pagespeed-insights-bulk-audit`) Actor

Bulk Google PageSpeed Insights (Lighthouse) audit for any list of URLs: performance, SEO, accessibility and best-practices scores, Core Web Vitals field data (LCP, INP, CLS) and the top fixes with savings. Mobile or desktop. $0.003 per audit; failed pages are free.

- **URL**: https://apify.com/spellzcode/pagespeed-insights-bulk-audit.md
- **Developed by:** [Mårten Fitzback](https://apify.com/spellzcode) (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 $2.10 / 1,000 audit completeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Insights API: Bulk Core Web Vitals Audit 💰$3/1K

Run Google PageSpeed Insights (Lighthouse) on **any list of URLs** in one go and get every result as clean JSON, CSV or Excel:

- **Scores 0-100** for Performance, SEO, Accessibility and Best practices
- **Core Web Vitals field data** from real Chrome users (CrUX): LCP, INP, CLS, FCP and TTFB at the 75th percentile, with Google's FAST / AVERAGE / SLOW rating, for the page and for the whole origin
- **Passes Core Web Vitals: yes / no**, the same verdict Google Search Console shows
- **Lab metrics**: LCP, FCP, Total Blocking Time, Speed Index, CLS and server response time
- **Top fixes ranked by time saved**: for example "Reduce unused JavaScript: 1,500 ms", "Eliminate render-blocking resources: 820 ms"
- **Failed SEO and accessibility checks** by name, plus page weight and request count

**Try it now:** press **Start**. The example input is already filled in. **$3 per 1,000 audits** ($0.003 each), and Apify's free $5 monthly credit covers about 1,700.

**$0.003 per audit ($3 per 1,000).** Pages Google cannot load are reported and **not charged**. No Google account, API key or quota needed.

### Use it for

- Checking a whole site, or a client's top pages, before and after a release
- Core Web Vitals monitoring: schedule it daily or weekly and compare runs
- SEO agencies' audits and reports for many domains at once
- Benchmarking your pages against competitors' pages

### Input

| Field | What it does |
|---|---|
| Pages to audit | Full URLs, one per line |
| Device | Mobile (what Google ranks on), Desktop, or both (two audits per page) |
| Lighthouse categories | Performance, Accessibility, Best practices, SEO. All four by default |
| Parallel audits | 1-8 at a time; each audit takes 10-40 seconds |
| Your own Google API key | Optional. Only if you want the calls counted on your own Google project |

### Output (one item per page and device)

```json
{
  "url": "https://example.com",
  "strategy": "mobile",
  "status": "ok",
  "performanceScore": 73,
  "seoScore": 92,
  "accessibilityScore": 88,
  "bestPracticesScore": 96,
  "passesCoreWebVitals": false,
  "coreWebVitalsPage": {
    "overall": "AVERAGE",
    "lcpMs": { "p75": 2900, "rating": "AVERAGE" },
    "inpMs": { "p75": 180, "rating": "FAST" },
    "cls": { "p75": 0.05, "rating": "FAST" }
  },
  "lab": { "lcpMs": 3123, "fcpMs": 1200, "tbtMs": 351, "speedIndexMs": 2800, "cls": 0.046, "ttfbMs": 410 },
  "opportunities": [
    { "id": "unused-javascript", "title": "Reduce unused JavaScript", "savingsMs": 1500, "savingsBytes": 220000 }
  ],
  "failedSeoChecks": ["Document does not have a meta description"]
}
```

Field data appears only for pages and origins with enough Chrome traffic. Small sites get `null` there, which is Google's own answer, not a fault. Lab scores vary a few points between runs, as they do on pagespeed.web.dev.

### Notes

- The results come from Google's official PageSpeed Insights API v5, the same engine as pagespeed.web.dev.
- Only public pages can be audited. Pages behind a login or blocked to Google's crawler come back as `failed` with Google's message, and are free.
- Use the run's maximum charge setting to cap the cost. The actor stops cleanly when it is reached.

# Actor input Schema

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

Full page addresses, one per line. Each page is audited by Google's PageSpeed Insights (Lighthouse) and its Core Web Vitals field data.

## `strategy` (type: `string`):

Mobile is what Google uses for ranking. 'Both' runs two audits per page (charged as two).

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

Scores to compute. Leave all four for the full audit.

## `concurrency` (type: `integer`):

How many pages to audit at the same time (1-8). Each audit takes 10-40 seconds.

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

Not needed: the actor brings its own quota. Add your PageSpeed Insights API key only if you want audits counted on your own Google project.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://www.wikipedia.org"
  ],
  "strategy": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "concurrency": 4
}
```

# Actor output Schema

## `audits` (type: `string`):

One item per page and device: Lighthouse scores, lab metrics, Core Web Vitals field data and the top 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://apify.com",
        "https://www.wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("spellzcode/pagespeed-insights-bulk-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://apify.com",
        "https://www.wikipedia.org",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spellzcode/pagespeed-insights-bulk-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/DYdnMrni6YkbmpiRM/builds/5pbXjWY9h2k2fWWEq/openapi.json
