# PageSpeed & Core Web Vitals Audit: Whole Site from a Sitemap (`goldensky_api/pagespeed-core-web-vitals-audit`) Actor

Audit every page of a site from its sitemap or a URL list: Lighthouse scores, Core Web Vitals (LCP, CLS, TBT) and the top fixes ranked by time saved. Median of 3 runs per page. Failed pages are free.

- **URL**: https://apify.com/goldensky_api/pagespeed-core-web-vitals-audit.md
- **Developed by:** [GoldenSky](https://apify.com/goldensky_api) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 page auditeds

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

## PageSpeed & Core Web Vitals Audit: whole site from a sitemap

**Give it a sitemap or a list of pages. Get back, for every page, the Lighthouse scores, the Core Web Vitals and the fixes ranked by how much time they save, plus a short list of the pages to fix first.** Each page is tested up to 3 times and the median run is reported, so one unlucky run does not decide your score.

**You only pay for pages that are audited. Failed pages, 404s, timeouts, blocked sites, refused addresses and empty results are free.** If a run audits nothing, the run is marked as failed so your automation sees it.

| | |
|---|---|
| Price | **$20 per 1,000 pages audited** (Free plan; less on paid Apify plans), plus a small start fee of $0.003 per GB of run memory (a default run uses 2 GB, so $0.006 per run) |
| Input | A sitemap address, a list of pages, or both |
| Tested | Lighthouse 13 run inside the Actor, median of up to 3 runs per page |
| Needs | Nothing. No Google API key, no quota, no login |

### What you get

- **Whole site from a sitemap.** Point it at `sitemap.xml` (or a sitemap index) and it audits the pages in it, up to the limit you set. Only pages on the sitemap's own site are used.
- **Scores:** Performance, Accessibility, Best practices and SEO, each with a plain rating (good, needs improvement, poor).
- **Core Web Vitals lab measurements:** Largest Contentful Paint, Cumulative Layout Shift, Total Blocking Time, plus First Contentful Paint, Speed Index and server response time, each rated against Google's thresholds.
- **Fixes ranked by time saved.** For example "Reduce unused JavaScript, about 5.0 s, 1,136 KB". Checks with no time estimate (missing meta description, contrast) follow.
- **One line per page** for client reports: "Mobile performance 42 (poor). Poor: LCP 18.3 s, TBT 1000 ms. Biggest fix: Reduce unused JavaScript (about 5.0 s)."
- **A site report** (`SITE_REPORT` in the run's key-value store): the median score and the 10 pages to fix first, worst first.
- **Score spread** on every page, so you can see how steady the result was.

### Price compared (checked 2 November 2026 on the Apify Store)

| Actor | Price per page | How it measures | Whole site from a sitemap | Failed pages |
|---|---|---|---|---|
| **This Actor** | **$0.02** (Free plan) | Own Lighthouse, median of 3 runs | **Yes** | **Free** |
| neverempty/pagespeed-lighthouse-audit | $0.03 plus $0.01 per run | Own Lighthouse, one run | No, a URL list | Free |
| nerolabs/bulk-pagespeed-checker | $0.005 | Google's PageSpeed API | No, a URL list or file | Not stated |
| josh99smith/pagespeed-insights-audit | $0.004 | Google's PageSpeed API | No, a URL list | Free |

We are not the cheapest per page. The Actors that cost less call Google's shared PageSpeed API, which has a daily quota shared by every user and can return "rate limited". This one runs Lighthouse itself, so there is no quota, no key, and the median of 3 runs. Prices change; check the Store pages for today's figures.

### How to use it

1. Open **Input**, paste a sitemap address or your pages, pick mobile or desktop, press **Start**.
2. Open **Output**: the table has the scores, metrics and fixes for every page. **Site report** lists the pages to fix first.
3. Or call it from code (below).

#### Input example

```json
{
  "sitemapUrl": "https://example.com/sitemap.xml",
  "maxPages": 25,
  "strategy": "mobile",
  "runs": 3,
  "maxFixes": 5
}
```

#### Output example (one row per page)

```json
{
  "url": "https://docs.apify.com/platform",
  "strategy": "mobile",
  "status": "success",
  "message": null,
  "finalUrl": "https://docs.apify.com/",
  "httpStatus": 200,
  "scores": { "performance": 42, "accessibility": 93, "bestPractices": 73, "seo": 85 },
  "ratings": { "performance": "poor", "accessibility": "good", "bestPractices": "needs improvement", "seo": "needs improvement" },
  "metrics": { "lcpMs": 18314, "fcpMs": 2322, "tbtMs": 1000, "cls": 0, "speedIndexMs": 9023, "ttfbMs": 177 },
  "topFixes": [
    { "id": "unused-javascript", "title": "Reduce unused JavaScript", "category": "performance", "savingsMs": 5030, "savingsKb": 1136 },
    { "id": "redirects", "title": "Avoid multiple page redirects", "category": "performance", "savingsMs": 873, "savingsKb": null }
  ],
  "summary": "Mobile performance 42 (poor). Poor: LCP 18.3 s, TBT 1000 ms. Biggest fix: Reduce unused JavaScript (about 5.0 s).",
  "runsDone": 1,
  "performanceRuns": [42],
  "scoreSpread": 0,
  "lighthouseVersion": "13.6.0",
  "charged": true,
  "auditedAt": "2026-11-20T04:03:47.449Z"
}
```

A site that shows a bot check comes back like this, and is not charged:

```json
{ "url": "https://example-protected.site", "status": "blocked",
  "message": "This site blocks automated visits (HTTP 403). We do not try to get around bot checks, so this page was not audited and you were not charged.",
  "charged": false }
```

#### From code

```bash
curl -X POST "https://api.apify.com/v2/acts/<username>~pagespeed-core-web-vitals-audit/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":[{"url":"https://example.com"}],"strategy":"mobile"}'
```

### For AI agents and MCP

This Actor works as a tool for an AI agent through the Apify MCP server. It is deterministic, makes no model calls, and returns structured rows an agent can read without opening a report.

- **Tool input:** `urls` (list of http/https pages) or `sitemapUrl`, `strategy` (`mobile` or `desktop`), `maxPages`, `runs`.
- **Tool output:** a list of rows. Check `status` first. Only `success` rows have scores. `summary` is a ready-made sentence; `topFixes` is ordered, biggest time saving first.
- **Failure behaviour an agent can rely on:** `blocked` and `refused` mean "do not retry, this will not work"; `timeout` and `error` can be retried; the run fails (non-success exit) when no page was audited.
- **Cost control:** a run charges per audited page only and respects the spending limit you set. `maxPages` caps a single call.

### What it will not do (on purpose)

- **It does not get around bot checks.** If a site shows a captcha or refuses the visit (403, 429), you get status `blocked`, no scores and no charge.
- **It refuses private addresses.** `localhost`, `10.x`, `192.168.x`, `169.254.x` (cloud metadata) and every other private or reserved range are refused, including names that resolve to them, addresses a redirect lands on, and sitemap files that redirect there.
- **It does not audit platform pages.** Social networks, video platforms, search-result pages and AI chat apps are refused at input.
- **It does not report field data.** Scores and Core Web Vitals here are lab measurements from a simulated device, the same kind Lighthouse and the lab part of pagespeed.web.dev give. Real-visitor data (the Chrome UX Report, including INP) needs Google's API and a key, which this Actor does not use.
- **No login pages, no stored cookies, no personal data collected.**

### Limits and speed

- Up to 200 pages per run (default 10, `maxPages`), 120 seconds per page load at most.
- Pages are tested one after another, not in parallel, because parallel runs distort each other's timings. In our local tests a page took about 7 seconds for one run and about 20 seconds for the median of 3.
- Memory: 2 GB is enough (measured peak about 1.4 GB).

### FAQ

**Why is my score a few points different from pagespeed.web.dev?** Lighthouse scores move with the machine that runs them. We run each page up to 3 times and report the median run, and `scoreSpread` shows how far apart the runs were. A difference of a few points is normal; a big one is worth a second look.

**Why `blocked`?** The site served a bot check or refused the visit. We never try to get past it.

**Why did a page I know exists come back `error`?** Lighthouse refuses pages that are not HTML (a PDF), that paint nothing (blank or login-only), or whose certificate is invalid. The row says which.

**Mobile or desktop?** Mobile is what Google looks at first, and is the default. Run the same sitemap again with `desktop` if you need both; each is a separate run.

**Is it legal to audit a website?** Loading a public page as a browser does is ordinary use. Only audit sites you may test, and keep your page limit reasonable.

Found a page that fails? Open an issue on the Actor with the address and we will look at it.

# Changelog

This Actor's version history is a separate document: https://apify.com/goldensky_api/pagespeed-core-web-vitals-audit/changelog.md

# Actor input Schema

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

Public http(s) pages. Addresses on private networks, social networks, video platforms, search-result pages and AI chat apps are refused. You can use this, a sitemap address, or both.

## `sitemapUrl` (type: `string`):

Audit pages from this sitemap.xml (or a sitemap index), in sitemap order, up to the page limit below. Only pages on the sitemap's own site are used.

## `maxPages` (type: `integer`):

Safety cap on pages audited. Pages over it are skipped and reported, and cost nothing.

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

Mobile is a mid-range phone on a slow 4G connection (what Google measures first). Desktop is a fast wired connection.

## `runs` (type: `integer`):

Each page is tested this many times and the median run is reported, which removes most of the score noise a single run has. 3 is recommended; 1 is faster.

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

Performance is always included.

## `maxFixes` (type: `integer`):

How many ranked fixes to list for each page (1 to 10).

## `timeoutSecs` (type: `integer`):

A page that takes longer to load is reported as a timeout and is not charged.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://example.com"
    }
  ],
  "maxPages": 10,
  "strategy": "mobile",
  "runs": 3,
  "categories": [
    "performance",
    "accessibility",
    "bestPractices",
    "seo"
  ],
  "maxFixes": 5,
  "timeoutSecs": 60
}
```

# Actor output Schema

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

No description

## `siteReport` (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": [
        {
            "url": "https://example.com"
        }
    ],
    "maxPages": 10,
    "runs": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("goldensky_api/pagespeed-core-web-vitals-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": [{ "url": "https://example.com" }],
    "maxPages": 10,
    "runs": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("goldensky_api/pagespeed-core-web-vitals-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": [
    {
      "url": "https://example.com"
    }
  ],
  "maxPages": 10,
  "runs": 3
}' |
apify call goldensky_api/pagespeed-core-web-vitals-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goldensky_api/pagespeed-core-web-vitals-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/tOTJc3Ff3NDMiBcX2/builds/PcoUyF8bIyXIbcmIE/openapi.json
