# PageSpeed Insights & Lighthouse Audit - Core Web Vitals (`pshivam/pagespeed-lighthouse-scraper`) Actor

Audit pages or whole sitemaps with real Lighthouse, no API key: performance, accessibility, SEO and best-practice scores, Core Web Vitals, fixes ranked by time saved, third parties, screenshots, change since last run. Pay per audit.

- **URL**: https://apify.com/pshivam/pagespeed-lighthouse-scraper.md
- **Developed by:** [Shivam Prajapati](https://apify.com/pshivam) (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 $7.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.
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 & Lighthouse Audit - Core Web Vitals

**Audit any page, a list of pages or a whole site with the real Lighthouse, no API key and no quota.** Get the four Lighthouse scores (**performance, accessibility, best practices, SEO**), the **Core Web Vitals** (LCP, TBT, CLS, FCP, Speed Index, TTFB), the **fixes ranked by time saved**, the costliest third parties, the technologies and libraries on the page, a screenshot and the full Lighthouse report. Run it on a schedule with **Compare with the last run** to see which pages got slower. Mobile, desktop or both. Pay only for audits that finish. No proxy, no login, no AI.

**Actively maintained.** Last update: 2026-11-08. Every release passes 100+ automated tests, including audits in a real Chrome against test pages, and Apify test-runs it every day.

### What can you use it for?

- **Check Core Web Vitals in bulk.** Hundreds of pages on mobile and desktop in one run, with the rating of every metric by Google's thresholds.
- **Audit a whole site.** Give a site address: its sitemap is found, and pages are picked evenly across it, from the first entry to the last.
- **Watch your sites.** Schedule a weekly run with **Compare with the last run**: every row says what the performance score was last time and how much it changed.
- **Prioritise fixes.** Each row lists the speed fixes by estimated milliseconds and bytes saved, the failed accessibility, SEO and best-practice checks, and the LCP element.
- **Compare competitors.** Audit your page and theirs side by side: weight, requests, third parties, technologies and scores.
- **SEO and agency reports.** Save the HTML report and a screenshot of every audit and send the links to the client.

### What data do you get?

One row per page and device. Pages that cannot be audited are not rows: they are in the `FAILED_URLS` record with the reason, and they are free.

| Field | What it is |
|---|---|
| `url`, `finalUrl`, `strategy` | The page you gave, where the audit ended after redirects, and `mobile` or `desktop` |
| `httpStatus`, `redirects` | Status code of the page and the number of redirects |
| `performanceScore`, `accessibilityScore`, `bestPracticesScore`, `seoScore` | The Lighthouse scores, 0 to 100 |
| `agenticBrowsingScore` | Readiness for AI agents (only when you add that category) |
| `labVerdict` | `good`, `needs-improvement` or `poor`: the worst of LCP, CLS and TBT |
| `lcpMs`, `fcpMs`, `tbtMs`, `cls`, `speedIndexMs`, `ttiMs`, `ttfbMs` | The lab metrics in milliseconds (layout shift without a unit) |
| `ratings` | Rating of each metric by Google's thresholds |
| `pageWeightBytes`, `requestCount`, `domElements` | Bytes transferred, number of requests and elements in the page |
| `mainThreadMs`, `scriptExecutionMs` | Main-thread work and JavaScript run time |
| `resources`, `thirdParties` | Requests and bytes by type, and the 5 costliest third parties |
| `lcpBreakdown`, `lcpElement` | Where the LCP time went, and which element it is |
| `opportunities` | Up to 10 speed fixes with estimated milliseconds and bytes saved |
| `accessibilityIssues`, `bestPracticeIssues`, `seoIssues` | The failed checks with how many elements failed |
| `technologies`, `jsLibraries` | Technologies Lighthouse recognised, and JavaScript libraries with versions |
| `fieldData` | Real-visitor data from the Chrome UX Report (needs your free Google API key) |
| `previous`, `performanceScoreChange` | The previous audit's scores and the change (needs **Compare with the last run**) |
| `screenshotUrl`, `reportHtmlUrl`, `reportJsonUrl` | Links to the screenshot and the full Lighthouse report, when you ask for them |
| `lighthouseVersion`, `benchmarkIndex`, `cpuSlowdown` | The Lighthouse version, the speed of the machine the audit ran on, and the CPU slowdown multiplier the audit used |
| `warnings`, `auditSeconds`, `auditedAt` | Notes about the audit, how long it took and when it was done (UTC) |

#### Example result

```json
{
  "url": "https://www.wikipedia.org/",
  "finalUrl": "https://www.wikipedia.org/",
  "strategy": "mobile",
  "httpStatus": 200,
  "redirects": 0,
  "performanceScore": 92,
  "accessibilityScore": 95,
  "bestPracticesScore": 100,
  "seoScore": 100,
  "labVerdict": "needs-improvement",
  "lcpMs": 1145,
  "fcpMs": 1145,
  "tbtMs": 344,
  "cls": 0,
  "speedIndexMs": 2661,
  "ttiMs": 1594,
  "ttfbMs": 88,
  "ratings": {"fcp": "good", "lcp": "good", "tbt": "needs-improvement", "cls": "good", "speedIndex": "good", "ttfb": "good"},
  "pageWeightBytes": 101578,
  "requestCount": 6,
  "domElements": 1179,
  "resources": {"total": {"requests": 6, "bytes": 101578}, "image": {"requests": 2, "bytes": 57791}, "script": {"requests": 2, "bytes": 11682}},
  "opportunities": [
    {"id": "image-delivery-insight", "title": "Improve image delivery", "savingsMs": null, "savingsBytes": 35962},
    {"id": "cache-insight", "title": "Use efficient cache lifetimes", "savingsMs": null, "savingsBytes": 27789}
  ],
  "accessibilityIssues": [{"id": "label", "title": "Form elements do not have associated labels", "count": 1}],
  "seoIssues": [],
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/xxxx/records/screenshot-72e64cabc2-mobile.jpg",
  "reportHtmlUrl": "https://api.apify.com/v2/key-value-stores/xxxx/records/report-72e64cabc2-mobile.html",
  "lighthouseVersion": "13.6.0",
  "benchmarkIndex": 2033,
  "auditSeconds": 9.5,
  "auditedAt": "2026-11-08T06:13:39Z"
}
```

### How to use it

1. Paste page addresses into **Pages to audit**, or give a **sitemap or site address**, or a **dataset id** of another Actor.
2. Pick the **Device** (mobile, desktop or both) and what to audit.
3. Set **Maximum audits** and press Start. Rows appear as the audits finish.

#### Input options

| Input | What it does |
|---|---|
| `urls` | Addresses of the pages: one by one, pasted (one per line) or from a text file. `example.com` works |
| `sitemapUrls`, `maxPagesPerSitemap` | A sitemap or a site address; how many pages to take from each, spread evenly over it |
| `datasetId`, `urlFields` | Audit every page address in the rows of another Actor's dataset; name the fields or let the Actor find them |
| `strategy` | `mobile`, `desktop` or `both` (two rows per page) |
| `categories` | `performance`, `accessibility`, `best-practices`, `seo` and `agentic-browsing`; fewer categories finish faster |
| `throttling` | `simulate` (the standard, comparable setting of PageSpeed Insights) or `none` |
| `calibrateCpu`, `cpuSlowdown` | On by default: the simulated CPU is matched to Lighthouse's reference computer, so scores do not depend on which Apify machine you got. `cpuSlowdown` sets your own multiplier instead |
| `saveScreenshot`, `saveHtmlReport`, `saveJsonReport` | Save a screenshot, the HTML report or the complete JSON result of each audit |
| `compareWithLastRun` | Remember each page's scores and show the change on the next run |
| `cruxApiKey` | Your free Google API key: adds `fieldData` from real Chrome visitors |
| `headers`, `blockUrls` | Headers for pages behind a login or on staging, and address patterns Chrome must not load (trackers, ads) |
| `auditTimeoutSeconds`, `maxRetries` | The time limit of one audit, and the retries after a time-out or a server error |
| `keyValueStoreName` | Save screenshots and reports into a named store that does not expire |
| `onlyNew` | Skip pages that earlier runs of this same input already returned |
| `maxItems`, `maxConcurrency` | Stop after this many audits; audits at the same time (empty: one per 4 GB of memory) |

### How much does it cost?

You pay per audit that finishes, nothing else. Failed pages, pages that answer with an error, and sitemaps without pages are free and do not count toward the maximum. The first Apify plan includes free monthly credit to try it.

| Plan | Price per 1,000 audits |
|---|---|
| Free | $10.00 |
| Bronze | $9.00 |
| Silver | $8.00 |
| Gold | $7.00 |

A page on **both** devices is two audits.

### Use it via API, on a schedule, or with your tools

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("pshivam/pagespeed-lighthouse-scraper").call(run_input={
    "sitemapUrls": ["https://example.com"],
    "maxPagesPerSitemap": 25,
    "strategy": "both",
    "compareWithLastRun": True,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["url"], row["strategy"], row["performanceScore"], row["performanceScoreChange"], row["labVerdict"])
```

Schedule it in the Apify Console (Schedules) with **Compare with the last run** on, and every run reports what changed. Connect the result to Google Sheets, Slack, Make, Zapier, n8n or your own app with Apify's integrations.

### Good to know

- **Same engine as PageSpeed Insights.** It runs Lighthouse 13 in Chrome with the same simulated slow-phone and fast-computer settings. PageSpeed Insights runs on Google's machines, this Actor on Apify's: scores can differ by a few points, and a page can differ between two loads.
- **The machine's speed is matched to a reference computer.** Apify's machines differ in speed (the same page scored 88 on one and 100 on another). Every audit records the speed of the machine while it loads the page (Lighthouse's own benchmark, `benchmarkIndex`) and then scores the page with the simulated CPU slowdown scaled to Lighthouse's reference computer (a benchmark of 1750, the middle of its high-end desktop class): a machine twice as fast simulates a phone twice as slow. It costs no extra time. This cuts the machine's influence, it does not remove Lighthouse's own variation: a page can still move several points between two loads (heavy pages stay within a few points, a page with a few slow scripts can move more), so judge a change by several runs. The multiplier used is in `cpuSlowdown` of every row. Turn `calibrateCpu` off for Lighthouse's plain default (4 for mobile, 1 for desktop), or set `cpuSlowdown` yourself.
- **One audit per CPU core.** Lighthouse measures timings, so audits at the same time share the CPU and lose precision. By default the Actor runs one audit per 4 GB of memory (4 GB is one core). To audit more pages per hour, give the run more memory (up to 16 GB).
- **Lab data.** The scores and metrics come from a test load. Add `cruxApiKey` to get `fieldData`, the 28-day numbers of real Chrome visitors.
- **Public pages only.** Addresses on private networks are refused. For a page behind a login, send its cookie or token in `headers`.
- **No proxy.** Pages that block data-centre addresses fail with the reason `http_error` or `blocked_by_browser`, and are free.
- **Failed pages and their reasons.** `FAILED_URLS` lists each page with one of: `dns_error`, `blocked_address`, `unreachable`, `http_error`, `insecure_certificate`, `blocked_by_browser`, `not_html`, `nothing_rendered`, `page_hung`, `audit_timeout`, `audit_failed`, `no_sitemap`, `dataset_error`.

### FAQ

#### Do I need a Google API key?

No. The audit runs Lighthouse itself, so there is no Google quota and no key. A key is only for the optional real-visitor data (`cruxApiKey`).

#### Why does my score differ from PageSpeed Insights?

Both use Lighthouse with the same simulated settings. The machines differ and a page loads a little differently each time, so scores move by a few points. Compare runs of this Actor with each other, and check `benchmarkIndex` and `cpuSlowdown` when a result looks odd.

#### How long does an audit take?

A light page takes 6 to 10 seconds per device, a normal page 10 to 15 seconds and a very heavy page up to 30 seconds. With the default 4 GB of memory the Actor runs one audit at a time; give the run 8 GB for two at a time, 16 GB for four.

#### Can I audit a whole website?

Yes. Put the site address in `sitemapUrls`: the Actor finds the sitemap through robots.txt and audits `maxPagesPerSitemap` pages spread evenly over it.

#### Can I see what changed since last week?

Yes. Turn on `compareWithLastRun` and schedule the Actor. Each row has `previous` and `performanceScoreChange`.

#### Does it work with pages behind a login?

Yes, with `headers` (an `Authorization` header or a `Cookie`). Addresses on private networks and localhost are refused.

#### Why does a page fail with HTTP 429?

The site limits how often one address may load it. Wikipedia, for example, answers 429 after a few audits in a row. The Actor retries once, then lists the page in `FAILED_URLS` as `http_error` with the status. It is free: run it again later or audit fewer pages of that site at a time.

#### What is not supported?

Pages that need a click or a form before they show content, and pages that block data-centre addresses. Both end as failed pages with a reason and are free.

# Actor input Schema

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

Addresses of the pages to audit. Add them one by one, paste a list (one per line) or load a text file. 'example.com' works: https:// is added.

## `sitemapUrls` (type: `array`):

A sitemap address (https://example.com/sitemap.xml) or just a site address (https://example.com): its sitemap is found through robots.txt. Pages are picked evenly across the sitemap, up to the limit below.

## `maxPagesPerSitemap` (type: `integer`):

How many pages to audit from each sitemap, spread evenly over it (not just the first ones).

## `datasetId` (type: `string`):

The id of an Apify dataset (from another Actor's run). Every page address in its rows is audited: fields such as url, website or link are found on their own.

## `urlFields` (type: `array`):

Only for a dataset: the fields that hold page addresses (website, links.0). Empty: find them on their own.

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

Mobile is a mid-range phone on a slow 4G connection, desktop a fast computer. Both gives two rows per page.

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

The Lighthouse categories to score. Fewer categories finish faster.

## `throttling` (type: `string`):

Simulated is the standard, comparable setting. None measures the real speed of the machine and network of the run.

## `calibrateCpu` (type: `boolean`):

Apify's machines differ in speed (twice as fast or slow, run to run), which moved the same page's score by ten points. On: the simulated CPU limit is scaled so every run behaves like Lighthouse's reference computer, so the machine you got moves scores less. Off: Lighthouse's plain default (4x slowdown for mobile, none for desktop).

## `cpuSlowdown` (type: `number`):

Set your own CPU slowdown multiplier for every device, instead of the automatic one. Empty: automatic (see 'Match the CPU of the reference computer'). 'cpuSlowdown' in each row says which multiplier was used.

## `saveScreenshot` (type: `boolean`):

Save the page as it looked when loaded (a JPEG) in the key-value store and link it in the row.

## `saveHtmlReport` (type: `boolean`):

Save the full Lighthouse report as an HTML file per audit, the same report Chrome DevTools shows. Download it and open it in a browser.

## `saveJsonReport` (type: `boolean`):

Save the complete Lighthouse result (every audit) as a JSON file per audit.

## `compareWithLastRun` (type: `boolean`):

Remember each page's scores and show what changed since its last audit ('previous', 'performanceScoreChange'). Schedule the Actor to watch your sites. Remembered in your key-value store 'pagespeed-lighthouse-scraper-history'.

## `cruxApiKey` (type: `string`):

A free Google API key with the Chrome UX Report API enabled. Adds 'fieldData': how the page performed for real Chrome visitors over the last 28 days (LCP, INP, CLS). Pages with too few visitors fall back to the whole site.

## `headers` (type: `object`):

Headers Chrome sends with every request, e.g. {"Authorization": "Bearer ..."} to audit a page behind a login or a staging site.

## `blockUrls` (type: `array`):

Address patterns Chrome must not load, such as *analytics* or *.ads.example.com/*: audit the page without its trackers and ads.

## `auditTimeoutSeconds` (type: `integer`):

An audit that runs longer is stopped, retried and, if it fails again, reported as failed (not charged).

## `maxRetries` (type: `integer`):

Retries after a time-out, a server error (5xx or 429) or a page that did not finish loading.

## `keyValueStoreName` (type: `string`):

Save screenshots and reports into this named key-value store instead of the run's own one. Named stores do not expire.

## `onlyNew` (type: `boolean`):

Skip pages that earlier runs of this same input already returned, so you never pay twice. The first run works as usual and remembers what it returned, in your key-value store 'pagespeed-lighthouse-scraper-only-new'.

## `maxItems` (type: `integer`):

Stop after this many audits in total (a page on 'Both' devices is two audits). You are charged per audit; failed pages are free.

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

Empty: one audit per 4 GB of the run's memory (4 GB = 1 CPU core). Lighthouse measures best when each audit has a core to itself, so more audits at the same time give less reliable timings. To audit faster, give the run more memory.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://example.com/"
    },
    {
      "url": "https://www.wikipedia.org/"
    }
  ],
  "maxPagesPerSitemap": 10,
  "strategy": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "throttling": "simulate",
  "calibrateCpu": true,
  "saveScreenshot": false,
  "saveHtmlReport": false,
  "saveJsonReport": false,
  "compareWithLastRun": false,
  "auditTimeoutSeconds": 120,
  "maxRetries": 1,
  "onlyNew": false,
  "maxItems": 4
}
```

# Actor output Schema

## `scores` (type: `string`):

One row per page and device with the four scores and the main Core Web Vitals.

## `vitals` (type: `string`):

LCP, FCP, TBT, CLS, Speed Index, TTI and TTFB with their ratings, and real-visitor data when you gave a key.

## `fixes` (type: `string`):

Speed fixes ranked by time saved, and the failed accessibility, best-practice and SEO checks.

## `weight` (type: `string`):

Bytes, requests and DOM size, split by type, and the costliest third parties.

## `changes` (type: `string`):

Each page's score now against its previous audit.

## `stored` (type: `string`):

The key-value store with the screenshots and Lighthouse reports you asked for.

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

One short summary per finished audit (AUDITS record).

## `failed` (type: `string`):

Pages that could not be audited, with the reason. Not charged.

## `summary` (type: `string`):

Counts, failure reasons, average audit time and machine speed (RUN_SUMMARY record).

## `runStats` (type: `string`):

Time, memory and counts for this run (RUN_STATS record).

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

// Run the Actor and wait for it to finish
const run = await client.actor("pshivam/pagespeed-lighthouse-scraper").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/" },
        { "url": "https://www.wikipedia.org/" },
    ],
    "maxItems": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("pshivam/pagespeed-lighthouse-scraper").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/"
    },
    {
      "url": "https://www.wikipedia.org/"
    }
  ],
  "maxItems": 4
}' |
apify call pshivam/pagespeed-lighthouse-scraper --silent --output-dataset

```

## MCP server setup

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

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/1VjwQ1xFINXvqeMNm/builds/gZxiASh2U2Bm5KYMV/openapi.json
