# Bulk Lighthouse + Core Web Vitals (`supes/bulk-lighthouse-crux`) Actor

Audit up to 500 URLs in one run. Get open-source Lighthouse lab performance scores (LCP, CLS) with no Google API key, plus real-user Chrome UX Report Core Web Vitals (LCP, INP, CLS) and up to 40 weeks of history when Google has a record. Optionally use your own key for PageSpeed Insights lab scores.

- **URL**: https://apify.com/supes/bulk-lighthouse-crux.md
- **Developed by:** [Supes Dad](https://apify.com/supes) (community)
- **Categories:** SEO tools, Developer tools, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 url 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

## Bulk Lighthouse + Core Web Vitals

**Audit hundreds of URLs in one run.** Get [open-source Lighthouse](https://github.com/GoogleChrome/lighthouse) (Apache-2.0) lab performance scores with no Google API key, plus real-user Core Web Vitals from the Chrome UX Report when Google has a record. You do not need to supply a key for field data.

This Actor does not crawl, follow links, or scrape page content. It only audits the URLs you supply.

- Actor: `supes/bulk-lighthouse-crux`
- Console: https://console.apify.com/actors/2xlZjfMw5xjxa7wEY

### What it does

For each URL you provide, the Actor writes one dataset row:

- **Default (no Google API key):** runs Lighthouse in headless Chrome inside the Actor. `source` is `lighthouse`. CrUX current and history field data are included when Google has a record for that URL or origin. If Google has no record, `crux` is `null`. That is not an error.
- **With your Google API key:** calls PageSpeed Insights API v5 for lab scores (`source` is `pagespeed-insights`) and uses your key for CrUX, so those Google calls count against your quota. Leave the key empty unless you specifically want PageSpeed Insights lab scores.

A bad URL or a failed audit becomes an error row. The run continues with the rest of the list. Each local Lighthouse attempt runs in an isolated worker, so a Chrome or Lighthouse crash on one URL becomes an `AUDIT_ERROR` row instead of stopping the run. Lab failures that would produce an `AUDIT_ERROR` are retried once after one second, inside a 90-second per-URL deadline. Invalid URLs and timeouts are not retried.

### Who it's for

Use this Actor if you need to:

- Check Core Web Vitals (LCP, INP, CLS) across a site, a client portfolio, or a competitor set
- Compare lab Lighthouse scores with real-user Chrome UX Report data, including up to 40 weeks of history
- Run bulk audits from Apify Console, the API, or a schedule, without standing up your own Chrome workers
- Keep costs predictable: $0.02 per URL audited, with CrUX current field data included

Typical use cases include SEO monitoring, release checks, agency reporting, and site migrations.

### What you get

Each processed input produces one dataset row, including error rows. Unknown values are `null`, never `0`.

| Field | Type | Meaning |
| --- | --- | --- |
| `url` | string | The input URL |
| `strategy` | `mobile` or `desktop` | Device used for the audit |
| `source` | `lighthouse` or `pagespeed-insights` | Where lab scores came from |
| `performanceScore` | number or `null` | Lab performance score, 0–100 |
| `lcp` | number or `null` | Lab Largest Contentful Paint, in milliseconds |
| `inp` | number or `null` | CrUX current INP p75, in milliseconds (not a lab value) |
| `cls` | number or `null` | Lab Cumulative Layout Shift |
| `lab` | object or `null` | Lab metrics: `performanceScore`, `lcp`, `inp` (always `null`), `cls` |
| `crux` | object or `null` | Real-user field data when available (see below) |
| `checkedAt` | string | ISO timestamp when this URL's audit started |
| `error` | object or `null` | `{ code, message }` when something failed; otherwise `null` |

When `crux` is present, it includes:

- `attribution` and `license` — Chrome UX Report data is licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- `changes` — a short note that the output selects p75 metrics and collection periods
- `current` — `scope` (`url` or `origin`) plus p75 `lcp`, `inp`, and `cls`
- `history` — `scope` plus up to 40 `weeks`, each with `firstDate`, `lastDate`, and p75 `lcp`, `inp`, and `cls`

Lighthouse cannot measure INP during a simulated page load, so `lab.inp` is always `null`. Top-level `inp` is filled only from CrUX current data. If Google has no URL-level record, the Actor falls back to the origin independently for current and history data.

### Input

| Field | Required | Default | Description |
| --- | --- | --- | --- |
| `urls` | yes | — | HTTP or HTTPS URLs to audit, 1 to 500. Credentials in the URL are rejected. |
| `strategy` | no | `mobile` | `mobile` or `desktop`. One strategy per run. |
| `maxConcurrency` | no | `2` | How many URLs to audit at the same time (1 to 500). |
| `googleApiKey` | no | empty | Secret. Leave empty for in-Actor Lighthouse plus CrUX field data. Supply your own key only if you want PageSpeed Insights lab scores and to have CrUX billed against your Google quota. Enable the PageSpeed Insights and Chrome UX Report APIs on that key. |

Example input:

```json
{
  "urls": [
    "https://www.wikipedia.org",
    "https://example.com"
  ],
  "strategy": "mobile",
  "maxConcurrency": 2
}
```

To use PageSpeed Insights for lab scores, add `"googleApiKey": "<your key>"`.

### Pricing

Pay per event. You pay the events below, not Apify platform usage.

| Event | Price | When it is charged |
| --- | --- | --- |
| `url-audited` | **$0.02** ($20 per 1,000) | After a valid URL's row is saved, including failed lab audits (timeout, Lighthouse error, HTTP error). Includes lab scores and CrUX current field data when Google has a record. |
| `crux-history` | **$0.002** ($2 per 1,000) | Only when that row includes CrUX history weeks. |
| `apify-actor-start` | $0.00005 per start event | Charged automatically at the start of the run. At the default 4 GB memory, Apify charges four start events (**$0.0002**). |

Invalid URLs (`INVALID_URL`) are **not** charged. There is no automatic per-dataset-row charge, so a successful audit costs $0.02, plus $0.002 if history weeks are returned, plus the tiny start fee.

Worked examples (plus the start fee of $0.0002 at 4 GB):

- 100 valid URLs, none with CrUX history: **$2.00**
- 100 valid URLs, all with CrUX history: **$2.20**
- 1,000 valid URLs, none with CrUX history: **$20.00**
- 1,000 valid URLs, all with CrUX history: **$22.00**
- 100 valid URLs and 5 typo / invalid entries: **$2.00** (the invalid rows are free)

There is no input flag to turn history off. History is requested automatically whenever CrUX can be queried, and `crux-history` is charged only when weeks are actually returned. If a run reaches your maximum spend, in-flight work is stopped and remaining URLs are skipped.

### How to run

#### In Apify Console

1. Open [Bulk Lighthouse + Core Web Vitals](https://console.apify.com/actors/2xlZjfMw5xjxa7wEY).
2. Paste your URLs into **URLs**, choose **Mobile** or **Desktop**, and leave **Your Google API key** empty unless you want PageSpeed Insights lab scores.
3. Keep **Maximum concurrency** at `2` unless you have a reason to change it.
4. Run the Actor, then open the default dataset when it finishes.

The input field titles above match this Actor's input schema.

#### From the API

Send the same JSON input to the Actor's run endpoint:

```bash
curl -X POST "https://api.apify.com/v2/acts/supes~bulk-lighthouse-crux/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://www.wikipedia.org","https://example.com"],"strategy":"mobile"}'
```

You can also schedule the Actor or start it from an integration. Replace `YOUR_APIFY_TOKEN` with your own Apify API token.

### Sample output

The numeric values below come from a successful row for `https://www.wikipedia.org` in run `3gG3cjropeDQaE6Nz` on 10 November 2026 (America/New_York), build 1.0.5, `strategy: mobile`, with no buyer API key. Lab performance score was **100**, and CrUX current field data plus 40 history weeks were present. `checkedAt` is an example timestamp in that run's time window, not copied from the live row. The live `crux.history.weeks` array had 40 weekly points; it is shown empty here to keep the example short.

```json
{
  "url": "https://www.wikipedia.org",
  "strategy": "mobile",
  "source": "lighthouse",
  "performanceScore": 100,
  "lcp": 1373.5,
  "inp": 100,
  "cls": 0.000872,
  "lab": {
    "performanceScore": 100,
    "lcp": 1373.5,
    "inp": null,
    "cls": 0.000872
  },
  "crux": {
    "attribution": "Contains Chrome UX Report data from Google, licensed CC BY 4.0: https://creativecommons.org/licenses/by/4.0/",
    "license": "https://creativecommons.org/licenses/by/4.0/",
    "changes": "Selected p75 metrics and collection periods from the original data.",
    "current": { "scope": "url", "lcp": 1302, "inp": 100, "cls": 0 },
    "history": {
      "scope": "url",
      "weeks": []
    }
  },
  "checkedAt": "2026-11-10T17:21:00.000Z",
  "error": null
}
```

On the same run, `https://example.com` scored **93**, with CrUX current p75 LCP 1175 ms, INP 79 ms, and CLS 0, plus 40 history weeks. A site with no Chrome UX Report record still gets lab scores and returns `crux: null` with no error.

### Limitations

- 1 to 500 URLs per run.
- Memory is 2–4 GB (default 4 GB). Lighthouse needs this range; do not lower it below 2 GB.
- Each URL has a 90-second deadline covering all attempts. A timeout becomes a `TIMEOUT` error row and is charged as `url-audited`.
- `maxConcurrency` defaults to 2. Results can be returned out of input order when concurrency is greater than 1.
- Low-traffic or new sites often have no Chrome UX Report record. In that case `crux` is `null` and top-level `inp` is `null`. That is not an error.
- Lab scores vary between runs (CPU, network, ads) and can differ from PageSpeed Insights and from CrUX field data.
- Some sites block headless Chrome or never finish loading. Those come back as error rows.
- Google API HTTP 429 and 5xx responses are retried up to three total attempts with exponential backoff.
- `checkedAt` is the time the audit started, not the time it finished. Concurrent URLs can share nearly identical timestamps.
- You can audit only one strategy per run. Start a second run for the other device.
- The Actor does not crawl sitemaps, follow links, sign in, or fill forms.

### FAQ

**Do I need a Google API key?**
No. Leave `googleApiKey` empty to run Lighthouse in the Actor and receive CrUX real-user data when Google has a record. Add your own key only if you want PageSpeed Insights lab scores and to have CrUX billed against your Google quota.

**Why is `crux` null?**
Either Google has no Chrome UX Report record for that URL or origin, or the CrUX call failed (see `error`). Missing field data is not treated as a failed audit by itself.

**Why is INP null?**
INP is a real-user metric. Lighthouse's simulated load cannot measure it, so `lab.inp` is always `null`. The top-level `inp` is filled from CrUX current p75 when that data is available.

**Are failed pages charged?**
Valid URLs that fail (timeout, Lighthouse error, HTTP error) are charged once as `url-audited`. Completely invalid URLs are not charged.

**Can I turn off CrUX history?**
Not with an input flag. History is requested whenever CrUX is queried. You are charged `crux-history` only when history weeks are returned.

**How is this different from pagespeed.web.dev?**
The default path runs Lighthouse in this Actor's Chrome, not on Google's PageSpeed Insights infrastructure, so scores can differ by a few points. To get Google's PSI numbers, pass your own API key.

**Is CrUX data okay to use commercially?**
Chrome UX Report data is licensed [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Commercial reuse is allowed with attribution, a license link, and a note of changes. This Actor adds those fields on every CrUX row.

### Support

Found a bug or want a feature? Open an issue on this Actor's **Issues** tab in Apify Console. Include the run ID and the URL that failed when you can.

Chrome UX Report credit, on every row that includes field data:

> Contains Chrome UX Report data from Google, licensed CC BY 4.0: https://creativecommons.org/licenses/by/4.0/

# Actor input Schema

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

HTTP or HTTPS URLs to audit (up to 500).

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

Device configuration for the lab audit.

## `maxConcurrency` (type: `integer`):

Maximum number of URLs audited simultaneously.

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

Leave empty for in-Actor Lighthouse and CrUX when available. Supply your own key for PageSpeed Insights lab scores and CrUX billed against your Google quota; enable both APIs.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "strategy": "mobile",
  "maxConcurrency": 2
}
```

# Actor output Schema

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

One dataset row per audited URL, including lab scores, CrUX field data when available, and error rows.

# 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("supes/bulk-lighthouse-crux").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("supes/bulk-lighthouse-crux").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 supes/bulk-lighthouse-crux --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,supes/bulk-lighthouse-crux"
        }
    }
}
```

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/2xlZjfMw5xjxa7wEY/builds/CbF9Ok9k2tP1aDO5g/openapi.json
