# Bulk PageSpeed Insights Checker - Core Web Vitals & SEO (`sumitr_mardy/pagespeed-audit`) Actor

Bulk PageSpeed Insights and Lighthouse audit for a list of URLs or a whole sitemap: performance, SEO, accessibility and best-practices scores, LCP, INP, CLS, real-user Core Web Vitals and top fixes, mobile and desktop. No API key needed. $2 per 1,000 audits.

- **URL**: https://apify.com/sumitr_mardy/pagespeed-audit.md
- **Developed by:** [Sumitr Mardy](https://apify.com/sumitr_mardy) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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.
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

## Bulk PageSpeed Insights Checker - Core Web Vitals & SEO

Run **Google PageSpeed Insights** on a list of URLs or a **whole sitemap** and get one clean row per page: the four **Lighthouse scores** (performance, SEO, accessibility, best practices), lab metrics (LCP, TBT, CLS, FCP, Speed Index), **real-user Core Web Vitals** from Google's Chrome UX Report (LCP, INP, CLS with FAST / AVERAGE / SLOW), page weight, and the **top 5 fixes** with the time each one would save. Mobile, desktop, or both.

**$2 per 1,000 audits**. Pages that cannot be loaded are free. **No API key needed**: the actor uses its own Google key (bring yours if you need a bigger daily quota).

Built for:

- **SEO agencies**: audit a client's whole site from its sitemap and hand over a spreadsheet of scores and fixes.
- **Developers and site owners**: check every important page before and after a release; schedule it to watch Core Web Vitals.
- **Lead generation**: find businesses with slow websites and send them a concrete reason to talk.
- **Competitor benchmarks**: compare your speed and SEO scores with competitors' pages.

### What you get

| Field | Example |
|---|---|
| `url`, `strategy`, `finalUrl` | https://stripe.com/, mobile, https://stripe.com/ |
| `performance`, `seo`, `accessibility`, `bestPractices` | 51, 92, 95, 100 (0-100) |
| `lcpMs`, `fcpMs`, `tbtMs`, `cls`, `speedIndexMs`, `ttiMs` | lab metrics from Lighthouse |
| `serverResponseMs`, `totalBytes`, `requests` | server time, page weight, number of requests |
| `fieldOverall`, `fieldLcpMs`/`fieldLcp`, `fieldInpMs`/`fieldInp`, `fieldCls`/`fieldClsCategory`, `fieldFcpMs`, `fieldTtfbMs` | real-user Core Web Vitals (75th percentile) and FAST / AVERAGE / SLOW ratings |
| `fieldSource`, `originFieldOverall` | `url`, or `origin` when the page has too little traffic and Google reports the whole site; the site's own verdict |
| `opportunities` | \[{"title": "Render-blocking requests", "savingsMs": 1300}, ...] top 5 fixes |
| `lighthouseVersion`, `auditedAt` | 13.6.0, time of the audit |
| `input`, `status`, `error` | the line you gave, ok, "" |

Every row has every key: numbers are numbers (0 when Google has no data), lists are lists, so it exports cleanly to CSV, Excel and Google Sheets.

`status` is `ok` for an audit (billed). Anything else is one free row explaining why:

- `unreachable`: Lighthouse could not load the page (DNS error, 404 with no content, blocked), with Google's message.
- `rate_limited`: the daily PageSpeed Insights quota was reached; run again later or add your own key.
- `invalid_input`: not a web page URL, or a sitemap with no URLs.
- `failed`, `max_cost_reached`, `free_work_limit`: the run stopped early or Google did not answer.

### How to use it

1. Paste page URLs, one per line, or a sitemap such as `https://example.com/sitemap.xml` (sitemap indexes work too).
2. Choose **Mobile**, **Desktop**, or **Both** (two audits per URL). Google ranks on mobile.
3. Set **Max URLs** for big sitemaps (default 100).
4. Start, then download as CSV, Excel or JSON, or send it to Google Sheets, Zapier or Make. Schedule it weekly to track changes.

### Pricing

| Event | Price | When |
|---|---|---|
| `audit` | $0.002 | one URL on one device, with scores, lab metrics, real-user Core Web Vitals and fixes |

That is **$2 per 1,000 audits**, cheaper on higher Apify plans, and no per-run fee beyond Apify's standard tiny start event. Unreachable pages and quota errors are free, and the run stops cleanly at your *Max cost per run*.

### Speed

Measured on Apify at 256 MB:

- 100 pages from a sitemap: **174 seconds**, 98 audited, 2 free `rate_limited` rows when Google throttled one site.
- 40 pages from a sitemap: **165 seconds**, all 40 audited.
- Google takes 10-60 seconds per audit; the actor runs many at once, so a list of hundreds finishes in minutes.

### Honest limits

- Lab scores move a few points between runs: that is how Lighthouse works (network and CPU vary). Compare averages, not single runs.
- Real-user data exists only for pages and sites with enough Chrome traffic; small sites get empty `field*` values.
- The built-in key shares Google's daily quota (25,000 audits) across all users. If you see `rate_limited`, add your own free key from Google Cloud (PageSpeed Insights API) in the input.
- Pages behind a login cannot be audited.

### What can you do with PageSpeed data?

- **Audit a whole website**: every page from the sitemap with performance, SEO and accessibility scores.
- **Track Core Web Vitals**: LCP, INP and CLS from real Chrome users, the signals Google uses in ranking.
- **Prioritise fixes**: the top fixes per page with estimated time saved.
- **Find prospects**: list businesses whose sites score badly and offer to fix them.

### How to check PageSpeed for many URLs

1. Paste your URLs or your sitemap URL.
2. Pick mobile, desktop or both.
3. Click **Start**. Dozens of pages take a couple of minutes.
4. Export to CSV, Excel or Google Sheets, or schedule it weekly.

### How much does a bulk PageSpeed check cost?

$2 per 1,000 audits. Apify's free plan includes $5 of monthly credit: about 2,500 audits a month.

### Is this the official Google PageSpeed Insights?

Yes, the results come from Google's official PageSpeed Insights API (Lighthouse plus Chrome UX Report data), the same engine as pagespeed.web.dev. This actor runs it in bulk and flattens the answer into a table. It is an independent tool, not made or endorsed by Google.

### Related tools

- [Tech Stack Detector](https://apify.com/sumitr_mardy/tech-stack-detector): which CMS, frameworks and tools a site runs.
- [Website Contact Finder](https://apify.com/sumitr_mardy/website-contact-finder): emails and phones from a site, for outreach about its speed.
- [Website to Markdown](https://apify.com/sumitr_mardy/website-to-markdown): clean page text for LLMs.

### Use it from AI agents (MCP)

Hosted, with OAuth sign-in:

```json
{
    "mcpServers": {
        "pagespeed": {
            "url": "https://mcp.apify.com/?tools=sumitr_mardy/pagespeed-audit"
        }
    }
}
```

With an API token instead of OAuth:

```json
{
    "mcpServers": {
        "pagespeed": {
            "url": "https://mcp.apify.com/?tools=sumitr_mardy/pagespeed-audit",
            "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
        }
    }
}
```

Local stdio:

```json
{
    "mcpServers": {
        "pagespeed": {
            "command": "npx",
            "args": ["-y", "@apify/actors-mcp-server", "--actors", "sumitr_mardy/pagespeed-audit"],
            "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
        }
    }
}
```

Agent tips: pass full URLs in `urls`; use `strategy: "mobile"` unless asked for desktop; one audit takes 10-60 seconds.

### Run it from code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("sumitr_mardy/pagespeed-audit").call(run_input={
    "urls": ["https://example.com/sitemap.xml"],
    "strategy": "mobile",
    "maxUrls": 50,
})
for x in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(x["url"], x["performance"], x["seo"], x["lcpMs"], x["fieldOverall"])
```

cURL (waits for the run and returns the rows):

```bash
curl -X POST "https://api.apify.com/v2/acts/sumitr_mardy~pagespeed-audit/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com","https://example.org"],"strategy":"both"}'
```

### FAQ

**Do I need a Google API key?** No. Add your own only if the shared daily quota runs out.

**Why do scores differ from my last run?** Lighthouse lab scores vary by a few points run to run. Real-user (`field*`) values are a 28-day average and move slowly.

**Can it audit pages behind a login?** No, Google's servers load the page as an anonymous visitor.

# Actor input Schema

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

One per line: page URLs (https://example.com/pricing) or a sitemap (https://example.com/sitemap.xml) to audit every page in it.

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

Google ranks on mobile. "Both" runs two audits per URL and is billed twice.

## `maxUrls` (type: `integer`):

Stop after this many URLs (sitemaps can be large).

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

Leave empty to use the built-in key. Add your own Google API key only if you hit the shared daily quota.

## Actor input object example

```json
{
  "urls": [
    "https://www.wikipedia.org",
    "https://www.python.org"
  ],
  "strategy": "mobile",
  "maxUrls": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

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

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

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

```

## MCP server setup

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