# Lighthouse & Core Web Vitals Audit (Bulk PageSpeed) (`dofunbiz/lighthouse-audit`) Actor

Run Google Lighthouse on many URLs, mobile and desktop: performance, accessibility, best practices and SEO scores, LCP/CLS/TBT with pass/fail, and a ranked fix list. No API key needed.

- **URL**: https://apify.com/dofunbiz/lighthouse-audit.md
- **Developed by:** [Scot C](https://apify.com/dofunbiz) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 page 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 & Core Web Vitals Audit (Bulk PageSpeed)

Run **Google Lighthouse** on a list of pages, on **mobile and desktop**, and get every score, every Core Web Vital and a **ranked fix list** in one table. It's the same open-source engine that powers PageSpeed Insights, but it runs on Apify, so there's **no Google API key, no quota and no rate limits**.

### What you get for each URL and device

| Field | Details |
|---|---|
| **Scores (0-100)** | Performance, Accessibility, Best practices, SEO |
| **Core Web Vitals (lab)** | LCP, CLS and TBT (the lab stand-in for INP), each rated *good / needs-improvement / poor*, plus an overall pass/fail |
| **Other metrics** | First Contentful Paint, Speed Index, server response time (TTFB), page weight, request count |
| **Speed opportunities** | Lighthouse's top fixes with estimated time and KB saved (unused JavaScript, image formats, render-blocking resources...) and the worst files |
| **Failed checks** | Accessibility, best-practice and SEO audits that failed, sorted by impact |
| **LCP element** | The HTML element that is your Largest Contentful Paint |
| **Resources by type** | Requests and KB for scripts, images, fonts, CSS and third parties |

You also get a **Markdown report** (score table + top fixes per page) that's ready to send to a client or a dev team, and optionally the **full Lighthouse HTML report** for each page.

### How to use it

1. Paste your URLs, one per line. Domains without `https://` are fine.
2. Choose mobile, desktop or both.
3. Run. Each audit takes about 15-30 seconds.

### Example output

Real run on python.org (mobile, October 2026), shortened:

```json
{
  "url": "https://www.python.org/",
  "device": "mobile",
  "performance": 53,
  "accessibility": 75,
  "best-practices": 100,
  "seo": 83,
  "lcpMs": 4409,
  "lcpRating": "poor",
  "cls": 0,
  "clsRating": "good",
  "tbtMs": 1436,
  "tbtRating": "poor",
  "coreWebVitalsLabPass": false,
  "ttfbMs": 8,
  "totalBytes": 474662,
  "requests": 23,
  "lcpElement": "<p>",
  "opportunities": [
    {
      "title": "Eliminate render-blocking resources",
      "savingsMs": 1648,
      "savingsKb": 0,
      "topItems": [
        "https://www.python.org/static/stylesheets/style.6cb9f297dd80.css",
        "https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css",
        "https://www.python.org/static/stylesheets/mq.ab4b4ea88926.css"
      ]
    },
    {
      "title": "Reduce unused CSS",
      "savingsMs": 760,
      "savingsKb": 129,
      "topItems": [
        "https://www.python.org/static/stylesheets/style.6cb9f297dd80.css",
        "https://www.python.org/static/stylesheets/mq.ab4b4ea88926.css"
      ]
    }
  ],
  "failedAudits": [
    {
      "category": "accessibility",
      "title": "Elements with an ARIA `[role]` that require children to contain a specific `[role]` are missing some or all of those required children.",
      "items": 3
    },
    {
      "category": "accessibility",
      "title": "`[role]`s are not contained by their required parent element",
      "items": 57
    }
  ]
}
```

The Markdown report starts with a table like this:

| Page | Device | Perf | A11y | Best pr. | SEO | LCP | CLS | TBT | CWV (lab) |
|---|---|---|---|---|---|---|---|---|---|
| https://www.python.org/ | mobile | 53 | 75 | 100 | 83 | 4.4s | 0 | 1436ms | FAIL |
| https://www.python.org/ | desktop | 69 | 79 | 100 | 83 | 1.6s | 0.124 | 429ms | FAIL |

### Who it's for

- **SEO agencies and freelancers**: audit every client landing page at once and export the fix list.
- **Developers**: track performance across releases, or compare staging with production.
- **Site owners**: find out why Google says your site is slow, and which fixes matter most.

### Pricing

Pay per audit: you're charged once per URL per device that returns a result. Failed audits (unreachable page, timeout) are free.

### Notes

- These are **lab** measurements: a simulated mid-range phone on slow 4G (mobile) or a fast desktop connection, like Lighthouse in Chrome DevTools. Real-user (field) data from the Chrome UX Report can differ.
- Scores vary by a few points between runs, just like in PageSpeed Insights. For important pages, run twice and compare.
- Only test sites you're allowed to test. Each audit loads the page once, like a normal visitor.

# Actor input Schema

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

Pages to test (homepage, key landing pages, product pages...). Each URL x device is one audit.

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

Mobile = Lighthouse's default throttled phone (what PageSpeed Insights shows first). Desktop = fast connection, large screen.

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

Lighthouse categories to score. The price is the same either way.

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

Also store the standard Lighthouse HTML report for each audit in the key-value store.

## `maxUrls` (type: `integer`):

Safety cap on the number of URLs processed.

## Actor input object example

```json
{
  "urls": [
    "https://books.toscrape.com/"
  ],
  "devices": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "saveHtmlReport": false,
  "maxUrls": 100
}
```

# Actor output Schema

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

Scores, LCP/CLS/TBT with ratings, opportunities and failed checks per URL and device.

## `report` (type: `string`):

Score table and top fixes for every page.

# 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://books.toscrape.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dofunbiz/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://books.toscrape.com/"] }

# Run the Actor and wait for it to finish
run = client.actor("dofunbiz/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://books.toscrape.com/"
  ]
}' |
apify call dofunbiz/lighthouse-audit --silent --output-dataset

```

## MCP server setup

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