# Core Web Vitals & Lighthouse Bulk Auditor (no API key) (`rural_yaffle/web-vitals-auditor`) Actor

Audit many public URLs or a whole sitemap with Lighthouse. Get Core Web Vitals lab metrics, performance budgets pass/fail and regression deltas between runs. No Google API key needed.

- **URL**: https://apify.com/rural_yaffle/web-vitals-auditor.md
- **Developed by:** [Vitals Lab](https://apify.com/rural_yaffle) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$24.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.

Learn more: https://docs.apify.com/actors/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

## Core Web Vitals & Lighthouse Bulk Auditor

Audit many public pages in one run, or a whole sitemap, with Google Lighthouse. You get the Core Web Vitals lab metrics, a pass/fail result against your own performance budgets, and a change report against the previous run of the same page. **No Google API key and no account with any other service is needed.**

### What you get for each page and device

- Lighthouse scores (0 to 100): performance, accessibility, best practices, SEO
- Lab metrics: LCP, CLS, TBT, FCP, Speed Index, server response time, page weight, request count
- `vitals`: good, needs-improvement or poor for LCP, CLS and TBT (Google's published thresholds, applied to lab data)
- `budgetPass` and `budgetFailures`: your own limits, for example `{"performanceScore": 80, "lcpMs": 2500, "cls": 0.1}`
- `vsPrevious`: the change since the last run of the same URL and device (improved, regressed or unchanged)
- `opportunities`: the five biggest Lighthouse suggestions for that page, with estimated savings

### Typical uses

- Check a list of landing pages before a release
- Schedule the Actor daily or weekly on your key pages and watch for `regressed`
- Compare mobile and desktop for a whole sitemap
- Add a budget gate to a deployment workflow by calling the Actor through the API and reading `budgetPass`

### Input

| Field | Meaning |
| --- | --- |
| `urls` | Public http(s) pages to audit |
| `sitemapUrl` | A sitemap.xml or sitemap index. Its pages are added to the list |
| `maxUrls` | Safety limit per run (default 25, maximum 200) |
| `strategy` | `mobile` (default), `desktop` or `both` |
| `runsPerUrl` | 1 to 3. With 3, the median is reported. Billed per run |
| `budgets` | Optional limits: `performanceScore` (minimum), `lcpMs`, `cls`, `tbtMs`, `fcpMs`, `pageWeightKb` (maximums) |
| `compareWithPrevious` | Keep results in a named store and report changes next time (default on) |
| `baselineName` | Name of that store. Use one name per project |
| `includeOpportunities` | Add the top suggestions (default on) |

### Example output (one item; values from a local test page, URL replaced)

```json
{
  "url": "https://example.com/pricing",
  "strategy": "mobile",
  "status": "ok",
  "performanceScore": 56,
  "lcpMs": 10906,
  "cls": 0,
  "tbtMs": 0,
  "pageWeightBytes": 1892888,
  "requestCount": 5,
  "vitals": {
    "overall": "poor",
    "lcp": "poor",
    "cls": "good",
    "tbt": "good"
  },
  "budgetsChecked": true,
  "budgetPass": false,
  "budgetFailures": [
    "performanceScore 56 < budget 85",
    "lcpMs 10906ms > budget 2500ms"
  ],
  "vsPrevious": {
    "performanceScore": -8,
    "lcpMs": 551,
    "cls": 0,
    "tbtMs": -54,
    "pageWeightBytes": 1,
    "verdict": "regressed",
    "previousCheckedAt": "2026-11-23T09:00:47.962Z"
  },
  "opportunities": [
    {
      "id": "render-blocking-insight",
      "title": "Render-blocking requests",
      "estSavingsMs": 10300,
      "metricSavings": {
        "FCP": 10300,
        "LCP": 0
      }
    }
  ]
}
```

### Pricing

Pay per event (event name `audit`). You pay for each successful Lighthouse run (one URL, one device, one run). Pages that fail to load are not charged. There are no extra platform usage charges: compute is included in the per-audit price.

### Good to know

- These are lab results from a simulated device and network, run on Apify's servers. They are consistent, but they are not field data from real visitors, and results move a little from run to run. Use `runsPerUrl: 3` for steadier numbers.
- Only pages you can reach publicly are audited. Pages behind a login are not supported.
- Private network addresses and localhost are rejected.
- Each run opens a real Chrome browser, so allow about 4 GB of memory and roughly 20 to 60 seconds per audit.
- The Actor only loads the URLs you give it. It does not crawl links.

# Actor input Schema

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

Public http(s) pages to audit. Add as many as you like (up to the Max URLs limit).

## `sitemapUrl` (type: `string`):

A sitemap.xml (or sitemap index). Its pages are added to the list above, up to the Max URLs limit.

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

Safety limit on pages audited per run (hard maximum 200).

## `strategy` (type: `string`):

Emulated device. 'both' audits every URL on both devices and is billed as two audits per URL.

## `runsPerUrl` (type: `integer`):

Lab results vary between runs. 3 runs report the median but take 3x longer and are billed as 3 audits (billing is per Lighthouse run).

## `budgets` (type: `object`):

Pass/fail thresholds. Keys: performanceScore (minimum, 0-100), lcpMs, cls, tbtMs, fcpMs, pageWeightKb (maximums). Example: {"performanceScore": 80, "lcpMs": 2500, "cls": 0.1}

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

Store each result in a named key-value store and report the change (improved / regressed) the next time the same URL and device are audited. Schedule the Actor to monitor regressions.

## `baselineName` (type: `string`):

Name of the key-value store that keeps previous results. Use different names for different projects.

## `includeOpportunities` (type: `boolean`):

Add the five biggest Lighthouse savings suggestions for each page.

## Actor input object example

```json
{
  "urls": [
    "https://example.com/"
  ],
  "maxUrls": 25,
  "strategy": "mobile",
  "runsPerUrl": 1,
  "budgets": {},
  "compareWithPrevious": true,
  "baselineName": "web-vitals-baseline",
  "includeOpportunities": true
}
```

# Actor output Schema

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

One row per audited URL and device: performance score, LCP, CLS, TBT, budget pass/fail and change vs. previous run.

# 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("rural_yaffle/web-vitals-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://example.com/"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rural_yaffle/web-vitals-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/8UQ7vc4lDbhGtGFkd/builds/KoyKmdaGBxZPzbLVh/openapi.json
