How to Bulk Check PageSpeed Using Google Sheets and PageSpeed API

If you're managing multiple websites or web pages, checking their performance individually can be time-consuming. You can automate the process using Google Sheets and the PageSpeed API. Here's a quick guide to help you get started.

Step 1: Get a PageSpeed API Key

First, you must generate an API key from Google to access the PageSpeed Insights API. Visit the Google Developer Console, click “Get A Key,” and create a project. After creating the project, you'll receive your unique API key. Make sure to copy and save this key for later use.


Step 2: Set Up the Bulk PageSpeed Google Sheet

Next, go to the Bulk PageSpeed Google Sheet and make a copy by selecting 'Make a Copy' from the 'File' menu. Replace the URLs in column A with the list of pages you want to analyze. 

To enable the automation, open the Google Apps Script editor by going to the "Extensions" menu and selecting "App Script". When prompted, approve access to the script by clicking "Go to Bulk_PageSpeed_Automation (unsafe)."

In the script, replace the placeholder 'Your API Key' with the API key you obtained earlier. Ensure the API key is enclosed in quotes. The API URL can also be found in the CURL section of the script.

Step 3: Run the Script

Now you're ready to execute the script. Click "Run" to start the analysis. The time it takes will depend on how many URLs you're checking. 


Once completed, two new sheets will appear:  Mobile and Desktop. These will display the PageSpeed scores for mobile and desktop versions of each URL. Additionally, any URLs that return errors (like 404 or 500 status codes) will be highlighted in red on the original sheet.

By following these steps, you can easily track the performance of multiple web pages and identify areas for improvement.

Popular posts from this blog

How to Check for an ETag on Your Website (If It Exists)

Free Backlink Checker - Inbound Links Analysis Made Easy and Free