# PageSpeed Insights API – Website Speed Test & Core Web Vitals (`rowfeed/pagespeed-insights-api`) Actor

Run Google PageSpeed Insights on a list of URLs: Lighthouse performance, accessibility, best-practices and SEO scores, LCP, CLS, TBT and INP, real-user Chrome data, Core Web Vitals pass/fail and the top slow-downs. Mobile and desktop.

- **URL**: https://apify.com/rowfeed/pagespeed-insights-api.md
- **Developed by:** [Rowfeed](https://apify.com/rowfeed) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 page testeds

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/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

## PageSpeed Insights API – Website Speed Test & Core Web Vitals

Run Google PageSpeed Insights on a list of pages and get one clean row per page: the four Lighthouse scores (performance, accessibility, best practices, SEO), lab speed metrics (LCP, FCP, TBT, CLS, Speed Index), real-user Chrome data (LCP, INP, CLS) with a Core Web Vitals pass/fail, and the biggest slow-downs with the time each one costs. Mobile, desktop or both.
Built for SEO audits, agencies reporting on client sites, developers checking releases and anyone tracking site speed over time. A bulk PageSpeed Insights tool: no Google API key or quota of your own needed.

### What you get

- **Lighthouse scores 0-100:** `performance_score`, `accessibility_score`, `best_practices_score`, `seo_score`.
- **Lab metrics** from a fresh Lighthouse test: `lcp_ms`, `fcp_ms`, `tbt_ms`, `cls`, `speed_index_ms`, `tti_ms`, `server_response_ms`.
- **Real-user field data** from the Chrome UX Report (last 28 days): `field_lcp_ms`, `field_inp_ms`, `field_cls`, `field_fcp_ms`, `field_ttfb_ms`, each with a FAST / AVERAGE / SLOW rating. When a page has too little traffic, the whole site's data is used (`field_data_source: "origin"`); when the site has too little traffic too, it is `null`.
- **`passes_core_web_vitals`:** true when real users get LCP ≤ 2.5 s, INP ≤ 200 ms and CLS ≤ 0.1.
- **`top_issues`:** the five biggest slow-downs (unused JavaScript, render-blocking requests, image delivery, ...) with estimated savings in milliseconds.

### Example output

```json
{
  "url": "https://www.fender.com/",
  "final_url": "https://www.fender.com/",
  "device": "mobile",
  "performance_score": 32,
  "accessibility_score": 100,
  "best_practices_score": 73,
  "seo_score": 85,
  "lcp_ms": 17808,
  "fcp_ms": 2605,
  "tbt_ms": 3620,
  "cls": 0.011,
  "speed_index_ms": 11878,
  "tti_ms": 28813,
  "server_response_ms": 11,
  "field_data_source": "url",
  "field_lcp_ms": 3472,
  "field_lcp_rating": "AVERAGE",
  "field_inp_ms": 265,
  "field_inp_rating": "AVERAGE",
  "field_cls": 0.03,
  "field_cls_rating": "FAST",
  "field_fcp_ms": 1565,
  "field_fcp_rating": "FAST",
  "field_ttfb_ms": 671,
  "field_ttfb_rating": "FAST",
  "passes_core_web_vitals": false,
  "top_issues": [
    { "id": "unused-javascript", "title": "Reduce unused JavaScript", "savings_ms": 4500 },
    { "id": "mainthread-work-breakdown", "title": "Minimize main-thread work", "savings_ms": 3600 },
    { "id": "bootup-time", "title": "Reduce JavaScript execution time", "savings_ms": 3350 }
  ],
  "lighthouse_version": "13.6.0",
  "checked_at": "2026-10-30T10:52:00+00:00"
}
```

### Input

| Field | What it does |
|---|---|
| `urls` | Pages to test, e.g. `https://example.com/` or `example.com/pricing`. Up to 1,000 per run. |
| `device` | `mobile` (default, what Google ranks on), `desktop`, or `both` (two rows per page). |

### Pricing

Pay per event, no subscription:

- **$5 per 1,000 tests** ($0.005 per page per device). A page that cannot be tested (DNS error, site down) is free and comes back as an error row.
- $0.001 per run start.

Examples: 100 pages on mobile cost $0.501. 100 pages on mobile and desktop cost $1.001.
Cap the cost of a run with the maximum charge setting; the Actor never starts a test the budget cannot pay for.
On the free Apify plan a run does up to 5 tests (5 pages on one device); any paid plan lifts the limit.

### Good to know

- Each test is a real Lighthouse run by Google and takes 10 to 90 seconds; up to 8 pages are tested at the same time.
- Lab scores move a few points between runs, as they do on pagespeed.web.dev; the real-user field data is steadier.
- Runs from the API, n8n/Make/Zapier, AI agents through MCP (`rowfeed-seo-mcp`) or on a schedule to track speed over time.

### More SEO tools from Rowfeed

- [SEO Audit Tool & Website Crawler](https://apify.com/rowfeed/seo-site-audit) – titles, meta descriptions, H1, noindex, broken links and a 0-100 SEO score for every page.
- [Broken Link Checker](https://apify.com/rowfeed/broken-link-checker) – 404s, dead links, broken images and redirect chains on any website.
- [Sitemap URL Extractor](https://apify.com/rowfeed/sitemap-url-extractor) – every URL in a site's sitemaps, to feed into this test.
- [Keyword Research Tool](https://apify.com/rowfeed/keyword-search-volume) – search volume, CPC, keyword difficulty, intent and keyword ideas (Google & Bing).
- [Competitor Keyword Research](https://apify.com/rowfeed/competitor-keywords) – every Google keyword any website ranks for, with position, volume and traffic.
- [SERP API & Rank Checker](https://apify.com/rowfeed/google-serp-api) – Google results for any keyword and country, with your domain's position.
- [Backlinks Checker](https://apify.com/rowfeed/backlink-checker) – referring domains, anchors, dofollow and link strength of any site.
- [Website Traffic & Domain Authority Checker](https://apify.com/rowfeed/website-traffic-checker) – traffic estimate and authority for up to 10,000 domains.
- [AI Search Visibility Tracker](https://apify.com/rowfeed/ai-search-visibility-tracker) – is your brand named and cited by ChatGPT, Gemini, Perplexity and Google AI Mode.
- [WHOIS Lookup & Domain Checker](https://apify.com/rowfeed/domain-rdap-checker) – domain age, expiry, registrar and DNS in bulk.
- [DA PA Checker](https://apify.com/rowfeed/da-pa-checker) – domain authority, page authority and spam score for up to 10,000 domains or URLs.

Uses Google's official PageSpeed Insights API. Not affiliated with Google.

# Actor input Schema

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

Web pages to test, e.g. https://example.com/ or example.com/pricing. Up to 1,000 per run. Each page is tested once per device.

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

Test as a mobile phone (what Google ranks on), a desktop computer, or both (two rows per page).

## Actor input object example

```json
{
  "urls": [
    "https://example.com/",
    "https://example.com/pricing"
  ],
  "device": "mobile"
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

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