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

Bulk Google Lighthouse audits for any list of URLs: performance, SEO, accessibility and best-practices scores, LCP, CLS, TBT, top fixes, budgets and score change since last run. Mobile or desktop. $20 per 1,000 audits.

- **URL**: https://apify.com/magnova/lighthouse-audit.md
- **Developed by:** [Magnova](https://apify.com/magnova) (community)
- **Categories:** SEO tools, Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 60.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $16.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.
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 & Core Web Vitals Audit: Bulk PageSpeed Scores

**Lighthouse Audit runs Google's open-source Lighthouse in a real Chrome browser against any list of URLs and returns performance, accessibility, best-practices and SEO scores plus Core Web Vitals (LCP, CLS, TBT) for every page.** No Google API key, no PageSpeed Insights quota, no login: paste URLs, press Start, and get one clean row per page, with the biggest fixes and the score change since your last run.

### What does Lighthouse Audit do?

- Audits up to thousands of pages in one run, mobile, desktop or both.
- Returns the four Lighthouse category scores (0 to 100): **performance, accessibility, best practices, SEO**.
- Returns lab Core Web Vitals and speed metrics: **LCP, FCP, CLS, TBT, Speed Index, TTFB**, page weight, request count and DOM size.
- Flags `coreWebVitalsPass` (LCP ≤ 2.5 s, CLS ≤ 0.1, TBT ≤ 200 ms).
- Lists the **top speed opportunities** with estimated savings in milliseconds and bytes, plus the failed accessibility, SEO and best-practice checks.
- Checks an optional **performance budget** (for example "performance at least 80, LCP under 2,500 ms") and outputs `budgetPass` and the exact violations.
- Remembers each URL's last score and outputs `previousPerformanceScore` and `performanceScoreChange`, so a scheduled run becomes a **site speed monitor**.

### Why use it instead of the PageSpeed Insights API?

Most PageSpeed tools on the Store forward your URLs to Google's PageSpeed Insights API. That API is rate limited, needs an API key at volume, and only reaches public pages Google can see. This Actor runs Lighthouse itself (the same engine behind PageSpeed Insights and Chrome DevTools, Apache-2.0 licensed), so:

- there is no API key to create and no daily quota to hit;
- you choose the categories, so performance-only runs are faster;
- every run on the same machine type gives comparable numbers, which is what matters for tracking trends and catching regressions;
- you get budgets, change tracking and top fixes in the same row, ready for a spreadsheet, a dashboard or an alert.

### Who is it for?

- **SEO agencies** auditing client sites or a prospect list in bulk.
- **Developers and QA** checking a release for performance regressions on a schedule.
- **E-commerce teams** watching product and category page speed.
- **AI agents** that need a quick, structured page-quality check for a URL.

### How to run a bulk Lighthouse audit

1. Paste your page URLs into **Page URLs** (one per line; `example.com` works too).
2. Pick **Device**: mobile (Google's mobile-first default), desktop, or both.
3. Optionally narrow **Lighthouse categories** or add a **Performance budget**.
4. Click **Start**. Download results as JSON, CSV, Excel, or read them through the API.

To monitor a site, save the input as a Task and add a daily or weekly schedule. Each run fills `performanceScoreChange` so you can filter for pages that got slower.

### Input example

```json
{
  "urls": ["https://example.com", "https://www.wikipedia.org"],
  "device": "mobile",
  "categories": ["performance", "seo"],
  "performanceBudget": { "minPerformanceScore": 80, "maxLcpMs": 2500 },
  "compareWithPrevious": true
}
```

### Output example

```json
{
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "device": "mobile",
  "performanceScore": 100,
  "accessibilityScore": 100,
  "bestPracticesScore": 100,
  "seoScore": 80,
  "lcpMs": 913,
  "fcpMs": 913,
  "cls": 0,
  "tbtMs": 0,
  "speedIndexMs": 913,
  "ttfbMs": 16,
  "totalByteWeight": 2147,
  "requestCount": 2,
  "coreWebVitalsPass": true,
  "budgetPass": true,
  "budgetViolations": [],
  "topOpportunities": [{ "id": "render-blocking-resources", "title": "Eliminate render-blocking resources", "savingsMs": 151, "savingsBytes": 0 }],
  "failedAudits": [{ "category": "seo", "id": "meta-description", "title": "Document does not have a meta description" }],
  "previousPerformanceScore": 100,
  "performanceScoreChange": 0,
  "lighthouseVersion": "12.x",
  "error": null
}
```

Pages that cannot be loaded (bad URL, DNS failure, server error) return a row with `error` filled in and are **not charged**.

### Use with AI agents / MCP

The Actor has one required field and works zero-shot from the Apify MCP server, the Apify API or any agent framework. Minimal input:

```json
{ "urls": ["https://example.com"] }
```

The agent receives one row per page with numeric scores and a short list of fixes, small enough to reason over directly. Typical prompts: "Audit these 20 landing pages and list the ones with LCP over 2.5 seconds", or "Has our homepage performance score dropped since last week?"

### How much does it cost to run a Lighthouse audit?

Pay per event: **$0.02 per successful audit** ($20 per 1,000), with automatic volume discounts on higher Apify plans. One URL on "both" devices counts as two audits. Failed pages are free. There is no start fee and no extra platform charge on top of the per-audit price.

### Lighthouse API

You can call this Actor as a Lighthouse API: send a POST to the Apify run-sync endpoint with the input above and receive the dataset items in the response. Schedules, webhooks, Zapier, Make and n8n integrations work out of the box.

### FAQ

#### How do I check Core Web Vitals for many pages at once?

Paste all the URLs and run. Each row has `lcpMs`, `cls`, `tbtMs` and `coreWebVitalsPass`. Sort or filter the dataset view "Scores and Core Web Vitals".

#### Are the scores the same as PageSpeed Insights?

They come from the same Lighthouse engine, but every machine and network is different, so lab scores vary a few points between tools and even between runs. Use one tool consistently for trends. Field data (real-user CrUX data) is not included; these are lab measurements.

#### Can I audit pages behind a login or on localhost?

No. The Actor audits public pages only and rejects local or private network addresses.

#### Is it legal?

Yes. The Actor loads the public pages you choose, the same way a visitor's browser does, and runs the open-source Lighthouse tool on them. It does not scrape Google, does not use any private API and does not collect personal data. Only audit sites you are allowed to test, and keep request volume reasonable for small sites.

#### How long does an audit take?

Usually 7 to 45 seconds per page, depending on how heavy the page is. Choosing fewer categories makes runs faster.

#### What about the TBT instead of INP?

Interaction to Next Paint needs real user interaction, so lab tools report Total Blocking Time as its closest proxy, exactly like PageSpeed Insights' lab section.

### Legal and data

- Engine: Google Lighthouse (open source, Apache License 2.0) in headless Chrome.
- Data: only the public pages you list; no login, no CAPTCHA bypass, no personal-data collection.
- Change tracking stores only each URL's last performance score and timestamp in a key-value store in your own Apify account. To keep history across runs, pick a store in the optional "History key-value store" field; without it the Actor still audits every page and simply leaves the comparison fields empty if it cannot create its own store.

### Alternatives and related tools

Compared with PageSpeed Insights API wrappers, this Actor needs no Google key and adds budgets and change tracking. Need job data instead? See Magnova's Career Site Jobs and Workday Jobs Actors. Questions or feature requests: open an issue on the Issues tab, and we will respond as quickly as we can.

# Actor input Schema

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

Public web pages to audit, one per line. Example: https://www.apify.com. A bare domain like example.com is treated as https://example.com.

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

Emulated device. 'mobile' matches Google's mobile-first scoring, 'desktop' uses desktop screen and network, 'both' audits each URL twice (two charged audits).

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

Which Lighthouse categories to score. Leave empty for all four: performance, accessibility, best-practices, seo.

## `performanceBudget` (type: `object`):

Optional thresholds. Each result gets budgetPass true/false and a list of violations. Keys: minPerformanceScore, maxLcpMs, maxCls, maxTbtMs, minSeoScore, minAccessibilityScore. Example: {"minPerformanceScore": 80, "maxLcpMs": 2500}

## `compareWithPrevious` (type: `boolean`):

Remember each URL's last performance score in your account and output previousPerformanceScore and performanceScoreChange. Ideal for scheduled monitoring.

## `historyStore` (type: `string`):

Optional. Pick (or create) a key-value store in your account where the Actor keeps each URL's last score, so 'Compare with previous run' works across runs. If empty, the Actor tries its own 'lighthouse-audit-history' store and skips comparison if that is not allowed. Example: a store named lighthouse-history.

## `maxOpportunities` (type: `integer`):

How many of the biggest speed opportunities (with estimated savings) to include per page.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://www.wikipedia.org"
  ],
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "compareWithPrevious": true,
  "maxOpportunities": 5
}
```

# Actor output Schema

## `results` (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://example.com",
        "https://www.wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("magnova/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://example.com",
        "https://www.wikipedia.org",
    ] }

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

```

## MCP server setup

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