# Audit Core Web Vitals for every page in a sitemap

**Use case:** 

Audit every page in a sitemap with Google PageSpeed Insights on mobile and desktop: Lighthouse scores, lab metrics, real-user Core Web Vitals and top fixes per page. Failed audits are free.

## Input

```json
{
  "urls": [
    "https://apify.com",
    "https://example.com"
  ],
  "sitemapUrls": [
    "https://apify.com/sitemap.xml"
  ],
  "maxUrls": 20,
  "strategies": [
    "mobile",
    "desktop"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "maxOpportunities": 5,
  "locale": "en",
  "concurrency": 4
}
```

## Output

```json
{
  "url": {
    "label": "Url"
  },
  "strategy": {
    "label": "Strategy"
  },
  "scores": {
    "label": "Scores",
    "format": "object"
  },
  "coreWebVitalsPassed": {
    "label": "CWV passed (real users)",
    "format": "boolean"
  },
  "lab": {
    "label": "Lab metrics",
    "format": "object"
  },
  "alert": {
    "label": "Alert"
  },
  "error": {
    "label": "Error"
  }
}
```

## How it works

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

The Bulk PageSpeed & Core Web Vitals Audit Actor is ready to run with the inputs already set for "Audit Core Web Vitals for every page in a sitemap". [Sign up or log in](https://console.apify.com/create-task-from-example/qFf1rd9i6Ys0lkh2m) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Audit Core Web Vitals for every page in a sitemap" task

The Bulk PageSpeed & Core Web Vitals Audit Actor will start running based on the input automatically. You can also change all the input fields, like URLs, sitemaps (optional), and more, to match your specific use case.

### 3. Receive the "Audit Core Web Vitals for every page in a sitemap" 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, strategy, scores, 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 "Audit Core Web Vitals for every page in a sitemap" task via API](https://apify.com/fjordlabs/pagespeed-audit.md).

## FAQ

### What does the output field 'url' represent?

The 'url' field in the task output contains the specific webpage that was audited for performance and Core Web Vitals.

### What information is included in 'scores'?

The 'scores' field provides Lighthouse scores for performance, accessibility, best practices, and SEO on a scale of 0 to 100.

### What is indicated by 'coreWebVitalsPassed'?

The 'coreWebVitalsPassed' field indicates whether the real user Core Web Vitals metrics for the audited page passed Google's thresholds.

### What are lab metrics reported in this task?

The 'lab' field contains specific lab metrics like LCP, CLS, TBT, FCP, Speed Index, and TTI, which help assess the page's performance.

### Can I audit multiple pages at once with this task?

Yes, the task can audit multiple pages specified in a sitemap, with automated crawling of URLs and de-duplication.

### What alert functionality does this task offer?

Set alertBelowPerformanceScore (for example 50). Pages under that performance score get alert: true, so a Slack or email integration on a scheduled run can notify you.

## About this Actor

This example demonstrates how to use [Bulk PageSpeed & Core Web Vitals Audit](https://apify.com/fjordlabs/pagespeed-audit.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/fjordlabs/pagespeed-audit.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/fjordlabs/pagespeed-audit.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`).
