Free API key setup in 2 minutes. No billing required for the free tier.
Go to console.cloud.google.com
Sign in with any Google account. You don't need a paid Google Cloud account — the PSI API has a free tier.
Click the project dropdown at the top of the page:
The API is now active for your project.
Your key is ready to use immediately.
API keys can be stolen and abused. Add restrictions.
Restrict by IP address:
Restrict by HTTP referrer:
yourdomain.com/*Limit the key to only the PSI API:
Verify it works with a curl request:
curl "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://example.com&key=YOUR_API_KEY"
A successful response returns JSON with Lighthouse data. An invalid key returns:
{
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key."
}
}
| Limit | Value |
|---|---|
| Requests per day | 25,000 |
| Requests per 100 seconds | 400 |
| Requests per 100 seconds per user | 60 |
Monitor usage at APIs & Services → PageSpeed Insights API → Quotas.
The daily limit resets at midnight Pacific Time.
Unlighthouse runs Lighthouse locally — no API keys, no quotas, no Google Cloud Console.
npx unlighthouse --site https://your-site.com