Skip to content

PageSpeed Insights

FAT Agent can integrate with Google's PageSpeed Insights API as an alternative to local Lighthouse runs. This is useful in CI environments where installing Chrome is impractical.


Usage

When running an audit, FAT Agent can use PageSpeed Insights if configured:

You: Audit https://example.com using PageSpeed Insights

Or from the analysis pipeline, Lighthouse results can be supplemented with PSI data.

API Access

PageSpeed Insights API is free with rate limits. For higher throughput, provide a Google API key:

export PAGESPEED_API_KEY=your-api-key-here

What It Provides

Metric Description
Performance Score Overall Lighthouse performance score (0--100)
FCP First Contentful Paint
LCP Largest Contentful Paint
TBT Total Blocking Time
CLS Cumulative Layout Shift
Speed Index How quickly content is visually displayed

Differences from Local Lighthouse

Aspect Local Lighthouse PageSpeed Insights
Network Your connection Google's servers
Consistency Varies by machine Consistent infrastructure
Throttling Configurable Fixed presets
Real User Data No Yes (CrUX data when available)
Rate Limits None 25,000/day free

When to Use

  • CI/CD pipelines where installing Chrome is difficult
  • Remote audits where you want consistent network conditions
  • CrUX data when you need real-user performance data
  • Quick checks without local Lighthouse setup