Google uses page speed as one of the most significant signals to rank pages, which makes it very crucial for you to consider that element while making or testing your site. Calculating individual page speed performance can help understand how efficiently or not your site is running as a whole. There are multiple tools out there to help you understand the performance of an individual page, but these do so individually; and if your site is a hundred or thousand page site, it is impossible to sit and track individual reports for all of those pages. You will then need to gather insights for multiple URLs. So, here is a way you can use to gather site-wide performance metrics.
Google’s PageSpeed Insights API Version 5 With Google’s Version 5 release of the PageSpeed Insights API in November 2018, where it uses Lighthouse as its analysis engine and incorporates field data provided by CrUX, it is now easy to produce Lighthouse reports using Google Sheets and PageSpeed Insights API V5. With the PageSpeed Insights tool, you can quickly and easily uncover important performance metrics for multiple URLs with just a couple of clicks. All you will need is a copy of the Google Sheet, a free Google API key, and the list of URLs you want data for.
How to do it? The Google Sheet consists of three tabs, namely Settings, Results, and Log. On the Settings tab, you will have to provide a Google API key to make the sheet work. For this, you can visit the Google API Credentials page, and choose the API key option from the “Create credentials” dropdown. Upon this action, you will be provided with an API key, which you will have to copy-paste into the API Key section of the Settings tab of the Automated Pagespeed Insights