# Bulk Lighthouse Audit (`johto.data/lighthouse-audit`) Actor

Lighthouse scores and Core Web Vitals for many URLs on mobile and desktop, with the top fixes for each page.

- **URL**: https://apify.com/johto.data/lighthouse-audit.md
- **Developed by:** [Johto Data](https://apify.com/johto.data) (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 $14.00 / 1,000 url auditeds

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

## Bulk Lighthouse Audit

Test hundreds of pages with Google Lighthouse in one run. Each URL gets one row with **mobile and desktop** scores for performance, accessibility, best practices and SEO, the Core Web Vitals lab metrics, and the biggest fixes ranked by time saved.

**Price: $0.02 per URL, all-in.** Mobile and desktop are both included. No start fee, no per-device fee, no extra URL fee. If an audit fails, times out, the page returns an error or robots.txt blocks it, the row is free.

### What you get per URL

| Field | Meaning |
|---|---|
| `mobilePerformance`, `desktopPerformance` | Lighthouse performance score, 0 to 100 |
| `mobile.scores` / `desktop.scores` | performance, accessibility, bestPractices, seo |
| `mobile.metrics` / `desktop.metrics` | `lcpMs` (Largest Contentful Paint), `cls` (Cumulative Layout Shift), `tbtMs` (Total Blocking Time), `fcpMs`, `speedIndexMs`, `ttiMs`, `ttfbMs` |
| `mobile.opportunities` | Top fixes with estimated savings in ms and bytes, for example "Reduce unused JavaScript" |
| `mobile.failedAudits` | Pass/fail checks that failed, for example missing alt text or tap targets |
| `reportUrls` | Links to the full Lighthouse HTML reports, when enabled |
| `error`, `charged` | Why an audit failed, and whether you paid |

### Output example

```json
{
  "finalUrl": "https://example.com/",
  "mobilePerformance": 100,
  "desktopPerformance": 100,
  "mobile": {
    "scores": { "performance": 100, "accessibility": 96, "bestPractices": 100, "seo": 80 },
    "metrics": { "fcpMs": 764, "lcpMs": 881, "tbtMs": 67, "cls": 0, "speedIndexMs": 764, "ttiMs": 881, "ttfbMs": 14 },
    "opportunities": [],
    "lighthouseVersion": "13.6.0"
  },
  "charged": true
}
```

### How it works

Lighthouse 13 runs in headless Chrome inside the actor, with the standard mobile (throttled, Moto G Power emulation) and desktop presets. No PageSpeed Insights API key is needed and nothing is sent to a third-party API. Scores are lab data, so they vary a little between runs, like any Lighthouse test.

### Pricing

| URLs | Cost |
|---|---|
| 100 | $2 |
| 1,000 | $20 |

Run it on a schedule to track your Core Web Vitals over time.

### Rules this tool follows

- You confirm you own the pages or have permission to test them.
- robots.txt is respected, and it never logs in or bypasses bot checks.
- Sites whose terms forbid automated access (for example Amazon, LinkedIn, Indeed, Facebook, Instagram, Google, TikTok, YouTube and X) are refused, as are private network addresses.

### FAQ

**Why do my scores differ from PageSpeed Insights?** PageSpeed Insights mixes in real-user field data and runs on Google's hardware. This actor reports Lighthouse lab results from Apify servers, which are consistent between your own runs.

**How long does one URL take?** Usually 20 to 60 seconds for both devices.

Lighthouse is open source under the Apache 2.0 license.

### Related Actors

- [SEO Audit Crawler](https://apify.com/johto.data/seo-audit-crawler)
- [Tech Stack Detector](https://apify.com/johto.data/tech-stack-detector)
- [Website to Markdown](https://apify.com/johto.data/url-to-markdown)

# Actor input Schema

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

Pages to test, one per line. Bare domains work. Up to 2,000 per run.

## `confirmPermission` (type: `boolean`):

Required. Lighthouse loads each page in a real browser once per device. robots.txt is respected. Must be sent as true in API calls.

## `device` (type: `string`):

Both devices cost the same $0.02 per URL.

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

Store the full Lighthouse HTML report per URL and device in the key-value store, with a link in each row.

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

Audits slower than this stop and are free.

## Actor input object example

```json
{
  "urls": [
    "https://johtodata.com/",
    "example.com"
  ],
  "confirmPermission": true,
  "device": "both",
  "saveHtmlReport": false,
  "timeoutSecs": 90
}
```

# Actor output Schema

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

No description

## `reports` (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://johtodata.com/",
        "example.com"
    ],
    "confirmPermission": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("johto.data/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://johtodata.com/",
        "example.com",
    ],
    "confirmPermission": True,
}

# Run the Actor and wait for it to finish
run = client.actor("johto.data/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://johtodata.com/",
    "example.com"
  ],
  "confirmPermission": true
}' |
apify call johto.data/lighthouse-audit --silent --output-dataset

```

## MCP server setup

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