# PageSpeed & Lighthouse Bulk Audit + AI Readiness (`vemka/lighthouse-auditor`) Actor

Audit hundreds of URLs on mobile and desktop with Lighthouse 13: performance, accessibility, SEO and best-practice scores, Core Web Vitals, real-user CrUX data, top fixes and AI-agent readiness. No API key needed, or add your free Google key for results identical to PageSpeed Insights.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## PageSpeed & Lighthouse Bulk Audit + AI Readiness

Audit **hundreds of pages at once** with **Lighthouse 13** – the engine behind Chrome DevTools and PageSpeed Insights – and get a clean, spreadsheet-ready row for every page and device:

- **Scores** for Performance, Accessibility, Best Practices and SEO (0–100), plus **AI readiness** – Lighthouse 13's new *Agentic Browsing* score: how well AI agents can read and use the page
- **Lab metrics**: FCP, LCP, TBT, CLS, Speed Index, server response time
- **Core Web Vitals verdict** (good / needs improvement / poor)
- **Top fixes** with estimated time and size savings (e.g. *Reduce unused JavaScript – 1.7 s, 1.3 MB*)
- **Diagnostics**: page weight, number of requests, DOM size, main-thread and JavaScript time
- **Failed accessibility, SEO and best-practice checks** in plain language
- **Real-user Core Web Vitals (CrUX)**: LCP, INP, CLS at the 75th percentile
- Optional **full HTML report** per audit – the same report you know from Chrome DevTools, ready to share with developers
- A short **problem list** per page for quick filtering

### Two engines – pick what suits you

| | **PageSpeed Insights engine** (recommended) | **Local Lighthouse engine** |
|---|---|---|
| What you need | Your own free Google API key | Nothing |
| Where the audit runs | Google's PageSpeed Insights servers | A real Chrome inside the Actor |
| Numbers match pagespeed.web.dev | **Yes – same servers and settings** | Close, but see *Good to know* |
| Real-user data (CrUX) | Included | Included when you add a key |

**Auto mode** (default) uses PageSpeed Insights when you enter a key and the local engine otherwise.

#### How to get a free Google API key (about 5 minutes)

1. Open [Google Cloud Console](https://console.cloud.google.com/) and create a project (no billing or credit card needed).
2. *APIs & Services → Library*: enable **PageSpeed Insights API** and **Chrome UX Report API**.
3. *APIs & Services → Credentials → Create credentials → API key*. Under *API restrictions* select just those two APIs.
4. Paste the key into the **Google API key** field. It is stored encrypted and used only for your own runs.

Google's free quota is 25,000 PageSpeed Insights audits per day per project.

#### AI readiness (Agentic Browsing)

Lighthouse 13 adds a category that checks whether AI agents and AI browsers can work with a page: a well-formed accessibility tree, a valid `llms.txt`, WebMCP tools and forms, and a stable layout. You get the score and the failed checks for every page – useful as more traffic and purchases come through AI assistants. Remove *Agentic browsing* from the categories if you don't need it.

### Typical uses

- **SEO and web agencies:** audit all client sites, or every template of a large site, in one run.
- **Before/after releases:** compare scores and Core Web Vitals across deployments.
- **Monitoring:** schedule a weekly run and track trends in Google Sheets, Looker Studio or any dashboard.
- **AI readiness:** see which pages AI agents struggle with (accessibility tree, llms.txt, WebMCP).

### Input example

```json
{
  "urls": ["https://apify.com", "example.com/pricing"],
  "strategies": ["mobile", "desktop"],
  "categories": ["performance", "accessibility", "best-practices", "seo", "agentic-browsing"],
  "googleApiKey": "AIza...your key...",
  "saveReports": true
}
```

### Output example (shortened, real result)

```json
{
  "url": "https://apify.com/",
  "strategy": "mobile",
  "engine": "psi",
  "scores": { "performance": 38, "accessibility": 100, "bestPractices": 73, "seo": 85, "agenticBrowsing": 98 },
  "metrics": { "fcpMs": 2701, "lcpMs": 14026, "tbtMs": 1718, "cls": 0.002, "speedIndexMs": 6714 },
  "labCoreWebVitals": { "lcp": "poor", "cls": "good", "tbt": "poor", "pass": false },
  "opportunities": [
    { "id": "unused-javascript", "title": "Reduce unused JavaScript", "savingsMs": 1800, "savingsKb": 1309, "affects": ["LCP"] },
    { "id": "bootup-time", "title": "Reduce JavaScript execution time", "savingsMs": 1650, "savingsKb": null, "affects": ["TBT"] }
  ],
  "diagnostics": { "mainThreadMs": 5803, "jsExecutionMs": 3384, "totalByteWeightKb": 5388, "requests": 243, "domElements": 1639 },
  "failedAudits": {
    "accessibility": [],
    "bestPractices": ["Uses third-party cookies", "Browser errors were logged to the console"],
    "seo": ["Links do not have descriptive text", "robots.txt is not valid"]
  },
  "field": {
    "level": "url", "collectionPeriod": "2026-09-28..2026-10-25",
    "lcp": { "p75": 2427, "rating": "good" }, "inp": { "p75": 395, "rating": "needs-improvement" },
    "cls": { "p75": 0.02, "rating": "good" }, "coreWebVitalsPass": false
  },
  "problems": ["low_performance_score", "low_bestPractices_score", "low_seo_score", "poor_lab_lcp", "poor_lab_tbt", "fails_core_web_vitals_field"],
  "reportUrl": "https://api.apify.com/v2/key-value-stores/…/records/report-0001-mobile"
}
```

### Good to know

- **Lab scores vary** between runs on any tool, PageSpeed Insights included (±5–10 points on script-heavy pages is normal). Compare trends with the same settings.
- **Local engine:** Lighthouse 13 with the standard mobile (mid-range phone, slow 4G, simulated throttling) and desktop presets. Accessibility, SEO and best-practice results match PageSpeed Insights. On script-heavy pages, *Total Blocking Time* usually reads **higher** than in PageSpeed Insights because cloud CPUs are shared – use the PageSpeed Insights engine when you need numbers that match Google's tool.
- Each local audit starts a fresh browser profile (no cache or cookies carried over), just like PageSpeed Insights.
- One audit takes roughly 10–40 seconds (PageSpeed Insights sometimes up to 1–3 minutes; 6 audits run in parallel).
- Memory is set automatically: 1 GB for the PageSpeed Insights engine, 8 GB for the local engine (Lighthouse needs CPU, and on Apify more memory also means more CPU). The local engine needs at least 4 GB.
- Real-user data exists only for pages and sites with enough Chrome traffic; otherwise the Actor falls back to the whole origin or says no data is available.
- Some websites block automated visits (HTTP 403). Such audits are reported as failed and are not charged.

### Pricing

**Free during the launch period** – you only pay Apify platform usage. A pay-per-audit price is planned for 2027; any change is announced in Apify Console in advance. Failed audits and invalid inputs are never charged.

### FAQ

**Why is my score different from PageSpeed Insights?** With the PageSpeed Insights engine you get Google's own result. With the local engine, hardware and network location differ, which mostly affects Total Blocking Time on heavy pages.

**Is my API key safe?** The field is a secret input: Apify stores it encrypted and the Actor uses it only to call Google's PageSpeed Insights and CrUX APIs for your run. It never appears in the output.

**Is this legal?** The Actor loads the pages you provide, exactly like a visitor would, or asks Google's official API to do so with your key. It does not log in or bypass any protection.

### Support

Built and maintained by VEmKa (Czech Republic, EU). Questions or ideas? Open an issue on the Issues tab – support in English and Czech.

***

*PageSpeed Insights, Lighthouse and Chrome are trademarks of Google LLC. This Actor is independent and not affiliated with or endorsed by Google.*

# Actor input Schema

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

Pages to audit, one per line. Bare domains are audited over https. Duplicates are removed and invalid entries are skipped for free.

## `strategies` (type: `array`):

Run the audit as mobile (emulated phone on slow 4G, like PageSpeed Insights) and/or desktop. Each device counts as one audit.

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

Which Lighthouse categories to run. 'AI readiness' (Lighthouse 13's Agentic browsing category) checks how well AI agents can use the page: accessibility tree, llms.txt and WebMCP. Fewer categories make audits a little faster.

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

Your own free key from Google Cloud Console with the PageSpeed Insights API and Chrome UX Report API enabled (takes about 5 minutes – see README). With a key, audits run on Google's PageSpeed Insights servers, so the numbers match pagespeed.web.dev, and real-user Core Web Vitals (CrUX) are added. The key is used only for your runs and is stored encrypted.

## `engine` (type: `string`):

Auto: PageSpeed Insights when you provide a Google API key, otherwise Lighthouse runs inside the Actor. Local Lighthouse needs no key; on script-heavy pages its Total Blocking Time tends to read higher than PageSpeed Insights.

## `saveReports` (type: `boolean`):

Also save the complete Lighthouse HTML report for every audit (the same report you see in Chrome DevTools) and add its link as reportUrl. Handy for sharing with developers.

## `minScore` (type: `integer`):

Category scores below this value are listed as problems.

## `topOpportunities` (type: `integer`):

How many improvement opportunities (with estimated savings) to include per page.

## `concurrency` (type: `integer`):

Local engine only. Lighthouse is CPU-heavy: parallel audits make results noisier. Use 1 for the most stable scores (recommended). The PageSpeed Insights engine always runs 6 audits in parallel.

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

Safety limit for one run.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://web.dev"
  ],
  "strategies": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo",
    "agentic-browsing"
  ],
  "engine": "auto",
  "saveReports": false,
  "minScore": 90,
  "topOpportunities": 5,
  "concurrency": 1,
  "maxUrls": 500
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (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://web.dev"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vemka/lighthouse-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://web.dev",
    ] }

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

```

## MCP server setup

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