PageSpeed Insights Setup
Why Orino needs your own key
Section titled “Why Orino needs your own key”Performance checks for LCP, CLS, INP, and TTFB come from Google’s PageSpeed Insights API. Without a key, requests use Google’s shared anonymous quota, which is tiny and often exhausted after a single audit.
Orino does not provide a shared key. Every user authenticates with their own free key. This is standard practice for CLI tools built on Google APIs, not a limitation specific to Orino.
Get your free key
Section titled “Get your free key”- Go to console.cloud.google.com
- Create a project, or select an existing one
- Search for PageSpeed Insights API in the API library
- Click Enable
- Go to APIs & Services, then Credentials
- Click Create Credentials, then API Key
- Copy the key
Optional: restrict the key to PSI only
- Click the key, go to API restrictions, click Restrict key, select PageSpeed Insights API, and click Save
Restricting the key limits what an attacker can do if it ever leaks. An unrestricted key can be used against any Google API billed to your account.
Use the key
Section titled “Use the key”Per command
npx orino-cli audit --url https://yoursite.com --psi-key YOUR_KEYPersistent (recommended)
export ORINO_PSI_KEY=your_key_hereAdd that line to ~/.zshrc or ~/.bashrc. Once set, every audit picks it up automatically with no flag needed.
What happens without a key
Section titled “What happens without a key”The audit still runs and completes. The four live performance checks (LCP, CLS, INP, and TTFB) are skipped rather than failed. The terminal shows PageSpeed API unavailable — performance checks skipped next to each one.
Codebase performance checks (hero image lazy loading, missing fetchpriority, raw <img> tags, and images without explicit dimensions) still run regardless of whether a key is present. Only the PSI-dependent metrics are affected.
Skipped checks are excluded from both sides of the score calculation. They do not penalise your score.
Troubleshooting
Section titled “Troubleshooting”| Error | Cause | Fix |
|---|---|---|
| 429 without a key | Shared anonymous quota exhausted | Get a free API key |
| 429 with a key | Daily quota for that Google Cloud project exceeded | Wait 24 hours, or create a second project |
| 403 | API not enabled on the project, or key restricted to the wrong API | Enable PageSpeed Insights API in your Cloud project credentials |
| Redirect warnings in output | PSI followed a redirect (for example, non-www to www) | Informational only, not an error |