# Google PageSpeed Insights & Lighthouse Scores API (`dev00/google-pagespeed-insights-api`) Actor

Extract Performance, Accessibility, Best Practices, SEO, and Agentic Browsing (2/2) scores alongside Core Web Vitals and detailed Audit Recommendations for any website URL. No API Key required.

- **URL**: https://apify.com/dev00/google-pagespeed-insights-api.md
- **Developed by:** [dev00](https://apify.com/dev00) (community)
- **Categories:** SEO tools
- **Features:** Limited permissions
- **Stats:** 163 total users, 41 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.00 / 1,000 pagespeed & lighthouse audit queries

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 PageSpeed Insights & Lighthouse Scores API

Extract 0–100 numerical Lighthouse audit scores (**Performance**, **Accessibility**, **Best Practices**, **SEO**, **Agentic Browsing 2/2**), **Core Web Vitals metrics**, and actionable **Audit Recommendations** (Accessibility Tree, Discernible Link Names, Reduce Unused JavaScript, Render Blocking Resources, etc.) for any website URL. Powered by Google's `nqfuif` and `LsX2he` RPC backend. **No API Key required**. 100% procedural User-Agent anti-blocking included.

***

### ✨ Key Features

- 📊 **Lighthouse Audit Scores** — Get exact 0–100 scores for Performance, Accessibility, Best Practices, and SEO.
- 🤖 **Agentic Browsing Status (2/2)** — Verification of AI agent readability, structured data, and schema metadata.
- 🛠️ **Detailed Audit Recommendations** — Specific actionable recommendations (e.g. *Accessibility tree is not well-formed*, *Links do not have a discernible name*, *Reduce unused JavaScript*).
- ⚡ **Core Web Vitals Breakdown** — Extracts FCP, LCP, CLS, TBT, TTFB, and Speed Index timing metrics.
- 📱 **Mobile & Desktop Benchmark Strategies** — Test websites across mobile phone and desktop computer form factors.
- 🛡️ **Procedural Anti-Blocking Randomization** — 100% dynamic User-Agent generation on every request (Chrome, Firefox, Safari across Mac, Windows, Linux, iOS, and Android).
- 🔐 **No API Keys or Registration Needed** — Unthrottled keyless RPC execution without daily 429 quota exhaustion.

***

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
| :--- | :--- | :--- | :--- | :--- |
| `url` | String | Yes | `https://apify.com` | Target website URL or domain to audit. |
| `strategy` | String | No | `mobile` | Form factor benchmark: `mobile` or `desktop`. |

#### Input Example (JSON):

```json
{
  "url": "https://apify.com",
  "strategy": "mobile"
}
```

***

### 📤 Output Format Example

```json
{
  "success": true,
  "url": "https://apify.com",
  "strategy": "mobile",
  "form_factor_code": 2,
  "job_id": "swqu97jjz7",
  "scores": {
    "performance": 88,
    "accessibility": 95,
    "best_practices": 96,
    "seo": 98,
    "agentic_browsing": "2/2"
  },
  "agentic_browsing": {
    "score": "2/2",
    "passed": true,
    "details": [
      {
        "check": "AI Agent Accessibility & Readability",
        "status": "Pass"
      },
      {
        "check": "Structured Data & Schema Metadata",
        "status": "Pass"
      }
    ]
  },
  "metrics": {
    "first_contentful_paint": "1.4 s",
    "largest_contentful_paint": "2.2 s",
    "total_blocking_time": "120 ms",
    "cumulative_layout_shift": "0.01",
    "speed_index": "1.9 s"
  },
  "recommendations": [
    {
      "category": "Accessibility",
      "title": "Accessibility tree is not well-formed",
      "description": "Ensure interactive elements and text nodes have valid ARIA roles and landmarks for assistive technologies and AI agents.",
      "score": 75,
      "displayValue": null
    },
    {
      "category": "Accessibility",
      "title": "Links do not have a discernible name",
      "description": "Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves navigation for visitors and screen readers.",
      "score": 80,
      "displayValue": null
    },
    {
      "category": "Performance",
      "title": "Reduce unused JavaScript",
      "description": "Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity.",
      "score": 63,
      "displayValue": "Est savings: 320 KiB"
    },
    {
      "category": "Performance",
      "title": "Eliminate render-blocking resources",
      "description": "Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles.",
      "score": 68,
      "displayValue": "Est savings: 150 ms"
    },
    {
      "category": "SEO",
      "title": "Document does not have a meta description",
      "description": "Meta descriptions may be included in search results to concisely summarize page content.",
      "score": 83,
      "displayValue": null
    }
  ],
  "web_ui_analysis_url": "https://pagespeed.web.dev/analysis?url=https%3A%2F%2Fapify.com",
  "timestamp": "2026-07-29T23:10:00.000Z"
}
```

***

### 🆚 Why PageSpeed Scores API vs. Standard Google API

| Feature | PageSpeed Scores API | Standard Google REST API |
| :--- | :--- | :--- |
| **API Key Requirement** | ⚡ Keyless (Zero API Key needed) | ❌ Mandatory API Key required |
| **Agentic Browsing (2/2)** | ✅ Included in JSON response | ❌ Not available in raw v5 API |
| **Audit Recommendations** | ✅ Included (Unused JS, ARIA, Links) | ❌ Raw unparsed audit trees |
| **Daily Quota Limits** | 🚀 Unthrottled Keyless RPC | 🐢 Strict 429 Rate Limits / Quotas |
| **Anti-Blocking** | ✅ 100% Procedural UA Randomization | ❌ Single IP / Key Rate Tracking |

***

### 💡 How To Use — Simple Workflow

1. **Enter URL** → Enter target website URL (e.g. `https://apify.com`).
2. **Select Strategy** → Select `mobile` or `desktop`.
3. **Run & Export** → Click **Start** to extract scores and export to JSON/CSV.

***

### 🙋 Frequently Asked Questions (FAQ)

**Q: Do I need a Google Cloud account or PageSpeed API key?**\
A: No!

**Q: Does the response include Agentic Browsing (2/2) and audit recommendations?**\
A: Yes! The response includes Agentic Browsing pass/fail verification along with failed audit recommendations like *Accessibility tree is not well-formed*, *Links do not have a discernible name*, and *Reduce unused JavaScript*.

***

### 🎯 Use Cases

- 📈 **SEO & Site Audit Automation** — Benchmark performance, SEO, accessibility, and AI agent readability across client websites.
- ⚡ **Core Web Vitals & Audit Recommendations** — Extract FCP, LCP, CLS, TBT, and script optimization savings.
- 📊 **Lead Qualification & Auditing** — Audit potential client domains during sales discovery.

***

### 🔍 Keywords & Tags

`pagespeed api`, `google pagespeed`, `lighthouse api`, `agentic browsing`, `performance score`, `seo score`, `accessibility score`, `reduce unused javascript`, `core web vitals`

# Actor input Schema

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

Target website URL or domain to audit (e.g., https://apify.com or https://namecheap.com).

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

Device strategy benchmark: Mobile or Desktop.

## Actor input object example

```json
{
  "url": "https://apify.com",
  "strategy": "mobile"
}
```

# Actor output Schema

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

No description

## `keyValueStoreResult` (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 = {
    "url": "https://apify.com",
    "strategy": "mobile"
};

// Run the Actor and wait for it to finish
const run = await client.actor("dev00/google-pagespeed-insights-api").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 = {
    "url": "https://apify.com",
    "strategy": "mobile",
}

# Run the Actor and wait for it to finish
run = client.actor("dev00/google-pagespeed-insights-api").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 '{
  "url": "https://apify.com",
  "strategy": "mobile"
}' |
apify call dev00/google-pagespeed-insights-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dev00/google-pagespeed-insights-api"
        }
    }
}
```

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/GEYPR6Udru9IYhWqZ/builds/s8i5cR0V1s062Ovvy/openapi.json
