# Website Performance Regression Monitor Lighthouse Diff & Budge (`bin_ai_tools/my-actor-5`) Actor

Monitor Lighthouse performance changes for important pages. Establish an accepted mobile or desktop baseline, then flag confirmed regressions and budget breaches with a second check to reduce false alarms. Tracks Performance, LCP, CLS, TBT, and transfer size.

- **URL**: https://apify.com/bin\_ai\_tools/my-actor-5.md
- **Developed by:** [Bin Bin](https://apify.com/bin_ai_tools) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 completed performance regression checks

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

## Website Performance Regression Monitor — Lighthouse Diff & Budget

Detect whether a website release caused a meaningful Lighthouse performance regression instead of merely reporting today's score.

### What it does

- Creates an accepted baseline on the first successful check.
- Compares later mobile or desktop Lighthouse metrics with that accepted baseline.
- Runs only one Lighthouse audit when performance is normal.
- Runs one additional confirmation audit only when a relative threshold or absolute budget is breached.
- Reports `CONFIRMED_REGRESSION`, `BUDGET_EXCEEDED`, or `UNSTABLE_RESULT` instead of treating every noisy Lighthouse result as a real incident.
- Never rolls the accepted baseline automatically. Use `resetBaseline=true` only after you intentionally accept a new performance level.

### Metrics

Performance score, LCP, CLS, TBT, FCP, Speed Index, total transfer bytes, and script transfer bytes when Lighthouse network-request details are available.

### Default relative thresholds

- Performance score drop: 10 points
- LCP: +500 ms and +20%
- TBT: +200 ms and +30%
- CLS: +0.05 with current CLS at least 0.10
- Transfer size: +250 KiB and +25%

Optional absolute budgets can also be supplied for score, LCP, CLS, TBT, and transfer size.

### Billing

PPE event: `performance-regression-check`. One completed URL check charges once even when an internal confirmation audit is required. A failed main audit or failed confirmation audit does not charge.

Target launch price is $0.05 per completed URL check, subject to real Apify Cloud cost validation before publication.

### Scope

This Actor is a regression monitor, not a full Lighthouse report viewer, RUM product, CrUX dashboard, AI performance consultant, or legal/SLA guarantee. v0.1 intentionally has no paid third-party API, proxy matrix, notifications, PDF, n8n, MCP, GitHub Action, or standalone web app.

# Actor input Schema

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

Add 1–10 HTTP/HTTPS pages to monitor.

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

Run Lighthouse using mobile or desktop emulation.

## `resetBaseline` (type: `boolean`):

Use this run as the new accepted baseline instead of evaluating regression.

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

Optional keys: minPerformanceScore, maxLcpMs, maxCls, maxTbtMs, maxTransferBytes.

## `thresholds` (type: `object`):

Override conservative defaults only when needed.

## Actor input object example

```json
{
  "urls": [
    "https://example.com/"
  ],
  "device": "mobile",
  "resetBaseline": false
}
```

# Actor output Schema

## `dataset` (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://example.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bin_ai_tools/my-actor-5").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("bin_ai_tools/my-actor-5").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 bin_ai_tools/my-actor-5 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bin_ai_tools/my-actor-5"
        }
    }
}
```

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/hUmXtYZrDXmoWEqRE/builds/2HqgncyYfzuOqRQrc/openapi.json
