# PageSpeed Insights & Lighthouse Bulk Checker, No API Key (`rod_analytics/lighthouse-audit`) Actor

Check Google PageSpeed Insights and Lighthouse scores for hundreds of URLs or a whole sitemap, no API key needed. Scores, Core Web Vitals (LCP, CLS, TBT, INP), CrUX field data, top fixes and HTML reports. Schedule it to monitor page speed and flag regressions.

- **URL**: https://apify.com/rod_analytics/lighthouse-audit.md
- **Developed by:** [Rod Services](https://apify.com/rod_analytics) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 33 total users, 24 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 pagespeed 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

**Bulk Google PageSpeed Insights and Lighthouse checker: scores and Core Web Vitals (LCP, CLS, INP) for hundreds of URLs in one run.**
**No API key needed.** Paste URLs or just a sitemap, press Start, get one clean JSON row per page with scores, CrUX field data, top fixes and the full Lighthouse report. Schedule it as a website speed test monitor: every row shows what changed since the last run. $1.50 per 1,000 audits.

### What you get

For every URL and device (mobile, desktop or both):

- The four **Lighthouse scores**: Performance, Accessibility, Best Practices, SEO (0 to 100).
- **Core Web Vitals** lab metrics: LCP, CLS, TBT, plus FCP, TTFB, Speed Index and page weight.
- **Real user CrUX field data** from Google: p75 LCP, CLS, INP, FCP, TTFB and the overall rating.
- The **top improvement opportunities**, sorted by estimated time savings.
- A link to the **full Lighthouse HTML report**, the same one you see on pagespeed.web.dev.
- **Changes since the last run** and a `regressed` flag, so scheduled runs tell you which pages got slower.

Audit a **whole website from its sitemap**: paste the home page or the sitemap.xml and the Actor finds the pages for you.

By default the Actor calls the official **Google PageSpeed Insights API with a shared key of this Actor**, so you do not need a Google Cloud account. You get Google's own Lighthouse numbers. No browser runs, so it is fast and cheap. You can paste your own free key for a private quota at the same price.

Typical uses:

- **SEO agencies.** Audit every client page in one run and send scores, Core Web Vitals and fixes per URL.
- **Core Web Vitals monitoring.** Schedule daily or weekly runs. Each row shows the change since the last run and flags regressions.
- **Release checks.** Audit staging and production URLs, mobile and desktop, before you ship.
- **Competitor benchmarking.** Compare page speed and SEO scores of your site with competitors.
- **AI agents and LLM tools.** One predictable JSON schema with numbers, callable through the Apify API or MCP.

### Quick start

1. Open the **Input** tab.
2. Paste URLs into **URLs to audit**, one per line. `example.com` works, https is added. Or paste a website into **Sitemaps or websites**.
3. Pick **Device**: mobile, desktop or both.
4. Press **Start**. Audits take 10 to 60 seconds each and run 20 at a time.
5. Open the **Output** tab. Switch views: Overview, Changes since last run, Core Web Vitals, Opportunities, CrUX field data. Click **Report** to open the full Lighthouse report.

Call it from code or CI with one HTTP request. It waits for the run and returns the rows:

```bash
curl -X POST "https://api.apify.com/v2/acts/rod_analytics~lighthouse-audit/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"urls": ["https://example.com", "https://example.com/pricing"], "strategy": "mobile"}'
```

In a GitHub Actions step, fail the build when a score drops:

```bash
SCORE=$(curl -s -X POST "https://api.apify.com/v2/acts/rod_analytics~lighthouse-audit/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' -d '{"urls": ["https://staging.example.com"]}' | jq '.[0].performanceScore')
[ "$SCORE" -ge 80 ] || { echo "Performance score $SCORE is under 80"; exit 1; }
```

### Audit a whole website from its sitemap

Paste the home page, for example `https://example.com`, into **Sitemaps or websites**. The Actor reads the `Sitemap:` lines in robots.txt, or tries `/sitemap.xml` and `/sitemap_index.xml`. You can also paste a sitemap URL directly. Sitemap indexes and `.xml.gz` files work.

**Max pages from sitemaps** caps the run, 100 by default. 100 pages on mobile cost $0.15. Reading the sitemap is free. Pages from the sitemap and from **URLs to audit** are merged and deduplicated.

### Monitor Core Web Vitals and page speed over time

Schedule the Actor daily or weekly in **Schedules** with the same input. From the second run on, every row has:

- `changes`: the difference to the previous run for each score, LCP, CLS and TBT.
- `regressed`: `true` when something got worse, `false` when nothing did, `null` on the first run.
- `regressions` and `improvements`: plain sentences such as `Performance score dropped from 92 to 78.`

A score counts as a regression when it drops by **Regression threshold** points, 5 by default. LCP, TBT and CLS count when they move to a worse Core Web Vitals band: good, needs improvement or poor. A page that worked last time and fails now is also a regression. This keeps normal Lighthouse noise out of your alerts.

The run status says how many pages regressed. Open the **Changes since last run** view, or get only the regressed rows from the API:

```bash
curl -s "https://api.apify.com/v2/datasets/<datasetId>/items?token=$APIFY_TOKEN" | jq '[.[] | select(.regressed == true)]'
```

#### Get regression alerts in Slack or Discord

Paste a webhook into **Regression alert webhook**. When a run finds regressions, the Actor posts one message with every regressed page and a link to the run:

```text
PageSpeed regressions: 2 of 40 compared audit(s) got worse since the previous run.
• https://example.com/ [mobile]: Performance score dropped from 92 to 81. LCP went from 2100 ms (good) to 4300 ms (poor).
• https://example.com/pricing [mobile]: The audit failed in this run. It worked on 2026-11-20.
Full results: https://console.apify.com/view/runs/...
```

- **Slack:** create an [incoming webhook](https://api.slack.com/messaging/webhooks) and paste its `https://hooks.slack.com/services/...` URL.
- **Discord:** open channel settings, then **Integrations**, then **Webhooks**, and copy the webhook URL.
- **Anything else:** any URL that accepts a JSON POST gets `text`, `compared`, `regressedCount`, `regressed` and `runUrl`. Use it with Make, Zapier, n8n or your own endpoint.

Runs without regressions send nothing and cost nothing extra. The first run only saves the baseline. If the webhook is down, the run still succeeds, the status says the alert was not sent, and nothing is charged for it.

The last result per URL, device and engine is kept in a key-value store named `lighthouse-audit-history` in your Apify account. Delete it to start a new baseline, or turn off **Compare with the previous run**. Comparing is free.

### Input example

Only `urls` or `sitemapUrls` is required.

```json
{
    "urls": ["https://apify.com", "https://web.dev"],
    "strategy": "both",
    "categories": ["performance", "seo"]
}
```

| Field                 | Default    | Description                                                                                 |
| --------------------- | ---------- | ------------------------------------------------------------------------------------------- |
| `urls`                |            | Pages to audit. Duplicates are removed.                                                     |
| `sitemapUrls`         | empty      | Sitemaps or home pages. The pages found are audited too.                                    |
| `maxSitemapUrls`      | `100`      | Most pages taken from all sitemaps together.                                                |
| `strategy`            | `mobile`   | `mobile`, `desktop` or `both`. Both means two audits per URL.                               |
| `categories`          | all four   | `performance`, `accessibility`, `best-practices`, `seo`.                                    |
| `engine`              | `psi`      | `psi` calls Google PageSpeed Insights, no key needed. `local` runs Chrome inside the Actor. |
| `psiApiKey`           | empty      | Optional. Your own free Google key for a private quota. Empty uses the shared key.          |
| `throttling`          | `simulate` | `simulate` like PageSpeed Insights, `devtools` applied throttling, `none` raw speed.        |
| `cpuSlowdown`         | `auto`     | Local engine only. Auto calibrates to the cloud CPU. `4` is the plain Lighthouse default.   |
| `maxConcurrency`      | 20 or 1    | Parallel audits. 20 for PSI, 1 for local.                                                   |
| `includeFullReport`   | `true`     | Save the full HTML report to the key-value store.                                           |
| `includeJsonReport`   | `false`    | Also save the raw Lighthouse JSON, linked in `reportJsonUrl`.                               |
| `maxOpportunities`    | `10`       | Top opportunities per audit.                                                                |
| `timeoutSecs`         | `90`       | Hard limit per audit. Failed audits are retried once and never charged.                     |
| `compareWithPrevious` | `true`     | Compare each audit with the previous run of the same URL and device.                        |
| `regressionThreshold` | `5`        | Score drop in points that counts as a regression.                                           |
| `alertWebhookUrl`     | empty      | Slack, Discord or JSON webhook. Gets one summary when a run finds regressions.              |

### Output sample

Real result for apify.com on mobile, shortened. Download the dataset as JSON, CSV, Excel or HTML.

```json
{
    "url": "https://apify.com/",
    "strategy": "mobile",
    "engine": "psi",
    "performanceScore": 40,
    "accessibilityScore": 100,
    "bestPracticesScore": 96,
    "seoScore": 85,
    "lcpMs": 8551,
    "cls": 0.002,
    "tbtMs": 1279,
    "inpMs": 389,
    "fcpMs": 2701,
    "ttfbMs": 116,
    "speedIndexMs": 7300,
    "totalByteWeight": 4965534,
    "opportunities": [
        {
            "id": "mainthread-work-breakdown",
            "title": "Minimize main-thread work",
            "savingsMs": 1300,
            "displayValue": "5.4 s"
        },
        { "id": "bootup-time", "title": "Reduce JavaScript execution time", "savingsMs": 1250, "displayValue": "3.1 s" }
    ],
    "failedAuditsCount": 21,
    "fieldData": {
        "scope": "url",
        "overallCategory": "AVERAGE",
        "lcpMs": 2466,
        "lcpCategory": "FAST",
        "cls": 0.02,
        "inpMs": 389,
        "inpCategory": "AVERAGE",
        "ttfbMs": 1378
    },
    "reportUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/lh-apify-com-<hash>-mobile.html?signature=...",
    "lighthouseVersion": "13.5.0",
    "durationSecs": 30.4,
    "error": null
}
```

| Field                                            | Meaning                                                                 |
| ------------------------------------------------ | ----------------------------------------------------------------------- |
| `performanceScore` ... `seoScore`                | Lighthouse category scores, 0 to 100                                    |
| `lcpMs`, `cls`, `tbtMs`, `fcpMs`, `speedIndexMs` | Lab metrics from Lighthouse                                             |
| `ttfbMs`                                         | Server response time of the main document                               |
| `inpMs`                                          | Interaction to Next Paint, p75 from CrUX. Lab audits cannot measure INP |
| `opportunities`                                  | Top failing performance audits sorted by estimated time savings         |
| `failedAuditsCount`, `failedAudits`              | Audits scoring under 0.9 in the selected categories                     |
| `fieldData`                                      | CrUX real user data, URL level or origin fallback. Null for small sites |
| `reportUrl`, `reportJsonUrl`                     | Full HTML report, and raw JSON when `includeJsonReport` is on           |
| `changes`, `previousAuditedAt`                   | Difference to the previous run of the same URL and device               |
| `regressed`, `regressions`, `improvements`       | What got worse or better since the previous run                         |
| `error`, `errorCode`, `howToFix`                 | Why an audit failed, or what to change when the input could not be used |

### Pricing

Pay per event. You pay only for **successful audits**. Failed, blocked and unreachable URLs are free. The price is the same with the shared key and with your own key.

| Event                               | Free tier | Bronze   | Silver  | Gold     |
| ----------------------------------- | --------- | -------- | ------- | -------- |
| PageSpeed audit, per URL and device | $0.0015   | $0.00135 | $0.0012 | $0.00105 |
| Local Lighthouse audit in Chrome    | $0.05     | $0.045   | $0.04   | $0.035   |
| Run start, per GB of memory         | $0.001    | $0.001   | $0.001  | $0.001   |
| Regression alert sent to a webhook  | $0.01     | $0.009   | $0.008  | $0.007   |

- 1,000 PageSpeed audits cost $1.50 on the free tier and $1.05 on Gold.
- Regression alerts are optional and free until 28 November 2026. A run sends at most one alert, and only when something got worse.
- Your discount tier follows your Apify subscription plan.
- The Apify free plan's $5 monthly credit covers about 3,000 PageSpeed audits.
- Set **Maximum cost per run** in Run options to cap spend. The Actor stops before the limit.

### Optional: your own PageSpeed Insights key

The shared key has Google's normal quota, shared by all users of this Actor. For large or frequent runs, use your own free key. It gives you 25,000 audits per day for yourself.

1. Open the [PageSpeed Insights API page](https://console.cloud.google.com/apis/library/pagespeedonline.googleapis.com) in Google Cloud Console. Sign in and create a project if asked.
2. Click **Enable**.
3. Open [Credentials](https://console.cloud.google.com/apis/credentials), click **Create credentials** and pick **API key**.
4. Paste it into **Your own PageSpeed Insights API key**. It is stored encrypted.

If your key is wrong, or the API is not enabled for its project, the run stops after the first request. It ends with one free error row and Google's message in the status. Only the run start is charged.

#### Local engine

Set **Engine** to `local` and **Memory** to **8 GB** in Run options. Lighthouse then runs in real Google Chrome inside the Actor, with no Google quota. Chrome needs about 2 CPU cores for credible scores. The Actor warns in the log when memory is under 4 GB. Keep `cpuSlowdown: auto` and concurrency 1.

### FAQ

**Do I need an API key?** No. The default engine uses a shared PageSpeed Insights key of this Actor. Your own key is optional and gives you a private quota.

**What if the shared key is busy?** Google limits requests per minute and per day. The Actor waits and retries on per-minute limits. If the daily quota is used up, the run ends with one free row that says so. Retry later or add your own key.

**Is this the same as PageSpeed Insights?** The PSI engine returns exactly what the PageSpeed Insights API returns, normalized into one row. The local engine uses the same Lighthouse and simulated throttling on different hardware, so its lab numbers will not match PSI exactly.

**Why is INP empty?** INP needs real user interactions, lab tests cannot measure it. It comes from CrUX field data, which exists only for pages with enough Chrome traffic. TBT is the lab proxy for INP.

**Why did a page fail with HTTP_ERROR_STATUS?** The page answered with an HTTP error such as 403 or 404, often a bot blocker. Lighthouse would only score the error page, so the audit is reported as failed and not charged. HTTP 429 from PSI means Google throttles tests of that site for a while. Retry later.

**Scores change between runs. Why?** This is normal for Lighthouse. The regression check ignores score moves under the threshold and metric moves inside one Core Web Vitals band, so small noise does not raise alerts.

**Can it audit pages behind a login?** No. Only public URLs.

**Is it legal?** You audit pages you choose, like running Lighthouse in your own browser. Lighthouse is open source under Apache 2.0. Audit only sites you are allowed to test and respect their terms.

Found a bug or need budgets or Slack alerts? Open an issue in the **Issues** tab.

### Related Actors

More tools from the same developer, built with the same pricing and output style.

| Actor                                                                                                               | What it does                                                                   |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [Website Content Crawler to Markdown for RAG & LLMs](https://apify.com/rod_analytics/website-to-markdown)           | Crawl whole websites into clean Markdown, RAG chunks and llms.txt              |
| [PDF to Markdown & Text Extractor with OCR](https://apify.com/rod_analytics/doc-to-markdown)                        | PDF, Word, Excel and PowerPoint files to Markdown and text, with OCR           |
| [SEO Audit Tool: Site Crawler, Broken Links & Score](https://apify.com/rod_analytics/seo-site-audit)                | Crawl a site and find broken links and on-page SEO issues                      |
| [Tech Stack Detector: Wappalyzer & BuiltWith Alternative](https://apify.com/rod_analytics/tech-stack-detector)      | Detect the CMS, frameworks, analytics and hosting of any website               |
| [Bulk Domain Lookup: DNS, WHOIS, SPF, DMARC & SSL](https://apify.com/rod_analytics/domain-security-audit)           | DNS, email security and SSL checks for a list of domains                       |
| [Speech to Text: Audio, Video & Podcast Transcriber](https://apify.com/rod_analytics/media-transcriber)             | Whisper transcripts, SRT and VTT subtitles from audio, video and podcast feeds |
| [Email Validator & Verifier: Bulk MX & Disposable Check](https://apify.com/rod_analytics/bulk-email-verifier)       | Check email lists for syntax, MX records and disposable domains                |
| [Website Contact Scraper: Emails, Phones & Social Links](https://apify.com/rod_analytics/company-contact-extractor) | Find emails, phone numbers and social profiles on company websites             |
| [VIES VAT Checker & EU Company Registry Lookup](https://apify.com/rod_analytics/eu-company-lookup)                  | Validate EU VAT numbers and look up company registry data                      |
| [Companies House Scraper: UK Company Search, No API Key](https://apify.com/rod_analytics/uk-companies-house)        | Search UK companies and get profiles and officers                              |
| [EU TED Tenders Scraper & Alerts: Public Procurement](https://apify.com/rod_analytics/ted-tenders)                  | EU public procurement notices and awards from TED                              |
| [Greenhouse, Lever & Ashby Job Scraper: 8 ATS in One Feed](https://apify.com/rod_analytics/multi-ats-jobs-api)      | Job postings from 7 applicant tracking systems in one schema                   |
| [GitHub Scraper: Repo Stats, Stars, Trending & Search](https://apify.com/rod_analytics/github-repo-stats)           | Repository stats, stars, trending repos and search results                     |

# Changelog

This Actor's version history is a separate document: https://apify.com/rod_analytics/lighthouse-audit/changelog.md

# Actor input Schema

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

Pages to audit with Lighthouse. One URL per line. Missing https:// is added automatically. Duplicates are removed. Leave empty when you use "Sitemaps or websites".

## `sitemapUrls` (type: `array`):

Audit a whole site without listing pages. Paste a sitemap URL (sitemap.xml, a sitemap index or .xml.gz) or just the home page, for example https://example.com. For a home page the Actor finds the sitemap in robots.txt or at /sitemap.xml. Pages found are audited together with "URLs to audit". Reading sitemaps is free, you pay only per audit.

## `maxSitemapUrls` (type: `integer`):

Upper limit of pages taken from all sitemaps together, in sitemap order. Keeps the cost of big sites predictable: 100 pages cost $0.15 on mobile.

## `strategy` (type: `string`):

Mobile uses a Moto G Power profile with slow 4G throttling, like PageSpeed Insights. Desktop uses a desktop profile. Both runs two audits per URL.

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

Lighthouse categories to run. Fewer categories make audits a bit faster.

## `engine` (type: `string`):

PSI (default) runs Google PageSpeed Insights. No API key needed: the Actor uses its own shared key, or yours if you paste one below. 512 MB memory is enough and you get real user CrUX field data. Local runs Lighthouse in real Chrome inside the Actor, with no Google quota. Local needs 8 GB memory (set it in Run options) for credible scores.

## `psiApiKey` (type: `string`):

Optional. Leave empty to use the Actor's shared key. Your own free Google key gives you a private quota of 25,000 audits per day, so big or frequent runs never wait for the shared quota. Takes 2 minutes: 1) Open the <a href='https://console.cloud.google.com/apis/library/pagespeedonline.googleapis.com'>PageSpeed Insights API page</a> in Google Cloud Console and click Enable (create a project if asked). 2) Open <a href='https://console.cloud.google.com/apis/credentials'>Credentials</a>, click Create credentials > API key. 3) Paste the key here. Stored encrypted. Same price per audit with either key.

## `throttling` (type: `string`):

Simulate (default) matches PageSpeed Insights and is the most stable. DevTools applies real network and CPU throttling and is slower. None measures raw speed from the Apify data center.

## `cpuSlowdown` (type: `string`):

Auto measures the CPU of the cloud machine and scales the Lighthouse 4x mobile CPU slowdown so Total Blocking Time is closer to PageSpeed Insights. Pick 4 to use the plain Lighthouse default.

## `maxConcurrency` (type: `integer`):

How many audits run at the same time. Empty means 1 for the local engine and 20 for the PSI engine. Local engine: keep 1 for accurate scores, Chrome needs about 2 CPU cores (8 GB memory on Apify) per audit. Use 2 only with 16 GB. PSI engine: up to 20. Lower it if Google answers with quota errors.

## `includeFullReport` (type: `boolean`):

Save the full Lighthouse HTML report of every audit to the key-value store. The dataset item links to it in reportUrl.

## `includeJsonReport` (type: `boolean`):

Also save the raw Lighthouse JSON (LHR) of every audit, linked in reportJsonUrl. Only needed for your own tooling. The HTML report already contains the same data.

## `maxOpportunities` (type: `integer`):

How many top improvement opportunities to include, sorted by estimated time savings.

## `timeoutSecs` (type: `integer`):

Hard limit for one Lighthouse audit. Failed or timed out audits are retried once and are not charged.

## `compareWithPrevious` (type: `boolean`):

Compare every audit with the last run of the same URL, device and engine in your account. Adds changes, regressed, regressions and improvements to each row. The last results are kept in a key-value store named lighthouse-audit-history in your account. Delete it to start a new baseline. Free.

## `regressionThreshold` (type: `integer`):

How many points a Lighthouse score must drop to count as a regression. PageSpeed scores vary by a few points between runs, so 5 avoids most false alarms. LCP, TBT and CLS count when they move to a worse Core Web Vitals band: good, needs improvement or poor.

## `alertWebhookUrl` (type: `string`):

Get a message when pages get worse. Paste a Slack incoming webhook, a Discord webhook or any URL that accepts a JSON POST. When a run finds regressions, the Actor posts one summary with every regressed page and a link to the run. Runs without regressions send nothing. Free until 28 November 2026, then $0.01 per alert sent. Stored encrypted.

## Actor input object example

```json
{
  "urls": [
    "https://www.wikipedia.org"
  ],
  "maxSitemapUrls": 100,
  "strategy": "mobile",
  "categories": [
    "performance",
    "accessibility",
    "best-practices",
    "seo"
  ],
  "engine": "psi",
  "throttling": "simulate",
  "cpuSlowdown": "auto",
  "includeFullReport": true,
  "includeJsonReport": false,
  "maxOpportunities": 10,
  "timeoutSecs": 90,
  "compareWithPrevious": true,
  "regressionThreshold": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `reports` (type: `string`):

No description

# 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": [
        "https://www.wikipedia.org"
    ],
    "engine": "psi"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rod_analytics/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": ["https://www.wikipedia.org"],
    "engine": "psi",
}

# Run the Actor and wait for it to finish
run = client.actor("rod_analytics/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": [
    "https://www.wikipedia.org"
  ],
  "engine": "psi"
}' |
apify call rod_analytics/lighthouse-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rod_analytics/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/RatuAaIWL9RQ3xnfA/builds/PBSruakLATyF0rqyM/openapi.json
