Google PageSpeed

Use Google PageSpeed Insights to analyze a public URL with Lighthouse. Choose desktop or mobile strategy and a locale, then retrieve performance, accessibility, SEO, and best-practice results. Performance metrics include First Contentful Paint, Largest Contentful Paint, and Speed Index.

Pass scores and diagnostics into reporting or alerting steps. An automated accessibility audit identifies some issues; it does not establish complete accessibility conformance.

Create an API key

  1. Open the Google Cloud Console and create or select a project.
  2. Enable the PageSpeed Insights API in the API Library.
  3. Open Credentials and create an API key.
  4. Paste the key into the Sim block.

See Google's PageSpeed API setup for project and authentication requirements.

Use the block

Analyze web pages for performance, accessibility, SEO, and best practices using Google PageSpeed Insights API powered by Lighthouse.

Actions

Google PageSpeed Analyze

Analyze a webpage for performance, accessibility, SEO, and best practices using Google PageSpeed Insights.

Inputs and outputs

Input

ParameterTypeRequiredDescription
apiKeystringYesGoogle PageSpeed Insights API Key
urlstringYesThe URL of the webpage to analyze
categorystringNoLighthouse categories to analyze (comma-separated): performance, accessibility, best-practices, seo
strategystringNoAnalysis strategy: desktop or mobile
localestringNoLocale for results (e.g., en, fr, de)

Output

ParameterTypeDescription
finalUrlstringThe final URL after redirects
performanceScorenumberPerformance category score (0-1)
accessibilityScorenumberAccessibility category score (0-1)
bestPracticesScorenumberBest Practices category score (0-1)
seoScorenumberSEO category score (0-1)
firstContentfulPaintstringTime to First Contentful Paint (display value)
firstContentfulPaintMsnumberTime to First Contentful Paint in milliseconds
largestContentfulPaintstringTime to Largest Contentful Paint (display value)
largestContentfulPaintMsnumberTime to Largest Contentful Paint in milliseconds
totalBlockingTimestringTotal Blocking Time (display value)
totalBlockingTimeMsnumberTotal Blocking Time in milliseconds
cumulativeLayoutShiftstringCumulative Layout Shift (display value)
cumulativeLayoutShiftValuenumberCumulative Layout Shift numeric value
speedIndexstringSpeed Index (display value)
speedIndexMsnumberSpeed Index in milliseconds
interactivestringTime to Interactive (display value)
interactiveMsnumberTime to Interactive in milliseconds
overallCategorystringOverall loading experience category (FAST, AVERAGE, SLOW, or NONE)
analysisTimestampstringUTC timestamp of the analysis
lighthouseVersionstringVersion of Lighthouse used for the analysis