# Track Core Web Vitals history of competitors

**Use case:** 

Weekly p75 history of LCP, INP and CLS for your site and competitors from the CrUX History API, about six months back.

## Input

```json
{
  "urls": [
    "booking.com",
    "expedia.com"
  ],
  "level": "origin",
  "formFactor": "ALL",
  "includeHistory": true,
  "historyPeriods": 25
}
```

## Output

```json
{
  "input": {
    "label": "Input"
  },
  "queried": {
    "label": "Queried"
  },
  "queriedFallback": {
    "label": "Queried fallback"
  },
  "formFactor": {
    "label": "Form factor"
  },
  "passesCoreWebVitals": {
    "label": "Passes CWV"
  },
  "largest_contentful_paint": {
    "label": "LCP (p75, shares)"
  },
  "interaction_to_next_paint": {
    "label": "INP (p75, shares)"
  },
  "cumulative_layout_shift": {
    "label": "CLS (p75, shares)"
  },
  "first_contentful_paint": {
    "label": "FCP (p75, shares)"
  },
  "experimental_time_to_first_byte": {
    "label": "TTFB (p75, shares)"
  },
  "collectionPeriod": {
    "label": "Data period"
  },
  "history": {
    "label": "History"
  },
  "historyError": {
    "label": "History error"
  },
  "trend": {
    "label": "Trend (last 4 vs 4 before)"
  },
  "lcpBreakdown": {
    "label": "LCP parts (p75 ms)"
  },
  "lcpResourceType": {
    "label": "LCP element type"
  },
  "bestInRun": {
    "label": "Best in run"
  },
  "gapToBest": {
    "label": "Gap to best"
  },
  "wins": {
    "label": "Best at"
  },
  "duplicateOf": {
    "label": "Duplicate of"
  },
  "error": {
    "label": "Error"
  },
  "source": {
    "label": "Source"
  }
}
```

## How it works

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

The Core Web Vitals Benchmark: Page Speed Competitors, CrUX Actor is ready to run with the inputs already set for "Track Core Web Vitals history of competitors". [Sign up or log in](https://console.apify.com/create-task-from-example/nw9IaUVqw2yaHotdS) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Track Core Web Vitals history of competitors" task

The Core Web Vitals Benchmark: Page Speed Competitors, CrUX Actor will start running based on the input automatically. You can also change all the input fields, like sites to compare, level, and more, to match your specific use case.

### 3. Receive the "Track Core Web Vitals history of competitors" 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 input, queried, queried fallback, 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 "Track Core Web Vitals history of competitors" task via API](https://apify.com/solidfetch/crux-competitor-benchmark.md).

## About this Actor

This example demonstrates how to use [Core Web Vitals Benchmark: Page Speed Competitors, CrUX](https://apify.com/solidfetch/crux-competitor-benchmark.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/solidfetch/crux-competitor-benchmark.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/solidfetch/crux-competitor-benchmark.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`).
