# Bulk PageSpeed Insights, Core Web Vitals & SEO Audit (`chesapeake/pagespeed-seo-audit`) Actor

Audit hundreds of URLs at once: Google PageSpeed / Lighthouse scores (performance, accessibility, best practices, SEO), Core Web Vitals lab and real-user CrUX field data, top speed opportunities, plus on-page SEO checks (title, meta, H1, canonical, schema, Open Graph). Pay per audit.

- **URL**: https://apify.com/chesapeake/pagespeed-seo-audit.md
- **Developed by:** [Chesapeake Commerce](https://apify.com/chesapeake) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 lighthouse audit (built-in engine)s

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, Core Web Vitals & SEO Audit (Lighthouse)

Check **Google PageSpeed / Lighthouse scores for hundreds of URLs in one run**: performance, accessibility, best practices and SEO, on mobile and desktop. You also get Core Web Vitals, both lab data and **real-user Chrome UX Report (CrUX) field data**, the top speed opportunities with estimated savings, and an **on-page SEO audit** for each page (title, meta description, H1, canonical, noindex, structured data, Open Graph, alt text, links and word count).

It's built for SEO agencies, web developers, site owners and AI agents that need PageSpeed data as JSON, CSV or Excel without pasting URLs into pagespeed.web.dev one at a time.

### What you get for each URL

- **Lighthouse category scores (0–100):** Performance, Accessibility, Best Practices, SEO
- **Lab metrics:** LCP, FCP, TBT, CLS, Speed Index, TTI, server response time, page weight, request count, DOM size
- **Field data (CrUX):** p75 LCP, INP, CLS, FCP and TTFB with FAST / AVERAGE / SLOW verdicts, for the URL and the whole origin, when Google has enough traffic data
- **Top 10 opportunities**, e.g. "Reduce unused JavaScript", with ms and KB savings
- **Failed audits** in SEO, accessibility and best practices
- **On-page SEO:** title and length, meta description and length, H1s, canonical, robots meta, X-Robots-Tag, lang, viewport, hreflang, JSON-LD schema types, Open Graph, Twitter card, images missing alt, internal and external links, word count, a 0–100 on-page score, and a list of issues with severities

### How to use it

1. Paste your URLs.
2. Pick **Mobile**, **Desktop** or both.
3. Click **Start** and export results as JSON, CSV, Excel or HTML. You can also schedule runs to track Core Web Vitals over time.

Want only the SEO checks? Turn off **Run PageSpeed / Lighthouse audit** for a very fast and very cheap on-page crawl.

#### Input example

```json
{
  "urls": ["https://apify.com", "https://web.dev"],
  "strategies": ["mobile", "desktop"],
  "runPageSpeed": true,
  "runOnPageSeo": true
}
```

#### Output example (one item, shortened; `fieldData` shown with illustrative values)

```json
{
  "url": "https://apify.com/",
  "finalUrl": "https://apify.com/",
  "status": "OK",
  "strategy": "mobile",
  "engine": "psi",
  "scores": {
    "performance": 37,
    "accessibility": 100,
    "bestPractices": 75,
    "seo": 85
  },
  "metrics": {
    "firstContentfulPaintMs": 2363,
    "largestContentfulPaintMs": 9627,
    "totalBlockingTimeMs": 5002,
    "cumulativeLayoutShift": 0.004,
    "speedIndexMs": 5812,
    "timeToInteractiveMs": 34340,
    "serverResponseTimeMs": 92,
    "totalByteWeight": 5025543,
    "requestCount": 251,
    "domSize": 1638
  },
  "fieldData": {
    "id": "https://apify.com/",
    "overall": "AVERAGE",
    "lcp": {
      "p75": 2600,
      "category": "AVERAGE"
    },
    "inp": {
      "p75": 150,
      "category": "FAST"
    },
    "cls": {
      "p75": 0.02,
      "category": "FAST"
    },
    "fcp": {
      "p75": 1700,
      "category": "FAST"
    },
    "ttfb": {
      "p75": 700,
      "category": "FAST"
    }
  },
  "originFieldData": null,
  "opportunities": [
    {
      "id": "unused-javascript",
      "title": "Reduce unused JavaScript",
      "savingsMs": 1420,
      "savingsKb": 1324
    },
    {
      "id": "offscreen-images",
      "title": "Defer offscreen images",
      "savingsMs": 0,
      "savingsKb": 16
    },
    {
      "id": "unminified-css",
      "title": "Minify CSS",
      "savingsMs": 0,
      "savingsKb": 5
    }
  ],
  "diagnostics": {
    "failedSeoAudits": [
      "Links do not have descriptive text",
      "robots.txt is not valid"
    ],
    "failedAccessibilityAudits": [
      "Image elements have `[alt]` attributes that are redundant text."
    ],
    "failedBestPracticeAudits": [
      "Uses third-party cookies",
      "Browser errors were logged to the console",
      "Issues were logged in the `Issues` panel in Chrome Devtools"
    ]
  },
  "seo": {
    "httpStatus": 200,
    "finalUrl": "https://apify.com/",
    "redirected": false,
    "ttfbMs": 129,
    "contentType": "text/html; charset=utf-8",
    "htmlBytes": 534545,
    "title": "Apify: Marketplace of ready-to-run tools for AI",
    "titleLength": 47,
    "metaDescription": "Thousands of tools to automate your business. Get real-time web data, track competitors, generate leads, and integrate your apps and AI agents.",
    "metaDescriptionLength": 143,
    "canonical": "https://apify.com",
    "robotsMeta": "index,follow",
    "xRobotsTag": null,
    "lang": "en",
    "viewport": "width=device-width, initial-scale=1",
    "h1": [
      "97,680 tools for your AI"
    ],
    "h2Count": 11,
    "wordCount": 1176,
    "images": 78,
    "imagesMissingAlt": 0,
    "links": {
      "internal": 78,
      "external": 58,
      "nofollow": 20
    },
    "openGraph": {
      "title": "Apify: Marketplace of ready-to-run tools for AI",
      "description": "Thousands of tools to automate your business. Get real-time web data, track competitors, generate leads, and integrate your apps and AI agents.",
      "url": "https://apify.com",
      "site_name": "Apify",
      "locale": "en_US",
      "image": "https://apify.com/og-image?title=Thousands+of+tools%0Afor+your+AI",
      "image:type": "image/png",
      "image:width": "1200",
      "image:height": "630",
      "image:alt": "Thousands of tools for your AI",
      "type": "website"
    },
    "twitterCard": "summary_large_image",
    "structuredDataTypes": [
      "Organization",
      "WebSite",
      "SoftwareApplication"
    ],
    "hreflang": [],
    "onPageScore": 100,
    "issues": []
  },
  "lighthouseVersion": "12.8.2",
  "fetchedAt": "2026-10-24T18:02:14.308Z",
  "durationMs": 18939
}
```

#### API example (Python)

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("chesapeake/pagespeed-seo-audit").call(run_input={"urls": ["https://example.org"], "strategies": ["mobile"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item.get("scores"))
```

### Pricing (pay per event)

| Event | Price |
|---|---|
| PageSpeed audit via Google PSI API (per URL per device) | **$0.004** |
| Lighthouse audit in the Actor's own Chrome (used when no Google API key is available) | $0.025 |
| On-page SEO check only (PageSpeed turned off) | $0.0015 |
| Actor start | $0.00005 |

The on-page SEO check is **included free** with every PageSpeed audit. Example with the PSI engine: 250 URLs × mobile + desktop = 500 audits = **$2.00**. Failed URLs, 4xx/5xx pages and URLs blocked by robots.txt are **not charged**.

### FAQ

**Are the scores the same as pagespeed.web.dev?** Yes, with the PSI engine, which calls Google's official PageSpeed Insights API (the same backend as pagespeed.web.dev) and needs a Google API key: paste your own free key into **Your Google API key**. Without a key, the default `auto` engine runs Lighthouse in the Actor's own Chrome instead: same Lighthouse audits, but no CrUX field data and lower performance scores (see below). Scores vary a few points between runs, just as they do on Google's site.

**What is the difference between lab data and field data?** Lab metrics come from one simulated Lighthouse load. Field data (CrUX) is the 75th percentile of real Chrome users over the last 28 days, and it's what Google uses for Core Web Vitals in Search. Small sites may have no field data (`fieldData: null`).

**Can I use my own Google API key?** Yes, and it's recommended. Paste a free PageSpeed Insights API key into **Your Google API key** to switch to the PSI engine: faster, includes real-user CrUX data, and billed at the cheaper PSI rate ($0.004 instead of $0.025).

**Why is my score lower with the "Lighthouse" engine?** It runs Chrome inside the Actor's container, which has less CPU than Google's servers, so performance scores are typically lower. Use it for relative comparisons only.

**Does it respect robots.txt?** Yes. URLs disallowed for automated agents are skipped and not charged. It reads only public pages and collects no personal data.

**Can it audit a whole site?** Give it a list of URLs, for example from your sitemap. Up to 1,000 URLs per run.

# Actor input Schema

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

Pages to audit (max 1,000 per run).

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

One PageSpeed audit per URL per strategy.

## `runPageSpeed` (type: `boolean`):

Lighthouse scores, Core Web Vitals and opportunities.

## `runOnPageSeo` (type: `boolean`):

Title, meta description, headings, canonical, robots, structured data, Open Graph, alt text, links. Free when combined with a PageSpeed audit.

## `includeOpportunities` (type: `boolean`):

Top 10 speed opportunities with estimated savings, and failed SEO, accessibility and best-practice checks.

## `engine` (type: `string`):

Auto uses the Google PSI API when a Google API key is available, otherwise it runs Lighthouse in the Actor's own Chrome. The PSI API matches pagespeed.web.dev exactly and includes real-user Chrome UX Report data.

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

Optional but recommended. Your own free PageSpeed Insights API key (Google Cloud) enables the PSI engine: faster, includes CrUX field data and costs less per audit. Without it, Lighthouse runs in the Actor's own Chrome.

## `respectRobotsTxt` (type: `boolean`):

Skip URLs that robots.txt disallows for automated agents.

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

0 = automatic (6 with the PSI API, 1 with local Lighthouse for stable scores).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://web.dev"
  ],
  "strategies": [
    "mobile"
  ],
  "runPageSpeed": true,
  "runOnPageSeo": true,
  "includeOpportunities": true,
  "engine": "auto",
  "respectRobotsTxt": true,
  "maxConcurrency": 0
}
```

# Actor output Schema

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

One item per URL/strategy in the default dataset, Scores & Core Web Vitals view selected.

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

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

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

```

## MCP server setup

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