I’m pulling live tournament scores into my spreadsheet using this function:
=IMPORTHTML("https://www.pgatour.com/tournaments/leaderboard","table",2)
The problem is that it only updates once per hour automatically. I need the scores to update way more often, like every few minutes, so I can track changes in real time.
I’ve heard that Google Apps Script can help with this but I’m pretty new to coding. I tried copying some scripts I found online but they either don’t work or give me error messages.
Is there a simple way to force this import function to refresh every 1-5 minutes instead of waiting a whole hour?
I put my formula in cell B3 and it works fine, just doesn’t update fast enough for what I need. Any help would be great since I’m stuck on this.
Google Sheets has built-in rate limiting for IMPORTHTML that you can’t fully bypass, but there are better approaches than the default hourly refresh. The most reliable method I’ve found is using a time-based trigger in Google Apps Script that clears and rewrites the formula every few minutes. Create a simple script targeting cell B3 - clear it, then immediately rewrite the IMPORTHTML formula. This tricks Google into treating it as a new request instead of cached data. Set the trigger for every 2-3 minutes to avoid hitting API limits. The random parameter method mentioned earlier helps but it’s inconsistent in my experience. Even with these workarounds, you might still hit temporary blocks if Google detects too many requests from your account.
Been fighting this same problem for months tracking crypto prices. The hourly refresh kills you when you need live data. Here’s what actually worked for me: mix RANDBETWEEN with manual refresh timing. Don’t just rely on automatic triggers - I built a simple Apps Script that runs every 5 minutes and hits SpreadsheetApp.flush() after updating cells. Here’s the thing nobody mentions: Google’s caching gets way worse during peak hours. Early morning updates work way better. Warning though - push too hard with frequent updates and Google will block your imports for hours. Found this out the hard way during a major tournament. Also try splitting big data across multiple cells. Smaller imports refresh way more consistently than pulling whole leaderboards.
try adding a random num to force refresh - like =IMPORTHTML("https://www.pgatour.com/tournaments/leaderboard?r="&RANDBETWEEN(1,99999),"table",2) then set recalc to every min in file > spreadsheet settings. works sometimes but google limits how often it fetches new data.