# Lighthouse Audit & Core Web Vitals Monitor: Whole Sites (`pikoulas/lighthouse-audit`) Actor

Google Lighthouse on any list of URLs or whole sites from their sitemaps, mobile or desktop: performance, accessibility, best practices and SEO scores, Core Web Vitals pass or fail, top fixes. Schedule it to catch score drops since the last run and pages under your target. Failed pages are free.

- **URL**: https://apify.com/pikoulas/lighthouse-audit.md
- **Developed by:** [Spyridon Pikoulas](https://apify.com/pikoulas) (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 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

## Lighthouse Audit & Core Web Vitals Monitor: Whole Sites

Give it a list of URLs or whole sites, and get Google Lighthouse's audit of each page, the same engine PageSpeed
Insights runs. Schedule it, and each run tells you which pages lost points since the last one:

- **Whole sites:** a domain is audited page by page from its sitemaps, the home page first, up to the number of
  pages you set.
- **Monitoring:** with a memory name, every audit has the page's scores from the last run, the change, and
  `regressed` when a score fell 5 points or more (you set how many). The run's status says how many pages regressed.
- **Core Web Vitals pass or fail** for every page, by Google's thresholds, and a **target score** that lists the
  categories under it, such as 90 for green.

Two ways to run it, your choice on each run:

| | Your own Google API key | No key |
| --- | --- | --- |
| Price per audit | **$0.003** ($3 per 1,000) | **$0.02** ($20 per 1,000) |
| Where Lighthouse runs | PageSpeed Insights, on Google's machines | Inside the Actor, in its own Chrome |
| Field data of real Chrome users | Yes, for the page and its whole site | No |
| Quota | Your key's: 25,000 audits a day, free | None |
| Agentic browsing score | No | Yes |

A Google API key is free: create one in the Google Cloud console and enable the PageSpeed Insights API for it.

Each audit gives:

- **Scores from 0 to 100** for performance, accessibility, best practices and SEO, and if you like agentic browsing,
  Lighthouse's check of how well AI agents can use the page.
- **Core Web Vitals and the other lab metrics:** Largest Contentful Paint, Total Blocking Time, Cumulative Layout
  Shift, First Contentful Paint, Speed Index and server response time.
- **What to fix:** the performance opportunities ranked by the time they'd save, and every failed accessibility,
  best-practices and SEO audit.
- **Lighthouse's full HTML report** for each audit, with a link to open or share it.
- **Mobile, desktop or both.**
- **With a key, field data:** the 75th percentile of real users' Largest Contentful Paint, Interaction to Next Paint,
  Cumulative Layout Shift, First Contentful Paint and Time to First Byte over 28 days, and Google's verdict on them.

On Apify's free plan an audit is $0.005 with your key and $0.03 without. A page that fails, refuses or doesn't load
costs nothing.

### What people use it for

- **Monitoring:** your sites' scores and Core Web Vitals on a schedule, to catch a release that slows them down.
- **SEO audits:** many pages or many sites at once, for clients, each site from its own sitemap.
- **Competitor benchmarks:** how fast and accessible their pages are next to yours.
- **Accessibility checks:** the failed audits of every page, as a list to work through.
- **AI readiness:** the agentic browsing score of your pages.

### How to audit pages with Lighthouse

1. Click **Try for free**; Apify's free plan covers a first run.
2. Enter the **URLs** or **Whole sites**, and your **Google API key** if you have one.
3. Pick the **Devices** and **Categories**.
4. Click **Start**, then open the results and reports from the **Output** tab, or download them as JSON, CSV or Excel.

An input with every option:

```json
{
  "urls": ["https://apify.com", "https://www.python.org"],
  "googleApiKey": "YOUR_GOOGLE_API_KEY",
  "devices": ["mobile", "desktop"],
  "categories": ["performance", "accessibility", "best-practices", "seo", "agentic-browsing"],
  "saveReport": true
}
```

A weekly monitor of two sites, 20 pages each:

```json
{
  "sites": ["shop.example.com", "www.example.org"],
  "maxPagesPerSite": 20,
  "devices": ["mobile"],
  "memory": "client-sites",
  "alertOnDrop": 5,
  "targetScore": 90
}
```

Schedule it in Apify's **Schedules**, and add a webhook or an integration (Slack, email) on the run to hear of it.
The memory is kept in your account's key-value store `lighthouse-audit-memory`, one record per **Memory name**; a
page not audited for 90 days is forgotten. A site without a sitemap gives its home page alone, and the log says so.

### Output

```json
{
  "url": "https://www.python.org",
  "source": "lighthouse",
  "finalUrl": "https://www.python.org/",
  "device": "mobile",
  "performance": 79,
  "accessibility": 75,
  "bestPractices": 100,
  "seo": 92,
  "firstContentfulPaintMs": 2201,
  "largestContentfulPaintMs": 3708,
  "totalBlockingTimeMs": 342,
  "cumulativeLayoutShift": 0,
  "speedIndexMs": 2201,
  "serverResponseTimeMs": 2,
  "opportunities": [
    {
      "id": "render-blocking-insight",
      "title": "Render-blocking requests",
      "displayValue": "Est savings of 1,260 ms",
      "savingsMs": 1250,
      "savingsBytes": null
    }
  ],
  "failedAudits": [
    {
      "category": "accessibility",
      "id": "aria-hidden-focus",
      "title": "`[aria-hidden=\"true\"]` elements contain focusable descendents"
    }
  ],
  "benchmarkIndex": 1148,
  "cpuSlowdown": 2,
  "lighthouseVersion": "13.6.0",
  "reportUrl": "https://api.apify.com/v2/key-value-stores/8pUU3JDFLoXrcPWnh/records/00001-www.python.org-mobile.html?signature=1RbIYvzH7dKjrIaCt1kdH",
  "auditedAt": "2026-11-09T11:45:41Z",
  "coreWebVitals": "fail",
  "belowTarget": ["performance", "accessibility"],
  "previousScores": {"performance": 84, "accessibility": 75, "bestPractices": 100, "seo": 92},
  "scoreChanges": {"performance": -5, "accessibility": 0, "bestPractices": 0, "seo": 0},
  "regressed": true,
  "error": null
}
```

`coreWebVitals` is `pass` when Largest Contentful Paint is 2.5 s or less, Cumulative Layout Shift 0.1 or less and
Total Blocking Time 200 ms or less, Lighthouse's stand-in for Interaction to Next Paint, which needs a real user.
`belowTarget` comes with a **Target score**; `previousScores`, `scoreChanges` and `regressed` with a **Memory name**,
`null` on a page's first audit in it.

`source` is `lighthouse` for the Actor's own run and `pagespeed-insights` with your key, where the item also has
`fieldData` for the page and `originFieldData` for the whole site, each `null` when Chrome has too few users of it:

```json
{
  "fieldData": {
    "overall": "AVERAGE",
    "largestContentfulPaintMs": 2600,
    "interactionToNextPaintMs": 180,
    "cumulativeLayoutShift": 0.05,
    "firstContentfulPaintMs": 1800,
    "timeToFirstByteMs": 700
  }
}
```

A score is `null` when Lighthouse couldn't score that category. `opportunities` holds the ten that would save the
most time. `reportUrl` opens the report as long as the run's storage is kept. A page that gives no audit comes with
`url`, `device` and `error`, saying why.

### Use it as an API

Apify's API starts a run and returns its dataset as JSON; its Python and JavaScript clients, and
its Make, Zapier and n8n integrations, work the same way.

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

AI agents can call it as a tool through Apify's MCP server: `https://mcp.apify.com?tools=pikoulas/lighthouse-audit`.

### How much does it cost?

An audit is one page on one device, with its report: $0.003 with your Google API key, $0.02 without. A page on
mobile and desktop is two audits. A thousand audits cost $3 with your key and $20 without. Google doesn't charge for
the PageSpeed Insights API. Set a spending limit on a run and it stops there, with what it has audited so far.

### Good to know

- **The scores are lab scores,** from a test load: mobile is a mid-range phone on a slow 4G connection, desktop a fast
  computer. Field data, with your key, is what real visitors got.
- **Scores move between runs** by a few points, as Lighthouse's do anywhere. Without a key, mobile emulates the phone
  with a 2x CPU slowdown, which Lighthouse's own guidance gives for servers as fast as Apify's (`benchmarkIndex` shows
  each run's), and keeps it fixed so that audits compare from run to run. They can differ from PageSpeed Insights',
  which runs on Google's machines.
- **Without a key, one audit at a time,** as Lighthouse asks, so audits don't skew each other. Most pages take 10 to 30
  seconds; a heavy one up to three minutes, after which it's given up, free. With a key, four go at a time.
- **A key Google refuses, or one out of quota, stops the run** with Google's message, since every audit after would
  fail the same way. The key is stored encrypted, as Apify does for secret inputs, and goes only to Google.
- **With a key, Google loads the page,** from its own machines, as PageSpeed Insights does for anyone.
- **Without a key, a site's refusal is respected.** The Actor's Chrome adds its name to the User-Agent, and it reads
  each site's `robots.txt`, one audit a second per site at most, or the site's crawl delay. A path `robots.txt`
  refuses isn't audited, and a site that answers 401, 403, 429 or 451 or shows a verification page is left alone for
  the rest of the run; the rest of your list goes on. It uses no proxy and doesn't try to get past any of this. Only
  public addresses are reached, by the page and everything it loads, not private networks.
- **Contact.** The Actor keeps nothing itself: results and reports sit in the storage of whoever ran it. Questions or
  requests go to spyridwn.pd@gmail.com.
- Lighthouse is Google's open-source project, under the Apache 2.0 licence. This Actor isn't Google's.

### FAQ

#### Is it legal to run Lighthouse on other websites?

It loads only the pages you point it at, and for a whole site the sitemaps it publishes and the pages they list, once per audit, as a visitor's browser would, without logging in; without a
key it keeps to each site's `robots.txt`, and with one Google's PageSpeed Insights loads them. It measures the page rather than copying it, though the HTML report holds
screenshots of it: you are responsible for how you use them, and a site's terms may limit automated visits. If
you're unsure, ask a lawyer; Apify's [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/) is a
good start.

#### Can it audit pages behind a login?

No. It sees each page as a visitor who isn't logged in, and it doesn't take cookies or passwords.

#### Something missing or not working?

Open an issue on the **Issues** tab with the input you used, or ask there for a field you need.

If it does what you need, a review on the **Reviews** tab helps others find it.

# Actor input Schema

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

The pages to audit.

## `sites` (type: `array`):

Domains or home pages, such as shop.example: their pages from the sitemaps robots.txt names (or /sitemap.xml), the home page first. Each page is an audit.

## `maxPagesPerSite` (type: `integer`):

The first this many pages of each site's sitemaps.

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

Your own key for Google's PageSpeed Insights API, free from the Google Cloud console. With it, PageSpeed Insights runs each audit on Google's machines and adds the field data of real Chrome users, at $0.003 an audit instead of $0.02. Agentic browsing isn't in PageSpeed Insights.

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

Mobile is a mid-range phone on a slow 4G connection, as PageSpeed Insights tests; desktop a fast one. Each device is an audit of its own.

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

What Lighthouse scores. Agentic browsing is Lighthouse's check of how well AI agents can use the page.

## `memory` (type: `string`):

Keeps each page's scores, in your account's key-value store lighthouse-audit-memory, for the next run with the same name to compare with: each audit then has previousScores, scoreChanges and regressed. One per schedule; a page not audited for 90 days is forgotten.

## `alertOnDrop` (type: `integer`):

A page has regressed when a score fell by at least this since the last run with the memory: Lighthouse's own scores move a few points from run to run.

## `targetScore` (type: `integer`):

Each audit lists in belowTarget the categories scoring under this, such as 90 for Google's green.

## `saveReport` (type: `boolean`):

Saves Lighthouse's own report for each audit, the one PageSpeed Insights shows, with a link to it.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://www.python.org"
  ],
  "maxPagesPerSite": 5,
  "devices": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "alertOnDrop": 5,
  "saveReport": true
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `files` (type: `string`):

No description

## `changes` (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://apify.com",
        "https://www.python.org"
    ],
    "maxPagesPerSite": 5
};

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

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

```

## MCP server setup

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