SYNOPSIS
- This script reads urls from 'pagespeed.txt' file. Load this file with full URLS.
- Queries each url with the google pagespeed api.
- Filters JSON results to only include desired metrics.
- Metrics are saved to local .csv spreadsheet for analysis.
Python3
Create API Key: https://console.developers.google.com/apis/credentials (Create Credentials)
Enable PageSpeed Insights API: https://console.developers.google.com/apis/api/pagespeedonline.googleapis.com/overview
export GOOGLE_API_KEY={YOUR_KEY}