# Compare desktop and mobile Lighthouse scores of store pages

**Use case:** 

The same two public demo-store pages audited on a phone and on a desktop profile, four rows in all: the four Lighthouse scores, Largest Contentful Paint and Total Blocking Time side by side, so you can see which device is slower. Put your own category or product pages in the list and use the table as a before-and-after check around a release.

## Input

```json
{
  "startUrls": [
    "https://books.toscrape.com/",
    "https://webscraper.io/test-sites/e-commerce/static"
  ],
  "formFactor": "both",
  "saveHtmlReport": true,
  "maxItems": 0,
  "onlyNew": false,
  "stateName": "default",
  "notifyWhenEmpty": false,
  "requestIntervalMs": 1000
}
```

## Output

```json
{
  "url": {
    "label": "Page address as given (fragment removed)",
    "format": "string"
  },
  "formFactor": {
    "label": "mobile (phone screen, slow 4G, 4x slower CPU) or desktop (wide screen, fast connection)",
    "format": "string"
  },
  "performanceScore": {
    "label": "Lighthouse Performance score, 0 to 100 (null when the category was not asked for or could not be scored)",
    "format": "integer"
  },
  "accessibilityScore": {
    "label": "Lighthouse Accessibility score, 0 to 100",
    "format": "integer"
  },
  "bestPracticesScore": {
    "label": "Lighthouse Best Practices score, 0 to 100",
    "format": "integer"
  },
  "seoScore": {
    "label": "Lighthouse SEO score, 0 to 100",
    "format": "integer"
  },
  "largestContentfulPaintMs": {
    "label": "Largest Contentful Paint in ms (lab Core Web Vital)",
    "format": "integer"
  },
  "totalBlockingTimeMs": {
    "label": "Total Blocking Time in ms (lab stand-in for Interaction to Next Paint)",
    "format": "integer"
  },
  "cumulativeLayoutShift": {
    "label": "Cumulative Layout Shift (lab Core Web Vital, unitless, 3 decimals)",
    "format": "number"
  },
  "reportUrl": {
    "label": "Link to the full Lighthouse HTML report in the key-value store of the run (null when reports are turned off)",
    "format": "string"
  }
}
```

## How it works

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

The Lighthouse Audit API: Core Web Vitals and Performance Scores Actor is ready to run with the inputs already set for "Compare desktop and mobile Lighthouse scores of store pages". [Sign up or log in](https://console.apify.com/create-task-from-example/JrtVdlQHkYisXrHZy) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Compare desktop and mobile Lighthouse scores of store pages" task

The Lighthouse Audit API: Core Web Vitals and Performance Scores Actor will start running based on the input automatically. You can also change all the input fields, like pages to audit, device, and more, to match your specific use case.

### 3. Receive the "Compare desktop and mobile Lighthouse scores of store pages" 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 page address as given (fragment removed), mobile (phone screen, slow 4g, 4x slower cpu) or desktop (wide screen, fast connection), lighthouse performance score, 0 to 100 (null when the category was not asked for or could not be scored), 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 "Compare desktop and mobile Lighthouse scores of store pages" task via API](https://apify.com/rowcraft/lighthouse-performance-audit.md).

## About this Actor

This example demonstrates how to use [Lighthouse Audit API: Core Web Vitals and Performance Scores](https://apify.com/rowcraft/lighthouse-performance-audit.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/rowcraft/lighthouse-performance-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/rowcraft/lighthouse-performance-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`).
