PageSpeed Insights - Core Web Vitals & Real User Metrics avatar
PageSpeed Insights - Core Web Vitals & Real User Metrics

Pricing

from $0.01 / 1,000 results

Go to Apify Store
PageSpeed Insights - Core Web Vitals & Real User Metrics

PageSpeed Insights - Core Web Vitals & Real User Metrics

PageSpeed Insights actor uses Google's PageSpeed Insights API to get: Real-World Field Data from Chrome UX Report (CrUX) Lab Data from Lighthouse Core Web Vitals - LCP, FID/INP, CLS, FCP, TTFB, TBT Performance Scores - 0-100 scores for Performance, Accessibility, Best Practices, SEO Mobile & Desktop

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

John Rippy

John Rippy

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Get real-world performance data from Chrome users by John Rippy | johnrippy.link


What This Actor Does

The PageSpeed Insights actor provides access to Google's PageSpeed Insights API to get:

  • Real-World Field Data from Chrome UX Report (CrUX) - actual user experience metrics
  • Lab Data from Lighthouse - synthetic performance audits
  • Core Web Vitals - LCP, FID/INP, CLS, FCP, TTFB, TBT
  • Performance Scores - 0-100 scores for Performance, Accessibility, Best Practices, SEO
  • Mobile & Desktop analysis in a single run

Why Use This Actor?

Real User Data vs Lab Data

Most performance tools only give you lab data - synthetic tests run in controlled conditions. This actor gives you field data from the Chrome UX Report (CrUX), which represents actual user experiences from millions of Chrome users over a 28-day rolling window.

Data TypeSourceWhat It Tells You
Field DataCrUX (real Chrome users)How real visitors experience your site
Lab DataLighthouseControlled, reproducible benchmarks

Core Web Vitals Explained

MetricGoodNeeds ImprovementPoor
LCP (Largest Contentful Paint)≤2.5s2.5s - 4s>4s
FID (First Input Delay)≤100ms100ms - 300ms>300ms
INP (Interaction to Next Paint)≤200ms200ms - 500ms>500ms
CLS (Cumulative Layout Shift)≤0.10.1 - 0.25>0.25

Use Cases

  • SEO Audits - Core Web Vitals are a Google ranking factor
  • Performance Monitoring - Track real-user experience over time
  • Competitor Analysis - Compare your site's performance vs competitors
  • Client Reporting - Include CrUX data in SEO reports
  • Before/After Analysis - Measure impact of performance optimizations

Quick Start Examples

Example 1: Single URL Analysis

{
"url": "https://example.com",
"strategy": "both"
}

Example 2: Batch URL Analysis

{
"urls": [
"https://example.com",
"https://competitor1.com",
"https://competitor2.com"
],
"strategy": "mobile"
}

Example 3: With Webhook (Zapier/Make/n8n)

{
"url": "https://example.com",
"strategy": "both",
"webhookUrl": "https://hooks.zapier.com/hooks/catch/12345/abcdef/"
}

Example 4: Demo Mode (Free Testing)

{
"demoMode": true
}

Input Parameters

ParameterTypeRequiredDefaultDescription
demoModebooleanNofalseRun with sample data (free, no API calls)
urlstringNo*-Single URL to analyze
urlsarrayNo*-Array of URLs to analyze
strategystringNo"both"Device strategy: "mobile", "desktop", or "both"
apiKeystringNo-Your Google PageSpeed API key for higher rate limits
webhookUrlstringNo-Webhook URL for Zapier/Make/n8n integration

*Either url or urls is required (unless using demoMode)


Output Format

{
"url": "https://example.com",
"strategy": "mobile",
"timestamp": "2024-12-25T12:00:00.000Z",
"hasFieldData": true,
"performanceScore": 85,
"accessibilityScore": 92,
"bestPracticesScore": 100,
"seoScore": 98,
"coreWebVitals": {
"lcp": {
"value": 2.1,
"unit": "seconds",
"rating": "good",
"source": "field"
},
"fid": {
"value": 45,
"unit": "milliseconds",
"rating": "good",
"source": "field"
},
"cls": {
"value": 0.05,
"unit": "score",
"rating": "good",
"source": "field"
},
"fcp": {
"value": 1.2,
"unit": "seconds",
"rating": "good",
"source": "field"
},
"ttfb": {
"value": 0.4,
"unit": "seconds",
"rating": "good",
"source": "field"
},
"inp": {
"value": 120,
"unit": "milliseconds",
"rating": "good",
"source": "field"
}
},
"labData": {
"lcp": 2.3,
"tbt": 150,
"cls": 0.02,
"fcp": 1.4,
"speedIndex": 2.8
},
"audits": {
"passed": 42,
"failed": 3,
"opportunities": [
{
"id": "render-blocking-resources",
"title": "Eliminate render-blocking resources",
"potentialSavings": "1.2s"
}
]
}
}

Webhook Integration

Webhook Payload Format

When the analysis completes, results are POSTed to your webhook:

{
"event": "pagespeed_analysis_complete",
"timestamp": "2024-12-25T12:00:00.000Z",
"actor": "pagespeed-insights",
"runId": "abc123",
"urlsAnalyzed": 3,
"status": "success",
"results": [...]
}

Zapier Setup

  1. Create a new Zap with "Webhooks by Zapier" as trigger
  2. Select "Catch Hook"
  3. Copy the webhook URL
  4. Add to webhookUrl input parameter
  5. Add actions: Send to Google Sheets, Slack, email, etc.

API Usage

Using the Apify API

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('localhowl/pagespeed-insights').call({
urls: ['https://example.com', 'https://competitor.com'],
strategy: 'both'
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Using cURL

curl -X POST "https://api.apify.com/v2/acts/localhowl~pagespeed-insights/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"strategy": "mobile"
}'

Pricing

This actor uses the Google PageSpeed Insights API which is free for most usage. Apify platform usage is billed separately based on compute units used.

  • Demo Mode: Free (no API calls, uses sample data)
  • With API Key: Higher rate limits from Google
  • Without API Key: Standard rate limits apply

Limitations

  • Rate Limiting: Without an API key, Google limits requests. Add your own API key for higher limits.
  • CrUX Data Availability: Field data requires sufficient traffic to your site. New or low-traffic sites may only have lab data.
  • Historical Data: CrUX represents a 28-day rolling window, not point-in-time snapshots.

  • PageSpeed Intelligence - Combines PSI with Lighthouse, Tech Stack detection, and AI recommendations
  • Google Lighthouse Checker - Detailed Lighthouse audits with custom configurations

Built by John Rippy | johnrippy.link


Keywords

pagespeed insights, core web vitals, crux data, chrome ux report, lcp, fid, cls, inp, lighthouse, web performance, seo audit, page speed, google pagespeed api, website performance monitoring, real user metrics, field data