Any idea what a reasonable request rate is?
Hey, so I'm planning to use this API (particularly the generic query here: [redacted]) and filter it out for major league game ID's for the past two years. Then I'll probably be hitting each game ID page once for data, pre-processing/filtering the data and storing it in a database so that when I host the (free, not-for-profit) web application I've been working on, users aren't hitting nba.com directly.
I was wondering if you had any recommendations for the rate of requests sent to the API since I'd like to not get blocked from nba.com, but also retrieve the data in a reasonable amount of time (this looks on the order of ~1000 or games for 2019, but haven't finished filtering out G League and 2K games)
If you do not have any amount of time that you want to gather all this information, maybe it's best to do only 1 or 2 a minute which will take anywhere between 8-16 hours over 1000 games. I guess this is to be as respectful as possible to the NBA stats website and to prevent your IP from getting blacklisted.
I would definitely not do anything drastic such as 1 a second or something as you will definitely start experiencing some limiting. There really is no great answer to this as it's a gray area.
Not an absolute rule and YMMV and all that but if you're looking at a live boxscore from stats.nba, it will send out an asynchronous request for an updated json every 10 seconds. I can say I have another project where I'm monitoring a game's status and will occasionally request for updates from an endpoint every 10 seconds. I haven't run into any throttling or anything like that. I'd wager that this is a relatively safe number but I suppose you won't know until you know.
Thanks for the useful feedback. I'll probably try once every 3 minutes and adjust as needed.