# Lighthouse & PageSpeed Bulk Auditor: Core Web Vitals (`scrapemint/lighthouse-pagespeed-auditor`) Actor

Run Google Lighthouse on many URLs at once, mobile and desktop: performance, accessibility, best practices and SEO scores, Core Web Vitals (LCP, CLS, TBT, FCP), page weight and the top fixes. No PageSpeed API key or quota.

- **URL**: https://apify.com/scrapemint/lighthouse-pagespeed-auditor.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (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

$20.00 / 1,000 lighthouse audits

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

## Lighthouse & PageSpeed Bulk Auditor: Core Web Vitals

**Run Google Lighthouse on a whole list of URLs and get one clean row per page.** The same lab test that powers PageSpeed Insights, without an API key, without the PageSpeed quota, and without pasting URLs one at a time:

- **Scores (0-100):** performance, accessibility, best practices, SEO
- **Core Web Vitals (lab):** Largest Contentful Paint, Cumulative Layout Shift, Total Blocking Time, plus First Contentful Paint, Speed Index, Time to Interactive and server response time
- **Page weight:** total bytes, number of requests, DOM size, third-party domains
- **What to fix:** the top performance opportunities ranked by estimated time saved, and every failed accessibility, SEO and best-practices check
- **Mobile and desktop** in one run, with the full Lighthouse HTML report saved if you want it

Schedule it weekly to **track site speed over time**, audit **every page of a site** before a launch, or compare your pages with competitors'.

### What you get

`url`, `finalUrl`, `device`, `performanceScore`, `accessibilityScore`, `bestPracticesScore`, `seoScore`, `largestContentfulPaintMs`, `cumulativeLayoutShift`, `totalBlockingTimeMs`, `firstContentfulPaintMs`, `speedIndexMs`, `timeToInteractiveMs`, `serverResponseTimeMs`, `coreWebVitalsLabPass`, `pageWeightBytes`, `requestCount`, `domElements`, `thirdPartyDomains`, `opportunities`, `failedAccessibilityAudits`, `failedSeoAudits`, `failedBestPracticesAudits`, `warnings`, `benchmarkIndex`, `cpuSlowdown`, `lighthouseVersion`, `fetchedAt`, `reportUrl`

### Example input

```json
{
  "urls": ["https://www.example.com", "https://www.example.com/pricing", "competitor.com"],
  "devices": ["mobile", "desktop"],
  "saveHtmlReport": true
}
```

### Example output

```json
{
  "url": "https://www.heise.de/",
  "device": "desktop",
  "performanceScore": 56,
  "accessibilityScore": 79,
  "bestPracticesScore": 96,
  "seoScore": 92,
  "largestContentfulPaintMs": 1784,
  "cumulativeLayoutShift": 0.01,
  "totalBlockingTimeMs": 1514,
  "firstContentfulPaintMs": 522,
  "speedIndexMs": 2746,
  "serverResponseTimeMs": 96,
  "coreWebVitalsLabPass": false,
  "pageWeightBytes": 777911,
  "requestCount": 69,
  "domElements": 4678,
  "opportunities": [
    { "id": "mainthread-work-breakdown", "title": "Minimize main-thread work", "displayValue": "3.7 s", "savingsMs": 1500 },
    { "id": "bootup-time", "title": "Reduce JavaScript execution time", "displayValue": "1.9 s", "savingsMs": 1000 }
  ],
  "failedSeoAudits": [
    { "id": "image-alt", "title": "Image elements do not have `[alt]` attributes", "items": 40 }
  ],
  "lighthouseVersion": "13.5.0",
  "reportUrl": "https://api.apify.com/v2/key-value-stores/.../records/report-ad70a43a7f3c"
}
```

### How it measures

- **Mobile** uses Lighthouse's default phone profile with simulated slow 4G and 4x CPU slowdown; **desktop** uses its desktop profile. These are the settings PageSpeed Insights uses for its lab section.
- Results are **lab data** from one run in a cloud container. Like any Lighthouse run, scores move a few points between runs; `benchmarkIndex` shows how fast the test machine was. Real-user field data (CrUX) is not included.
- `coreWebVitalsLabPass` is true when LCP is 2.5 s or less, CLS is 0.1 or less and TBT (the lab stand-in for INP) is 200 ms or less.
- Pages that fail to load (DNS errors, blocks, timeouts) come back with an `error` and are not charged.

### Uses

- **SEO and web agencies:** audit a client's key pages in bulk and hand over a spreadsheet of fixes
- **Developers:** check performance budgets before and after a release
- **Monitoring:** weekly scheduled runs to catch regressions
- **Prospecting:** find slow local-business sites that need help; pair with [Website Tech Stack Detector](https://apify.com/scrapemint/website-tech-stack-detector) and [SEO Site Audit Scraper](https://apify.com/scrapemint/seo-site-audit-scraper)

### Pricing

- **$0.02** per completed audit (one URL on one device)
- No start fee. URLs that fail to load are free.

# Actor input Schema

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

Pages to audit, one per line. Domains without https:// work too.

## `devices` (type: `array`):

Mobile uses Lighthouse's phone profile with simulated slow 4G, desktop its desktop profile: the same lab settings as PageSpeed Insights. Each URL is audited once per device.

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

Fewer categories run a little faster.

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

Stores the standard Lighthouse HTML report for each audit and adds its link as reportUrl.

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

1 gives the most stable timings. 2-3 finish big lists faster; give the run 4 GB+ of memory.

## `maxResults` (type: `integer`):

Stop after this many audits (URLs x devices).

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://www.wikipedia.org"
  ],
  "devices": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "saveHtmlReport": false,
  "maxConcurrency": 1,
  "maxResults": 500
}
```

# Actor output Schema

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

Scores, Core Web Vitals lab metrics, page weight, top fixes and failed audits.

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

Audits completed and failed.

# 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("scrapemint/lighthouse-pagespeed-auditor").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("scrapemint/lighthouse-pagespeed-auditor").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 scrapemint/lighthouse-pagespeed-auditor --silent --output-dataset

```

## MCP server setup

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

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/Ec0GfSUCCvSc85JyN/builds/qiiTejxL2OL29Zdxg/openapi.json
