In search of TBA scraper for Google Sheets

Does anyone have a Google Sheets/Google Script that efficiently (ish) queries the TBA API for match data? What I’ve always done is used the =importJSON function (custom script). With that function, though, every time I make any change to the sheet, it calls the API again. I am trying to create a sheet with a bunch of columns (one for every field in the match API model) and periodically refreshes, adding new rows to the spreadsheet for each match.

I don’t want anyone to go out of there way to create something but if anyone already has something that does this (or similar), I’m all ears.

I’ve seen a script from 2485 but I’m having some trouble adapting it to 2019 and API V3.

Thanks in advance.

Found this one from 4611, but i dont know how well it is.

I’ve used it before and unfortunately it is not as customizable as I would like. I’ll probably use a version of it if nobody has anything that just gets all data at a given endpoint with ease. Thanks.

This is what we used last year, ymmv.

1 Like

Thank you @dawonn! This looks great. I started playing with it and will continue. I’m sure I can poke around in the code but any sense of what the triggers are for refresh? Does it look every minute for additional matches or something? Or do I have to manually rerun?

I don’t remember to be honest. I think it only updates when you change an input to a function, or mabye there was a way to force google sheets to recalculate? There was no automation trigger to poll for changes though.

The easiest way to trigger automatic refreshes is to use standalone Google Apps Script, at least from what I’ve found. You can write a function that directly edits the workbook and then set a time based trigger tied to that function.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.