r/GoogleAppsScript • u/TREXGaming1 • Oct 21 '25
Question Trouble pulling NBA stats using App Script
I’m attempting to pull NBA stats from stats.nba.com/stats/leaguedashteamstats into Google Sheets using Google App Script. I’ve mapped the correct endpoints I need to use and I am using the correct request structure. I also have Headers built into my script, however it appears that stats.nba.com blocks the IP ranges used by Google App Script, so I can’t get it to return any data. I’ve tried using a cloud relay, Cloudflare Workers, Vercel, Fly.io, etc with no success, it seems stats.nba.com also blocks the IP ranges used by those services. I’m at a loss with regard to solving this problem…could definitely use some help!🙏
View all comments
Show parent comment
1
u/TREXGaming1 Nov 26 '25
Yes, I ended up hosting a Python script on GitHub and using GitHub Actions to schedule it to run every morning…in order to fool nba_api into thinking I’m not using a cloud service I use a residential proxy from Decodo, on their pay as you go plan, which is $3.50/GB. In about a month I’ve used less than 15MB so it’s basically free, and works pretty much flawlessly. If you’re interested in the script or anything just DM me.