# PageSpeed Regression Check After a Deploy

**Use case:** 

Run after each deploy to see which pages got slower: takes the median of 3 Lighthouse samples per page to cut noise and flags performance, LCP and CLS changes against your last good run.

## Input

```json
{
  "urls": [
    "https://www.wikipedia.org/",
    "https://example.com/"
  ],
  "strategy": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "regressionThresholds": {
    "scores.performance": 5,
    "labMetrics.lcpMs": 500,
    "labMetrics.cls": 0.05
  },
  "fieldRegressionCheck": false,
  "samples": 3,
  "maxAudits": 1000,
  "maxConcurrency": 4,
  "timeoutSecs": 120,
  "maxUrls": 100,
  "maxRunSecs": 3000
}
```

## Output

```json
{
  "inputUrl": {
    "label": "URL",
    "format": "string"
  },
  "strategy": {
    "label": "Device",
    "format": "text"
  },
  "success": {
    "label": "Success",
    "format": "boolean"
  },
  "scores.performance": {
    "label": "Performance",
    "format": "number"
  },
  "labMetrics.lcpMs": {
    "label": "LCP (ms)",
    "format": "number"
  },
  "labMetrics.cls": {
    "label": "CLS",
    "format": "number"
  },
  "fieldData.source": {
    "label": "Field source",
    "format": "text"
  },
  "fieldData.overallCategory": {
    "label": "Field overall category",
    "format": "text"
  },
  "fieldData.coreWebVitalsAssessment": {
    "label": "Field CWV assessment",
    "format": "text"
  },
  "fieldData.lcpMs": {
    "label": "Field p75 LCP (ms)",
    "format": "number"
  },
  "fieldData.inpMs": {
    "label": "Field p75 INP (ms)",
    "format": "number"
  },
  "fieldData.cls": {
    "label": "Field p75 CLS",
    "format": "number"
  },
  "fieldData.fcpMs": {
    "label": "Field p75 FCP (ms)",
    "format": "number"
  },
  "fieldData.ttfbMs": {
    "label": "Field p75 TTFB (ms)",
    "format": "number"
  },
  "fieldData.lcpRating": {
    "label": "Field LCP rating",
    "format": "text"
  },
  "fieldData.inpRating": {
    "label": "Field INP rating",
    "format": "text"
  },
  "fieldData.clsRating": {
    "label": "Field CLS rating",
    "format": "text"
  },
  "fieldData.fcpRating": {
    "label": "Field FCP rating",
    "format": "text"
  },
  "fieldData.ttfbRating": {
    "label": "Field TTFB rating",
    "format": "text"
  },
  "fieldData.note": {
    "label": "Field note",
    "format": "string"
  },
  "fieldData.reason": {
    "label": "Field availability reason",
    "format": "string"
  },
  "comparisonStatus": {
    "label": "Comparison",
    "format": "text"
  },
  "delta.scores.performance": {
    "label": "Δ Performance",
    "format": "number"
  },
  "delta.labMetrics.lcpMs": {
    "label": "Δ LCP (ms)",
    "format": "number"
  },
  "regressions": {
    "label": "Regressions",
    "format": "array"
  },
  "errorCode": {
    "label": "Error",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The PageSpeed Insights & Core Web Vitals Monitor Actor is ready to run with the inputs already set for "PageSpeed Regression Check After a Deploy". [Sign up or log in](https://console.apify.com/create-task-from-example/MKEHFHqYk97Gx1wao) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "PageSpeed Regression Check After a Deploy" task

The PageSpeed Insights & Core Web Vitals Monitor Actor will start running based on the input automatically. You can also change all the input fields, like public page urls, device, and more, to match your specific use case.

### 3. Receive the "PageSpeed Regression Check After a Deploy" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as URL, device, success, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "PageSpeed Regression Check After a Deploy" task via API](https://apify.com/smartlinks/pagespeed-change-monitor.md).

## FAQ

### Why 3 samples?

Lighthouse scores vary between runs. The median of 3 samples, plus overlapping-range checks, avoids flagging noise as a regression.

### Is each sample billed?

Yes. Each successful lab sample is one audit, so 3 samples cost 3 audits. Failed samples are free.

## About this Actor

This example demonstrates how to use [PageSpeed Insights & Core Web Vitals Monitor](https://apify.com/smartlinks/pagespeed-change-monitor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/smartlinks/pagespeed-change-monitor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/smartlinks/pagespeed-change-monitor.md

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`).
