# Lighthouse Audit (`maximedupre/lighthouse-audit`) Actor

Run Lighthouse lab audits for public web pages on mobile or desktop profiles. Get category scores, lab metrics, audit findings, and optional HTML, JSON, or CSV reports in your dataset.

- **URL**: https://apify.com/maximedupre/lighthouse-audit.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Developer tools, SEO tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.70 / 1,000 audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### 🚦 Find page issues with a Lighthouse audit

Lighthouse Audit is for developers, SEO teams, and site owners who need to check public web pages. Get category scores, lab loading metrics, failed checks, and ranked ways to improve a page. Audit a list of URLs with one set of settings, then use the saved data to plan fixes or compare later checks. You do not need to supply a source login or Google API key.

- Check page loading with a **[Lighthouse Speed Test](https://apify.com/maximedupre/lighthouse-audit/examples/lighthouse-speed-test)**.
- Create a **[Lighthouse Report](https://apify.com/maximedupre/lighthouse-audit/examples/lighthouse-report)** to review page findings.
- Export **[Lighthouse Metrics](https://apify.com/maximedupre/lighthouse-audit/examples/lighthouse-metrics)** for your page performance tracking.
- Review a **[Google Lighthouse Score](https://apify.com/maximedupre/lighthouse-audit/examples/google-lighthouse-score)** across audit categories.
- Check **[Google Lighthouse Accessibility](https://apify.com/maximedupre/lighthouse-audit/examples/google-lighthouse-accessibility)** findings before planning page changes.

#### 📊 Scores, lab metrics, and page findings

Each submitted URL has one dataset row with the selected mobile or desktop audits. Choose both profiles to see their scores and lab metrics side by side. Each completed audit includes:

- Scores from 0 to 1 for the selected performance, accessibility, best practices, and SEO categories.
- LCP, FCP, TBT, CLS, and Speed Index lab metrics.
- Failed audit checks and ranked optimization opportunities, with explanations and estimated savings when available.
- The final URL after redirects, network profile, and Lighthouse version.
- Optional HTML, JSON, or CSV report links.
- Earlier category scores and regression flags when prior history is available.

The results are lab measurements, not real-user or field data. Scores can change between runs. Missing detail for a check does not make the core scores invalid. If an audit cannot finish, its profile has a failure status and reason instead of measurements.

#### ▶️ Run a public page audit

1. Add the public HTTP(S) URLs you want to check.
2. Choose mobile, desktop, or both device profiles.
3. Select the categories and a network profile. These settings apply to every URL in the run.
4. Choose extra report formats if you need them.
5. Start the run and open **Audit results** to read the dataset.

Submit the pages you want to audit. The Actor does not crawl a site, find sitemap URLs, log in to private pages, or apply fixes to a page.

#### ⚙️ Input

**Input fields**

| Field | Type | What it does |
| --- | --- | --- |
| `urls` | array of objects | Required. Adds one or more public HTTP(S) pages. Each URL uses the same audit settings. |
| `urls[].url` | string | Required full public HTTP(S) URL for one page. Pages that need a login are not supported. |
| `deviceProfiles` | array of strings | Selects `mobile`, `desktop`, or both. Defaults to `mobile`. Both runs each URL twice and adds a side-by-side comparison when results are available. |
| `categories` | array of strings | Selects one or more of `performance`, `accessibility`, `best-practices`, and `seo`. Defaults to all four. |
| `networkProfile` | string | Sets the network conditions for every selected device profile: `mobileSlow4G`, `mobileFast4G`, or `desktopDense4G`. Defaults to `mobileSlow4G`. |
| `reportFormats` | array of strings | Adds `html` for reading, `json` for code, or `csv` for spreadsheets. Leave empty for dataset results only. Defaults to an empty array. |

**Input example**

This is the public input from a successful current-beta run with the default audit settings:

```json
{
  "urls": [
    {
      "url": "https://example.com"
    }
  ],
  "deviceProfiles": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "networkProfile": "mobileSlow4G",
  "reportFormats": []
}
```

#### 🧾 Output

**Run output link**

| Field | Type | What it does |
| --- | --- | --- |
| `dataset` | string | Opens the dataset overview with one row per submitted URL and the selected device audits. |

**Completed audit fields**

Mobile and desktop audits use the same shape. The table lists both real field paths. Only selected device profiles appear. Optional findings, history, and reports appear when available. Each category object contains only the categories available for that audit or comparison.

| Field | Type | What it does |
| --- | --- | --- |
| `requestedUrl` | string | Public URL submitted for the audit. |
| `mobileAudit`, `desktopAudit` | object | Audit for the named device profile. |
| `mobileAudit.finalUrl`, `desktopAudit.finalUrl` | string | URL reached after redirects. |
| `mobileAudit.networkProfile`, `desktopAudit.networkProfile` | string | Network profile used: `mobileSlow4G`, `mobileFast4G`, or `desktopDense4G`. |
| `mobileAudit.lighthouseVersion`, `desktopAudit.lighthouseVersion` | string | Lighthouse engine version used. |
| `mobileAudit.categoryScores`, `desktopAudit.categoryScores` | object | Scores for the requested categories, from 0 to 1. |
| `mobileAudit.categoryScores.performance`, `desktopAudit.categoryScores.performance` | number | Performance score. |
| `mobileAudit.categoryScores.accessibility`, `desktopAudit.categoryScores.accessibility` | number | Accessibility score. |
| `mobileAudit.categoryScores.bestPractices`, `desktopAudit.categoryScores.bestPractices` | number | Best practices score. |
| `mobileAudit.categoryScores.seo`, `desktopAudit.categoryScores.seo` | number | SEO score. |
| `mobileAudit.labMetrics`, `desktopAudit.labMetrics` | object | Lab loading measurements. |
| `mobileAudit.labMetrics.lcpMs`, `desktopAudit.labMetrics.lcpMs` | number | Largest Contentful Paint in milliseconds. |
| `mobileAudit.labMetrics.fcpMs`, `desktopAudit.labMetrics.fcpMs` | number | First Contentful Paint in milliseconds. |
| `mobileAudit.labMetrics.tbtMs`, `desktopAudit.labMetrics.tbtMs` | number | Total Blocking Time in milliseconds. |
| `mobileAudit.labMetrics.cls`, `desktopAudit.labMetrics.cls` | number | Cumulative Layout Shift, with no time unit. |
| `mobileAudit.labMetrics.speedIndex`, `desktopAudit.labMetrics.speedIndex` | number | Speed Index in milliseconds. |
| `mobileAudit.failedAudits`, `desktopAudit.failedAudits` | array of objects | Failed Lighthouse checks, when detail is available. |
| `mobileAudit.failedAudits[].id`, `desktopAudit.failedAudits[].id` | string | Lighthouse audit ID. |
| `mobileAudit.failedAudits[].title`, `desktopAudit.failedAudits[].title` | string | Lighthouse audit title. |
| `mobileAudit.failedAudits[].description`, `desktopAudit.failedAudits[].description` | string | Lighthouse explanation of the failed check. |
| `mobileAudit.failedAudits[].score`, `desktopAudit.failedAudits[].score` | number | Audit score from 0 to 1, when supplied. |
| `mobileAudit.failedAudits[].displayValue`, `desktopAudit.failedAudits[].displayValue` | string | Formatted value shown by Lighthouse, when supplied. |
| `mobileAudit.optimizationOpportunities`, `desktopAudit.optimizationOpportunities` | array of objects | Ways to improve the page, in priority order, when detail is available. |
| `mobileAudit.optimizationOpportunities[].id`, `desktopAudit.optimizationOpportunities[].id` | string | Lighthouse opportunity ID. |
| `mobileAudit.optimizationOpportunities[].title`, `desktopAudit.optimizationOpportunities[].title` | string | Lighthouse opportunity title. |
| `mobileAudit.optimizationOpportunities[].description`, `desktopAudit.optimizationOpportunities[].description` | string | Lighthouse explanation of the opportunity. |
| `mobileAudit.optimizationOpportunities[].estimatedSavingsMs`, `desktopAudit.optimizationOpportunities[].estimatedSavingsMs` | number | Estimated time savings in milliseconds, when supplied. |
| `mobileAudit.optimizationOpportunities[].estimatedSavingsBytes`, `desktopAudit.optimizationOpportunities[].estimatedSavingsBytes` | number | Estimated transfer savings in bytes, when supplied. |
| `mobileAudit.optimizationOpportunities[].displayValue`, `desktopAudit.optimizationOpportunities[].displayValue` | string | Formatted opportunity value, when supplied. |
| `mobileAudit.scoreComparison`, `desktopAudit.scoreComparison` | object | Earlier scores and regression flags, when prior history is available. |
| `mobileAudit.scoreComparison.previousCategoryScores`, `desktopAudit.scoreComparison.previousCategoryScores` | object | Earlier scores used for the comparison, from 0 to 1. |
| `mobileAudit.scoreComparison.previousCategoryScores.performance`, `desktopAudit.scoreComparison.previousCategoryScores.performance` | number | Earlier performance score. |
| `mobileAudit.scoreComparison.previousCategoryScores.accessibility`, `desktopAudit.scoreComparison.previousCategoryScores.accessibility` | number | Earlier accessibility score. |
| `mobileAudit.scoreComparison.previousCategoryScores.bestPractices`, `desktopAudit.scoreComparison.previousCategoryScores.bestPractices` | number | Earlier best practices score. |
| `mobileAudit.scoreComparison.previousCategoryScores.seo`, `desktopAudit.scoreComparison.previousCategoryScores.seo` | number | Earlier SEO score. |
| `mobileAudit.scoreComparison.regressionFlags`, `desktopAudit.scoreComparison.regressionFlags` | object | Whether scores fell for categories present in both audits. |
| `mobileAudit.scoreComparison.regressionFlags.performance`, `desktopAudit.scoreComparison.regressionFlags.performance` | boolean | Whether the performance score fell. |
| `mobileAudit.scoreComparison.regressionFlags.accessibility`, `desktopAudit.scoreComparison.regressionFlags.accessibility` | boolean | Whether the accessibility score fell. |
| `mobileAudit.scoreComparison.regressionFlags.bestPractices`, `desktopAudit.scoreComparison.regressionFlags.bestPractices` | boolean | Whether the best practices score fell. |
| `mobileAudit.scoreComparison.regressionFlags.seo`, `desktopAudit.scoreComparison.regressionFlags.seo` | boolean | Whether the SEO score fell. |
| `mobileAudit.reports`, `desktopAudit.reports` | object | Optional report links for this device audit. |
| `mobileAudit.reports.htmlUrl`, `desktopAudit.reports.htmlUrl` | string | Apify storage URL for the HTML report, when selected. |
| `mobileAudit.reports.jsonUrl`, `desktopAudit.reports.jsonUrl` | string | Apify storage URL for the detailed JSON report, when selected. |
| `mobileAudit.reports.csvUrl`, `desktopAudit.reports.csvUrl` | string | Apify storage URL for the CSV summary, when selected. |

**Completed audit example**

This complete row comes from a successful current-beta run. It shows scores, lab metrics, findings, and a comparison with earlier scores:

```json
{
  "requestedUrl": "https://example.com",
  "mobileAudit": {
    "finalUrl": "https://example.com/",
    "networkProfile": "mobileSlow4G",
    "lighthouseVersion": "13.5.0",
    "categoryScores": {
      "performance": 1,
      "accessibility": 0.96,
      "bestPractices": 1,
      "seo": 0.8
    },
    "scoreComparison": {
      "previousCategoryScores": {
        "performance": 1,
        "accessibility": 0.96,
        "bestPractices": 1,
        "seo": 0.8
      },
      "regressionFlags": {
        "performance": false,
        "accessibility": false,
        "bestPractices": false,
        "seo": false
      }
    },
    "labMetrics": {
      "lcpMs": 1047.743,
      "fcpMs": 1047.743,
      "tbtMs": 1,
      "cls": 0.005159732408618392,
      "speedIndex": 1674.9231739989154
    },
    "failedAudits": [
      {
        "id": "landmark-one-main",
        "title": "Document does not have a main landmark.",
        "description": "One main landmark helps screen reader users navigate a web page. [Learn more about landmarks](https://dequeuniversity.com/rules/axe/4.13/landmark-one-main).",
        "score": 0
      },
      {
        "id": "meta-description",
        "title": "Document does not have a meta description",
        "description": "Meta descriptions may be included in search results to concisely summarize page content. [Learn more about the meta description](https://developer.chrome.com/docs/lighthouse/seo/meta-description/).",
        "score": 0
      },
      {
        "id": "link-text",
        "title": "Links do not have descriptive text",
        "description": "Descriptive link text helps search engines understand your content. [Learn how to make links more accessible](https://developer.chrome.com/docs/lighthouse/seo/link-text/).",
        "score": 0,
        "displayValue": "1 link found"
      },
      {
        "id": "cache-insight",
        "title": "Use efficient cache lifetimes",
        "description": "A long cache lifetime can speed up repeat visits to your page. [Learn more about caching](https://developer.chrome.com/docs/performance/insights/cache).",
        "score": 0.5,
        "displayValue": "Est savings of 2 KiB"
      },
      {
        "id": "network-dependency-tree-insight",
        "title": "Network dependency tree",
        "description": "[Avoid chaining critical requests](https://developer.chrome.com/docs/performance/insights/network-dependency-tree) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.",
        "score": 0
      }
    ],
    "optimizationOpportunities": [
      {
        "id": "server-response-time",
        "title": "Initial server response time was short",
        "description": "Keep the server response time for the main document short because all other requests depend on it. [Learn more about the Time to First Byte metric](https://developer.chrome.com/docs/lighthouse/performance/time-to-first-byte/).",
        "estimatedSavingsMs": 157,
        "displayValue": "Root document took 260 ms"
      },
      {
        "id": "redirects",
        "title": "Avoid multiple page redirects",
        "description": "Redirects introduce additional delays before the page can be loaded. [Learn how to avoid page redirects](https://developer.chrome.com/docs/lighthouse/performance/redirects/).",
        "estimatedSavingsMs": 0
      },
      {
        "id": "unminified-css",
        "title": "Minify CSS",
        "description": "Minifying CSS files can reduce network payload sizes. [Learn how to minify CSS](https://developer.chrome.com/docs/lighthouse/performance/unminified-css/).",
        "estimatedSavingsMs": 0,
        "estimatedSavingsBytes": 0
      },
      {
        "id": "unminified-javascript",
        "title": "Minify JavaScript",
        "description": "Minifying JavaScript files can reduce payload sizes and script parse time. [Learn how to minify JavaScript](https://developer.chrome.com/docs/lighthouse/performance/unminified-javascript/).",
        "estimatedSavingsMs": 0,
        "estimatedSavingsBytes": 0
      },
      {
        "id": "unused-css-rules",
        "title": "Reduce unused CSS",
        "description": "Reduce unused rules from stylesheets and defer CSS not used for above-the-fold content to decrease bytes consumed by network activity. [Learn how to reduce unused CSS](https://developer.chrome.com/docs/lighthouse/performance/unused-css-rules/).",
        "estimatedSavingsMs": 0,
        "estimatedSavingsBytes": 0
      },
      {
        "id": "unused-javascript",
        "title": "Reduce unused JavaScript",
        "description": "Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. [Learn how to reduce unused JavaScript](https://developer.chrome.com/docs/lighthouse/performance/unused-javascript/).",
        "estimatedSavingsMs": 0,
        "estimatedSavingsBytes": 0
      }
    ]
  }
}
```

**Both device profiles**

This row from another successful current-beta run is shortened because the full row exceeds 10,000 characters. The `"..."` strings stand for omitted findings and report links. Compare the mobile and desktop scores and metrics in the same row:

```json
{
  "requestedUrl": "https://example.com",
  "mobileAudit": {
    "finalUrl": "https://example.com/",
    "networkProfile": "desktopDense4G",
    "lighthouseVersion": "13.5.0",
    "categoryScores": {
      "performance": 1,
      "accessibility": 0.96,
      "bestPractices": 1,
      "seo": 0.8
    },
    "scoreComparison": {
      "previousCategoryScores": {
        "performance": 1,
        "accessibility": 0.96,
        "bestPractices": 1,
        "seo": 0.8
      },
      "regressionFlags": {
        "performance": false,
        "accessibility": false,
        "bestPractices": false,
        "seo": false
      }
    },
    "labMetrics": {
      "lcpMs": 231,
      "fcpMs": 231,
      "tbtMs": 0,
      "cls": 0,
      "speedIndex": 370.4555970834841
    },
    "failedAudits": "...",
    "optimizationOpportunities": "...",
    "reports": "..."
  },
  "desktopAudit": {
    "finalUrl": "https://example.com/",
    "networkProfile": "desktopDense4G",
    "lighthouseVersion": "13.5.0",
    "categoryScores": {
      "performance": 0.79,
      "accessibility": 0.96,
      "bestPractices": 1,
      "seo": 0.8
    },
    "labMetrics": {
      "lcpMs": 1150.215,
      "fcpMs": 1050.715,
      "tbtMs": 280,
      "cls": 0.00122130609184835,
      "speedIndex": 2546.5367451475136
    },
    "failedAudits": "...",
    "optimizationOpportunities": "...",
    "reports": "..."
  }
}
```

**Failed audit fields**

Either profile can have this failure shape. It has no scores, lab metrics, findings, or report links. A row can also contain a completed audit for the other selected profile, using the table above.

| Field | Type | What it does |
| --- | --- | --- |
| `requestedUrl` | string | Public URL submitted for the audit. |
| `mobileAudit`, `desktopAudit` | object | Failure details for the named device profile, when selected. |
| `mobileAudit.status`, `desktopAudit.status` | string | `failed` when the audit could not produce Lighthouse measurements. |
| `mobileAudit.reason`, `desktopAudit.reason` | string | Short reason the audit could not finish. |

This complete failure row comes from a successful current-beta run:

```json
{
  "requestedUrl": "https://www.iana.org/robots.txt",
  "mobileAudit": {
    "status": "failed",
    "reason": "temporary source access failure"
  }
}
```

#### 💳 Pricing

This Actor uses pay-per-event pricing. One **Audit** event is charged for each successful lab audit of one public URL on one device profile. Choosing both profiles can create two events per URL if both audits finish. Failed audits do not create this event. See the Pricing tab for current tier prices.

#### 🔌 Integrations

Run the Actor through Apify Console or the Apify API. Use Apify datasets, schedules, webhooks, and platform integrations to send audit data to your workflow. Your workflow can read the scores to build reports or decide when to raise an alert.

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Why does a device audit have a failure status instead of scores?

The audit could not finish. Read its `reason` field to see why. A failed profile has no Lighthouse measurements and does not create an Audit event.

##### Does the network profile follow the device profile?

You choose them separately. The same `networkProfile` applies to every selected device profile in the run. You can use both devices with one network setting to compare their results.

##### When do earlier scores and regression flags appear?

They appear when prior audit history is available. A regression flag is `true` when a category score is lower than its earlier score. Only categories present in both results can be compared.

##### Can I use different settings for each URL in one run?

No. All URLs share one set of device, category, network, and report settings. Use separate runs when you need different settings.

##### Can I get an HTML Lighthouse report?

Yes. Select `html` in `reportFormats`. Use `json` for a detailed machine-readable report or `csv` for a spreadsheet summary. The audit's `reports` object holds the links when they are available.

##### Are these Google PageSpeed Insights field results?

No. This Actor returns Lighthouse lab measurements. It does not return real-user or field metrics. You do not need to provide a Google API key to run these public page audits.

##### Does an accessibility score prove the page is fully accessible?

Treat it as a Lighthouse check score and review the returned findings. The Actor reports audit results; it does not promise a pass outcome or fix the page.

##### Can I audit a whole site or a page behind a login?

Submit each public HTTP(S) page you want to check. The Actor does not find new pages, follow site links, or access pages that need a login or private session.

##### Will a repeated website speed test give the same score?

Scores can vary between lab runs. Keep the settings the same when you compare results, and check the reported Lighthouse version and network profile.

### 📝 Changelog

**v0.0** (01-10-2026)

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~lighthouse-audit/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Website URL Crawler & Link Extractor](https://apify.com/maximedupre/website-url-crawler): build a page URL list from site links and sitemaps before choosing pages to audit.
- [XML Sitemap Health Validator](https://apify.com/maximedupre/sitemap-validator): check sitemap-listed URLs for HTTP status, redirects, and response time alongside page audits.
- [Seobility SEO Checker](https://apify.com/maximedupre/seobility-seo-checker): add Seobility's on-page SEO scores and factor checks to your website review.
- [Webpage Diff Checker](https://apify.com/maximedupre/webpage-diff-checker): track page text, HTML, SEO metadata, and link changes alongside repeat audits.
- [Redirect Chain Checker](https://apify.com/maximedupre/redirect-checker): trace redirect hops and terminal status when reviewing an audited page's final URL.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

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

Add one or more public HTTP(S) URLs. Each URL gets an audit with the same settings. Pages that need a login are not supported.

## `deviceProfiles` (type: `array`):

Choose Mobile, Desktop, or both. Choosing both runs each URL twice and adds a side-by-side comparison when the results are available.

## `categories` (type: `array`):

Choose the categories to score. Performance, accessibility, best practices, and SEO are available.

## `networkProfile` (type: `string`):

Choose the network conditions used for every selected device profile.

## `reportFormats` (type: `array`):

Choose any extra files to create. HTML is for reading, JSON is for code, and CSV is for spreadsheets. Leave it empty if you only need dataset results.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://example.com"
    }
  ],
  "deviceProfiles": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "networkProfile": "mobileSlow4G",
  "reportFormats": [
    "html"
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open one audit row for each submitted URL, with mobile and desktop audits when selected.

# 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": [
        {
            "url": "https://example.com"
        }
    ],
    "deviceProfiles": [
        "mobile"
    ],
    "categories": [
        "performance",
        "accessibility",
        "best-practices",
        "seo"
    ],
    "reportFormats": [
        "html"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/lighthouse-audit").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": [{ "url": "https://example.com" }],
    "deviceProfiles": ["mobile"],
    "categories": [
        "performance",
        "accessibility",
        "best-practices",
        "seo",
    ],
    "reportFormats": ["html"],
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/lighthouse-audit").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": [
    {
      "url": "https://example.com"
    }
  ],
  "deviceProfiles": [
    "mobile"
  ],
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "reportFormats": [
    "html"
  ]
}' |
apify call maximedupre/lighthouse-audit --silent --output-dataset

```

## MCP server setup

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

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/aWlcLelOdykmBTE2W/builds/b0nlwa5DJTlMs3QXQ/openapi.json
