# Google Lighthouse Audit (`hulkscrape/google-lighthouse-audit`) Actor

A simple Google Lighthouse audit actor for a single URL. Generate performance, accessibility, SEO, and best practices reports with optional HTML, JSON, and CSV outputs. Fast, clean, and API-friendly for developers and automation workflows.

- **URL**: https://apify.com/hulkscrape/google-lighthouse-audit.md
- **Developed by:** [Kulwinder](https://apify.com/hulkscrape) (community)
- **Categories:** SEO tools, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 25 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## 🚦 Google Lighthouse Audit

Run Google Lighthouse audits for a single URL using Apify.

This actor generates performance, accessibility, best practices, and SEO reports with optional HTML, JSON, and CSV
outputs.

Designed to be simple, fast, and public-friendly.

### ✨ Features

- ✅ Single-URL Lighthouse audit
- 📱 Mobile or Desktop testing
- 📊 Select Lighthouse categories
- 🌐 Configurable throttling method
- 📁 Optional HTML, JSON, and CSV reports
- 📦 Structured summary dataset (scores + Core Web Vitals)
- 🧼 Clean output links in Apify UI

### 🧩 What this actor does

1. Launches Chrome
2. Runs Google Lighthouse against the provided URL
3. Collects:
   - Lighthouse scores
   - Core Web Vitals
   - Timing metrics
4. Saves selected reports to actor storage
5. Pushes a summary item to the default dataset

### ▶️ How to use

1. Open the actor
2. Enter the URL you want to audit
3. Choose device, categories, and throttling
4. Select which reports to save
5. Run the actor

### 🧾 Input configuration

##### Required

| Field | Description                                         |
|-------|-----------------------------------------------------|
| `url` | Fully qualified URL including protocol (`https://`) |

#### Optional settings

##### Device

| Option    | Description                      |
|-----------|----------------------------------|
| `mobile`  | Emulates mobile device (default) |
| `desktop` | Emulates desktop device          |

#### Categories

Select which Lighthouse categories to run:

- performance
- accessibility
- best-practices
- seo

Default: \["performance"]

#### Throttling

Controls how network conditions are applied:

| Value      | Description                                            |
|------------|--------------------------------------------------------|
| `simulate` | Lighthouse simulated throttling (default, recommended) |
| `provided` | Use real network conditions                            |
| `devtools` | DevTools network throttling                            |

#### Report options

Toggle which reports should be generated:

| Option           | Description                             | Default |
|------------------|-----------------------------------------|---------|
| `saveHtmlReport` | Full interactive Lighthouse HTML report | ❌ false |
| `saveJsonReport` | Complete Lighthouse JSON output         | ✅ true  |
| `saveCsvReport`  | CSV summary of scores & metrics         | ❌ false |

### 📤 Output

📁 Key-Value Store

Depending on selected options, the actor may save:

- report.html – Lighthouse HTML report
- report.json – Full Lighthouse JSON
- report.csv – CSV summary
- summary.json – Structured summary (always saved)

### 📊 Dataset output (summary)

```json
{
    "url": "https://example.com/",
    "finalUrl": "https://example.com/",
    "device": "mobile",
    "lighthouseVersion": "13.0.1",
    "throttling": "simulate",
    "scores": {
        "performance": 100,
        "accessibility": 96,
        "bestPractices": 92,
        "seo": 80
    },
    "coreWebVitals": {
        "FCP": 802.97,
        "LCP": 802.97,
        "TBT": 0,
        "CLS": 0,
        "SI": 802.97
    },
    "timings": {
        "total": 5298.67
    }
}
```

This makes the actor ideal for:

- Dashboards
- Monitoring
- CI/CD
- SEO tooling

### 🧠 Notes & limitations

- 🚫 This actor audits one URL per run
- 🌍 No proxy / geo testing (by design, for simplicity)
- 🔁 Scores may vary slightly between runs due to Lighthouse behavior

### 🛠️ Use cases

- Website performance checks
- SEO audits
- Core Web Vitals monitoring
- Regression testing
- Automated reporting

# Actor input Schema

## `url` (type: `string`):

Fully qualified URL including protocol (https://)

## `device` (type: `string`):

Run Lighthouse for mobile or desktop

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

Lighthouse categories to run

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

Network throttling preset

## `saveHtmlReport` (type: `boolean`):

Save the full Lighthouse HTML report to the actor storage for viewing in browser

## `saveJsonReport` (type: `boolean`):

Save the complete Lighthouse JSON output for programmatic analysis or integrations

## `saveCsvReport` (type: `boolean`):

Save a CSV summary of Lighthouse scores and core web vitals

## Actor input object example

```json
{
  "url": "https://example.com",
  "device": "mobile",
  "categories": [
    "performance"
  ],
  "throttling": "simulate",
  "saveHtmlReport": false,
  "saveJsonReport": true,
  "saveCsvReport": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Link to the dataset overview view containing summarized scraper results.

## `htmlReport` (type: `string`):

Interactive Lighthouse HTML report (if enabled)

## `jsonReport` (type: `string`):

Complete Lighthouse JSON output (if enabled)

## `csvReport` (type: `string`):

CSV summary of Lighthouse scores and Core Web Vitals (if enabled)

## `summary` (type: `string`):

Structured summary with scores, Core Web Vitals, and timings

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("hulkscrape/google-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("hulkscrape/google-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 '{}' |
apify call hulkscrape/google-lighthouse-audit --silent --output-dataset

```

## MCP server setup

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