# Google PageSpeed (/integrations/google_pagespeed)





{/* MANUAL-CONTENT-START:intro */}

Use [Google PageSpeed Insights](https://pagespeed.web.dev/) 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 [#getting-your-api-key]

1. Open the [Google Cloud Console](https://console.cloud.google.com/) 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](https://developers.google.com/speed/docs/insights/v5/get-started) for project and authentication requirements.

{/* MANUAL-CONTENT-END */}

## Use the block [#usage-instructions]

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

## Actions [#actions]

### Google PageSpeed Analyze [#google-pagespeed-analyze]

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

<ReferenceDetails>
  #### Input [#input]

  | Parameter | Type | Required | Description |
  | - | - | - | - |
  | `apiKey` | string | Yes | Google PageSpeed Insights API Key |
  | `url` | string | Yes | The URL of the webpage to analyze |
  | `category` | string | No | Lighthouse categories to analyze (comma-separated): performance, accessibility, best-practices, seo |
  | `strategy` | string | No | Analysis strategy: desktop or mobile |
  | `locale` | string | No | Locale for results (e.g., en, fr, de) |

  #### Output [#output]

  | Parameter | Type | Description |
  | - | - | - |
  | `finalUrl` | string | The final URL after redirects |
  | `performanceScore` | number | Performance category score (0-1) |
  | `accessibilityScore` | number | Accessibility category score (0-1) |
  | `bestPracticesScore` | number | Best Practices category score (0-1) |
  | `seoScore` | number | SEO category score (0-1) |
  | `firstContentfulPaint` | string | Time to First Contentful Paint (display value) |
  | `firstContentfulPaintMs` | number | Time to First Contentful Paint in milliseconds |
  | `largestContentfulPaint` | string | Time to Largest Contentful Paint (display value) |
  | `largestContentfulPaintMs` | number | Time to Largest Contentful Paint in milliseconds |
  | `totalBlockingTime` | string | Total Blocking Time (display value) |
  | `totalBlockingTimeMs` | number | Total Blocking Time in milliseconds |
  | `cumulativeLayoutShift` | string | Cumulative Layout Shift (display value) |
  | `cumulativeLayoutShiftValue` | number | Cumulative Layout Shift numeric value |
  | `speedIndex` | string | Speed Index (display value) |
  | `speedIndexMs` | number | Speed Index in milliseconds |
  | `interactive` | string | Time to Interactive (display value) |
  | `interactiveMs` | number | Time to Interactive in milliseconds |
  | `overallCategory` | string | Overall loading experience category (FAST, AVERAGE, SLOW, or NONE) |
  | `analysisTimestamp` | string | UTC timestamp of the analysis |
  | `lighthouseVersion` | string | Version of Lighthouse used for the analysis |
</ReferenceDetails>
