Overview
Google PageSpeed Insights (PSI) is a web performance analysis tool developed by Google that assesses the performance of web pages on both mobile and desktop devices. Launched in 2010, its primary function is to provide developers with actionable recommendations to enhance page load times, responsiveness, and overall user experience. The tool aggregates data from various sources, including Lighthouse, a Google open-source auditing tool, and the Chrome User Experience Report (CrUX), which captures real-world user metrics developers.google.com/search.
PSI generates a performance score ranging from 0 to 100, categorizing performance as Poor (0-49), Needs Improvement (50-89), or Good (90-100). This score is derived from an analysis of various metrics, including the Core Web Vitals: Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), and Interaction to Next Paint (INP) webmasters.googleblog.com. These metrics are crucial indicators of a page's loading experience, visual stability, and interactivity, respectively.
PSI presents two types of data: Field Data and Lab Data. Field Data, sourced from the CrUX dataset, reflects real user experiences over the previous 28 days for a given URL. This provides a realistic view of how actual users encounter the page. Lab Data, generated by Lighthouse in a simulated environment, offers a controlled and reproducible performance audit. This distinction is vital for developers, as Lab Data can help identify issues during development before they impact real users, while Field Data confirms the actual impact of optimizations developers.google.com/speed/docs.
The tool is particularly useful for web developers, SEO specialists, and technical buyers who need to benchmark website performance, diagnose bottlenecks, and ensure their sites meet modern performance standards. Its integration with Google Search's ranking signals, particularly through Core Web Vitals, makes it a critical resource for maintaining search visibility developers.google.com/search/docs. The PageSpeed Insights API allows for programmatic access to this data, enabling automated performance monitoring and integration into CI/CD pipelines.
Key features
- Performance Scoring: Provides a numerical score (0-100) indicating page performance, categorized as Poor, Needs Improvement, or Good.
- Core Web Vitals Assessment: Reports on Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), and Interaction to Next Paint (INP) based on both field and lab data.
- Field Data (CrUX): Displays real-world user experience data collected from the Chrome User Experience Report for eligible URLs.
- Lab Data (Lighthouse): Conducts a simulated audit of the page's performance in a controlled environment, providing reproducible results.
- Optimization Recommendations: Offers specific suggestions to improve performance, such as optimizing images, deferring offscreen images, enabling text compression, and reducing server response times.
- Diagnostic Information: Details performance issues, including render-blocking resources, unminified CSS/JavaScript, and excessive DOM size.
- PageSpeed Insights API: Provides programmatic access to performance data, allowing for automated testing and integration into custom workflows developers.google.com/speed/docs.
- Mobile and Desktop Analysis: Evaluates performance independently for both mobile and desktop user agents, reflecting different network conditions and device capabilities.
Pricing
Google PageSpeed Insights is available free of charge. Access to the web interface is unlimited, allowing users to analyze any public URL without cost. The PageSpeed Insights API is also free for standard usage, though it operates under rate limits. These limits are typically sufficient for most development and monitoring needs.
| Service Component | Pricing Model | Details | As-of Date |
|---|---|---|---|
| PageSpeed Insights (web interface) | Free | Unlimited usage for manual URL analysis. | May 2026 |
| PageSpeed Insights API | Free with rate limits | Standard usage is free. Rate limits apply per project/user. Refer to Google Cloud documentation for specific quotas developers.google.com/speed/docs. | May 2026 |
Common integrations
- Google Search Console: Performance data, including Core Web Vitals, is surfaced directly within Search Console to help identify pages with user experience issues support.google.com/webmasters.
- Lighthouse: PSI leverages Lighthouse as its underlying engine for generating lab data and recommendations. Developers can run Lighthouse directly within Chrome DevTools developers.google.com/web/tools/lighthouse.
- Chrome User Experience Report (CrUX): PSI integrates CrUX data to provide real-world performance metrics. CrUX data is also available via BigQuery for advanced analysis developers.google.com/web/tools/chrome-ux-report.
- Custom Monitoring Tools: The PageSpeed Insights API allows developers to integrate performance checks into custom dashboards, CI/CD pipelines, or automated reporting systems using languages like Node.js, Python, or PHP.
- WordPress Plugins: Some WordPress plugins, such as Yoast SEO, may offer basic integrations or reporting features that pull in PageSpeed Insights data or link directly to the tool for analysis yoast.com.
Alternatives
- GTmetrix: Offers detailed performance reports using Lighthouse and other tools, focusing on specific recommendations and historical tracking gtmetrix.com.
- Pingdom: Provides website monitoring, performance testing, and uptime checks with global testing locations and user experience insights pingdom.com.
- WebPageTest: An open-source tool for running detailed performance tests from multiple locations using real browsers, offering waterfall charts and video capture www.webpagetest.org.
- Semrush Site Audit: Part of a broader SEO suite, it includes technical SEO audits that cover site speed and performance issues alongside other factors semrush.com.
Getting started
To get started with the PageSpeed Insights API, you can make a simple HTTP GET request. The API requires an API key, which can be obtained from the Google Cloud Console. Here's an example using Node.js to fetch performance data for a given URL:
const fetch = require('node-fetch');
const API_KEY = 'YOUR_API_KEY'; // Replace with your actual API key
const URL_TO_ANALYZE = 'https://www.example.com';
async function getPageSpeedInsightsData(url, strategy = 'desktop') {
const apiUrl = `https://www.googleapis.com/pagespeedinsights/v5/runPagespeed?url=${encodeURIComponent(url)}&strategy=${strategy}&key=${API_KEY}`;
try {
const response = await fetch(apiUrl);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log(`Performance Score (${strategy}):`, data.lighthouseResult.categories.performance.score * 100);
console.log('Largest Contentful Paint (LCP):', data.lighthouseResult.audits['largest-contentful-paint'].displayValue);
console.log('Cumulative Layout Shift (CLS):', data.lighthouseResult.audits['cumulative-layout-shift'].displayValue);
console.log('Interaction to Next Paint (INP):', data.lighthouseResult.audits['interaction-to-next-paint'].displayValue);
// You can parse more data as needed
} catch (error) {
console.error('Error fetching PageSpeed Insights data:', error);
}
}
// Run the analysis
getPageSpeedInsightsData(URL_TO_ANALYZE, 'desktop');
getPageSpeedInsightsData(URL_TO_ANALYZE, 'mobile');
Before running this code, ensure you have Node.js installed and have installed the node-fetch package (npm install node-fetch). Replace YOUR_API_KEY with an API key generated in the Google Cloud Console, and https://www.example.com with the URL you wish to analyze. The strategy parameter can be set to 'desktop' or 'mobile' to specify the device type for the analysis developers.google.com/speed/docs.