# Lighthouse Audit: bulk speed, SEO and accessibility scores (`examsens.ai/lighthouse-audit`) Actor

Runs Lighthouse on many URLs in headless Chrome, no Google key needed: performance, accessibility, best practices and SEO scores, lab metrics such as LCP and CLS, and failing audits. Optional PageSpeed Insights API mode with your own key.

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

## Pricing

from $20.00 / 1,000 page auditeds

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 Audit: bulk speed, SEO and accessibility scores

Give it a list of URLs and it runs Lighthouse on each one in headless Chrome inside the actor. You get the performance, accessibility, best practices and SEO scores, lab metrics such as Largest Contentful Paint and Cumulative Layout Shift, and the failing audits for every page. No Google account or API key is needed.

For each URL and device you get:

- Scores from 0 to 100 for the categories you choose
- Lab metrics in milliseconds: Largest Contentful Paint, Total Blocking Time, First Contentful Paint, Speed Index, Time to Interactive and server response time, plus Cumulative Layout Shift
- The failing audits (score under 90), highest weight first, with the audit title, score and the value Lighthouse shows, such as `Est savings of 305 KiB`
- The Lighthouse version and the time of the audit
- Optional: the full Lighthouse JSON result and the Lighthouse HTML report, saved in the key value store and linked from the item

The actor runs Lighthouse 13 itself, one audit at a time, each in a fresh Chrome. Throttling Simulate is Lighthouse's default.

### Input

- URLs (required). `https://` is added to a URL without a scheme. A URL listed twice is audited once.
- Device: Mobile (default), Desktop or Both. Both runs two audits per URL.
- Categories: Performance, Accessibility, Best practices, SEO (default all four)
- Throttling: Simulate (default), DevTools or None
- Issues per page (default 10)
- Save full JSON report (default off), Save HTML report (default off)
- Timeout per page in seconds (default 120)

### Output

Dataset: one item per URL and device with `url`, `device`, `ok`, `finalUrl`, `throttling`, `scores`, `metrics`, `issueCount`, `issues`, `lighthouseVersion`, `fetchTime`, `warnings`, and `jsonReportUrl` and `htmlReportUrl` when the reports are saved. Export as JSON, CSV or Excel, or read it over the API.

A page that cannot be audited gets an item with `ok: false` and an `error` field, and the run moves on. Examples: a page that answers HTTP 404 (`ERRORED_DOCUMENT_REQUEST ... (Status code: 404)`), a host name that does not resolve (`CHROME_INTERSTITIAL_ERROR`), and a text that is not an http or https URL.

### Pricing

Pay per event: one event per page audited, so a URL audited on mobile and desktop is two events. Failed audits are not charged. The run stops when it reaches the maximum charge you set.

### Scope and conduct

Chrome loads each page once per device. The actor does not log in, fill forms or follow links. No personal data is collected.

### License

Lighthouse is open source software released under the Apache License 2.0 (https://github.com/GoogleChrome/lighthouse/blob/main/LICENSE). This actor uses it unmodified as a library.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

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

Pages to audit. A URL without http:// or https:// gets https:// added.

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

Mobile emulates a phone on a throttled connection. Desktop uses Lighthouse's desktop settings. Both runs two audits per URL.

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

Lighthouse categories to score. Leave empty for all four. Fewer categories make an audit faster.

## `throttling` (type: `string`):

Simulate: Lighthouse's default, loads the page fast and models a slow connection. DevTools: slows the connection and CPU while the page loads. None: no throttling, the page loads at the actor's connection speed.

## `maxIssues` (type: `integer`):

How many failing audits to list per page, highest weight first.

## `saveJsonReport` (type: `boolean`):

Store the complete Lighthouse result for each page in the key-value store and link it from the dataset item.

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

Store the Lighthouse HTML report for each page in the key-value store and link it from the dataset item.

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

An audit that takes longer is reported as an error.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "device": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "throttling": "simulate",
  "maxIssues": 10,
  "saveJsonReport": false,
  "saveHtmlReport": false,
  "timeoutSecs": 120
}
```

# 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://apify.com",
        "https://example.com"
    ]
};

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

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

```

## MCP server setup

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