Chapter 6. Getting a PageSpeed Insights API Key Pro
Give your optimization runs a PageSpeed Insights API key of your own: why it's worth it, how to create one in Google Cloud, how to add it to JCH Optimize, and how it is used.
An AI-assisted optimization run measures your page with Google's PageSpeed Insights many times: before and after each change, on mobile and on desktop. The What to expect box in the run window shows how many requests a run typically makes.
Without a key of your own, runs use JCH Optimize's shared key. Its daily limit is shared by every site that uses it, so on a busy day a run can pause because the limit has run out. A key of your own is free, and its limit is yours alone. We recommend adding one before your first run.
Creating the Key
You need a Google account. Google doesn't charge for the PageSpeed Insights API.
-
Open the Google Cloud console at
https://console.cloud.google.com/and sign in with your Google account. -
Choose a project, or create one: open the project list at the top of the page, click , give it a name such as
PageSpeed for example.com, and click . Make sure the project is selected at the top of the page. -
Turn on the API: go to > , search for
PageSpeed Insights API, open it, and click . -
Create the key: go to > , click and choose . Google shows the new key, a long code starting with
AIza. Copy it. -
Restrict the key to PageSpeed Insights: on the page, click the key's name. Under API restrictions, choose Restrict key and select only PageSpeed Insights API. Click .
Important
Leave Application restrictions set to None. The requests are made by JCH Optimize's analysis service, not by your site or your browser, so a restriction to your website or your server's IP address would block every one of them. Restricting the key to the PageSpeed Insights API is what keeps it from being used for anything else.
On This Page