Hill Country Bots

PageSpeed Insights in Google Sheets


Three honest ways to get Google PageSpeed scores and Core Web Vitals into a spreadsheet: a free script you paste in yourself, a bulk tool that exports to CSV, and our Google Sheets add-on, Site Health Kit.

Bulk check and export Works today, $3 per 1,000 checks.

Option 1: a free Apps Script formula

If you have a short list and do not mind a bit of setup, Google Sheets can call the PageSpeed Insights API itself.

  1. Create a free API key in Google Cloud, enable the PageSpeed Insights API, and restrict the key to that API.
  2. In your sheet, open Extensions, then Apps Script.
  3. In Project Settings, add a script property named PSI_KEY with your key, so it is not pasted into the code.
  4. Paste this function, save, and use it in a cell like =PAGESPEED(A2, "mobile").
function PAGESPEED(url, strategy) {
  var key = PropertiesService.getScriptProperties().getProperty('PSI_KEY');
  var api = 'https://www.googleapis.com/pagespeedonline/v5/runPagespeed'
    + '?url=' + encodeURIComponent(url)
    + '&strategy=' + (strategy || 'mobile')
    + '&key=' + key;
  var res = UrlFetchApp.fetch(api, { muteHttpExceptions: true });
  var data = JSON.parse(res.getContentText());
  if (!data.lighthouseResult) return 'error';
  var lcp = data.loadingExperience && data.loadingExperience.metrics
    && data.loadingExperience.metrics.LARGEST_CONTENTFUL_PAINT_MS;
  return [[
    Math.round(data.lighthouseResult.categories.performance.score * 100),
    lcp ? lcp.percentile : 'no field data'
  ]];
}

It returns the mobile performance score and the real user LCP in milliseconds, in two cells. The catch is speed. Each call waits while Google loads the page, and custom functions stop after 30 seconds, so big lists will time out and recalculate when you least want them to.

Option 2: bulk check, then import the CSV

For dozens or thousands of URLs, run them through our Bulk PageSpeed Checker on Apify, download the CSV, and open it with File, Import in Google Sheets. You get one row per URL with all four Lighthouse scores, lab metrics, real user Core Web Vitals and the top fixes, without any script to maintain. Pull the URL list from a sitemap first with our sitemap to CSV extractor if you want a whole site.

If you use n8n, the n8n workflow can write the results into your sheet on a schedule.

Option 3: Site Health Kit for Google Sheets

We built Site Health Kit to do this inside Sheets with no code: select URLs, click run, and get page speed, Core Web Vitals, status codes, redirects and on page checks, in batches that pick up where they left off. Details and prices are on the Site Health Kit page.

A real sample

This is the kind of table you end up with. The numbers are from a mobile run of our bulk checker on November 11, 2026.

urlperformancelab LCP (ms)field LCP (ms)field INP (ms)field CLS
https://www.gov.uk/999127071070
https://www.wikipedia.org/100121913011000
https://www.python.org/9033011319890
https://web.dev/46780530472350.01

Lab LCP is from one Lighthouse test on a simulated phone. Field values are what real Chrome visitors saw over 28 days, at the 75th percentile. web.dev shows how far apart the two can be.

Every option side by side

OptionWhat you needPrice
The Apps Script aboveA free Google API key, a bit of setupFree, but each cell stops after 30 seconds
Google's PSI Tracker (open source)Copy their sheet, add your own API keyFree
API Connector by Mixed AnalyticsA general API add-on you configure for PageSpeedFree for 100 requests a month, then $15, $29 or $58 a month
Bulk PageSpeed Checker plus CSV import (we built it)No key, paste URLs, import the CSV$3 per 1,000 checks, failures free
Site Health Kit (we built it)See the Site Health Kit pageFree for 100 URL checks a month

Prices and limits are from each company's public page, checked November 11, 2026. If one has changed, email [email protected] and we will fix it.

Which one should you use?

Use the script if you have under 20 URLs and like tinkering. Use the bulk checker if you have more than that, or you want the top fixes and every metric. Keep an eye on Site Health Kit if your whole team lives in Sheets.

Questions

Can Google Sheets call PageSpeed Insights directly?

Yes, with a little Apps Script and a free Google API key, as shown above. It works well for a short list. For long lists it runs into Apps Script time limits, which is why add-ons and batch tools exist.

Do I need an API key?

For the script, yes. Keyless calls share a tiny quota and fail often. A key from Google Cloud is free, and you should restrict it to the PageSpeed Insights API. The Apify tool does not need your key.

When will Site Health Kit be available?

Email [email protected] with the subject Site Health Kit list if you want a note when it is available. Details and prices are on the Site Health Kit page.

Why does my PAGESPEED formula show Loading for a long time?

Google loads the page for real, which can take 10 to 30 seconds. Custom functions in Sheets stop after 30 seconds, so slow pages can time out. Try again, or use a batch tool for big lists.

Will the numbers match pagespeed.web.dev?

They come from the same API, so they should be close. Lab scores move a few points from one test to the next, so compare trends rather than single runs.

Is there a free Google Sheets template for PageSpeed Insights?

Yes. Google publishes an open source PSI Tracker sheet on GitHub that you copy and connect to your own free API key. The Apps Script on this page is a smaller version you can paste into any sheet.

Related