# Lighthouse & WCAG Audit: Core Web Vitals, SEO, Monitoring (`trophyapps/site-quality-audit`) Actor

Bulk Lighthouse audits (the engine behind PageSpeed Insights): performance, Core Web Vitals, SEO and best-practice scores, plus accessibility failures mapped to WCAG and EN 301 549. Optional scheduled regression monitoring.

- **URL**: https://apify.com/trophyapps/site-quality-audit.md
- **Developed by:** [Trophy Apps](https://apify.com/trophyapps) (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

from $16.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.
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 & WCAG Audit: Core Web Vitals, SEO, Monitoring

### What does this audit Actor do?

It runs **Google Lighthouse audits on a list of pages** in one run (Lighthouse is the open-source engine behind PageSpeed Insights), and adds **accessibility findings mapped to WCAG and EN 301 549**. For each URL you get:

- **Lighthouse scores** (0–100) for performance, accessibility, best practices and SEO, on mobile or desktop.
- **Core Web Vitals lab metrics:** LCP, FCP, TBT, CLS and Speed Index.
- **Failing checks, ordered by impact**, with estimated time savings for performance items.
- **Accessibility failures mapped to standards:**
  - the WCAG 2.x success criteria (e.g. 1.4.3 contrast) and conformance level;
  - the matching **EN 301 549** clauses, the standard referenced by the European Accessibility Act;
  - up to three offending HTML snippets per issue, plus a link to remediation guidance.
- **A run summary** (key-value store record `SUMMARY`): average scores, the issues that recur across the most pages, and any regressions.

Typical uses: checking a whole site or a set of landing pages at once, tracking performance and accessibility over time, and catching regressions after a release.

### Why run it on Apify?

- **Schedule** it (e.g. weekly) with the monitoring mode below and get regressions only.
- Call it through the **Apify API**, or from AI agents through Apify's MCP server.
- Send results to webhooks and integrations, and export them as JSON, CSV or Excel.

### How to use it

1. Paste the **URLs** to audit. Duplicates are removed.
2. Choose the **device**: `mobile` (default; throttled like Lighthouse's mobile profile) or `desktop`.
3. Optionally set a **Monitor name** to compare each run with the previous one.
4. Run the Actor and open the **Output** tab, or read the dataset and the `SUMMARY` record through the API.

### Monitoring on a schedule

Set **Monitor name** and run the Actor on an Apify schedule. Each page's result then includes a `changes` block comparing it with the previous run of the same monitor:

- score deltas per category;
- new and resolved issues;
- a `regression` flag when a score drops by at least the threshold (default 5 points; doubled for performance, because lab scores vary between runs), or when any new accessibility failure appears.

The `SUMMARY` record lists every regressed page, so a webhook can alert you only when something gets worse.

### Input example

```json
{ "urls": ["https://example.com", "https://example.com/pricing"], "device": "mobile", "monitorName": "my-site" }
```

### How much does it cost?

You pay **per successfully audited page** (see the **Pricing** tab for current prices).

You're **never charged** for pages that:

- return an HTTP error;
- can't be loaded;
- show a bot check instead of their content.

These are reported as error rows instead of being scored. A run stops when it reaches the maximum charge you set.

### Limits — please read

- Automated tools detect only part of accessibility problems. **A score of 100 doesn't prove WCAG or EN 301 549 conformance,** and this Actor isn't a legal compliance certificate.
- Lab metrics come from a single load in a cloud container. They vary between runs and differ from real-user (field) data.
- Some sites block cloud servers. Those pages come back as free error rows.
- Each page is loaded once, like a normal visit. Only audit sites you're entitled to test.
- Only public http(s) hosts are audited. Private, loopback and internal addresses are refused, and results that end on a non-public host after a redirect aren't reported. Query strings are kept in the output (they can change the page) but removed from logs.

# Actor input Schema

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

Pages to audit (http/https). Duplicates are removed.

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

Lighthouse form factor and throttling.

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

Upper bound on pages audited in one run.

## `monitorName` (type: `string`):

Set a name to keep results between runs (e.g. on a schedule). Each run then reports score changes, new and resolved issues, and regressions versus the previous run of the same monitor.

## `regressionThreshold` (type: `integer`):

Score drop that counts as a regression (doubled for performance, whose lab scores vary between runs). Any new accessibility failure also counts.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "device": "mobile",
  "maxUrls": 100,
  "regressionThreshold": 5
}
```

# Actor output Schema

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

One dataset item per input.

## `summary` (type: `string`):

Average scores, recurring issues and regressions across all pages.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("trophyapps/site-quality-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"] }

# Run the Actor and wait for it to finish
run = client.actor("trophyapps/site-quality-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"
  ]
}' |
apify call trophyapps/site-quality-audit --silent --output-dataset

```

## MCP server setup

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