Google PageSpeed Insights icon

Google PageSpeed Insights

Analyze website performance, accessibility, and SEO using Google PageSpeed Insights API

Overview

This node integrates with the Google PageSpeed Insights API to analyze multiple website URLs in batch. It evaluates various aspects of web pages such as performance, accessibility, SEO, and best practices. The node is useful for web developers, SEO specialists, and digital marketers who want to automate the assessment of multiple websites or pages at once, helping them identify optimization opportunities and monitor improvements over time.

Typical use cases include:

  • Running bulk audits on a list of URLs to generate performance and SEO reports.
  • Comparing mobile vs desktop versions of multiple pages.
  • Automating regular checks of website health across many pages.
  • Extracting actionable insights from multiple URLs to prioritize fixes.

For example, a user can input a list of product page URLs to analyze their loading speed and SEO compliance simultaneously, receiving structured results for each URL.

Properties

Name Meaning
URLs Multiple URLs to analyze. Each URL will be processed separately. Example: https://example.com, https://example.com/page2
Strategy The analysis strategy to use. Options: Desktop (analyze desktop version), Mobile (analyze mobile version), Both (analyze both desktop and mobile). Mobile-first is recommended for modern web development.
Categories Categories to analyze. Options include: Performance (performance metrics and Core Web Vitals), Accessibility (WCAG compliance), Best Practices (web dev best practices), SEO (search engine optimization).
Additional Options Collection of optional settings:
- Locale Language locale for localized formatted results. Supported locales include English, Spanish, French, German, Italian, Portuguese, Japanese, Korean, Simplified Chinese, Traditional Chinese, Russian, Dutch.
- Include Screenshot Whether to include a screenshot of the analyzed page in the results (true or false).
- Output Format Level of detail in the response. Options: Complete (all data including audits and metrics), Scores Only (only category scores), Core Metrics (scores and core web vitals), Summary (scores, metrics, key recs).
- Skip Content Validation Skip checking if URLs return HTML content. Useful when analyzing XML or API endpoints but may cause errors if used improperly.
- Retry Attempts Number of retry attempts for failed requests (0 to 5).
- Custom Timeout Custom timeout for API requests in seconds (10 to 300). Default is 60 seconds.

Output

The node outputs an array of JSON objects, one per analyzed URL. Each object contains detailed analysis results depending on the selected output format:

  • Complete: Full audit data including individual metrics, diagnostics, and recommendations.
  • Scores Only: Summary scores for each selected category.
  • Core Metrics: Scores plus Core Web Vitals metrics.
  • Summary: Scores, key metrics, and highlighted recommendations.

Additionally, if enabled, a screenshot of the analyzed page is included in the output.

Each output JSON also includes metadata about the execution such as:

  • Node version
  • Execution timestamp
  • Operation type
  • Total number of results returned

If binary data (screenshots) are included, they represent visual captures of the analyzed pages.

Dependencies

  • Requires a valid Google PageSpeed Insights API key credential configured in n8n.
  • Network access to Google APIs.
  • No additional external dependencies beyond the Google API and standard n8n environment.

Troubleshooting

  • Missing API Key: The node throws an error if no API key is found in credentials. Ensure you have configured a valid Google PageSpeed API key.
  • API Key Validation Warning: If the API key validation fails, the node logs a warning but continues execution. Verify your API key permissions and quota.
  • URL Format Issues: URLs should be properly formatted; the node adds protocol automatically if missing. Invalid URLs may cause request failures.
  • Timeouts and Retries: Long-running analyses might hit timeouts. Adjust the "Custom Timeout" and "Retry Attempts" properties accordingly.
  • Content Validation Skipped: Enabling "Skip Content Validation" may cause errors if non-HTML content is analyzed. Use this option only for XML/API endpoints.
  • Quota Limits: Analyzing many URLs or frequent runs may exhaust API quotas. Limit the number of URLs or frequency to avoid quota errors.

Common error message example:

PageSpeed Insights analysis failed: <error message>. Please check your API key, URL format, and network connection.

Resolution steps:

  • Confirm API key validity and permissions.
  • Check URL correctness.
  • Ensure stable internet connectivity.

Links and References

Discussion