# 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
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 pagespeed & lighthouse audit queries

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dev00/google-pagespeed-insights-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/GEYPR6Udru9IYhWqZ/builds/s8i5cR0V1s062Ovvy/openapi.json
