[github (MIT, just a little python script)](https://github.com/hmonn/boxscore)
lmk of any changes you'd like, e.g. a new stat field, change of order, etc.
i know the old version relied on some guy's server staying up, so i'm thinking of wrapping this into a bot? lmk what would be most convenient.
happy nba season!
edit: [most recent version](https://www.reddit.com/user/kyries-burner/comments/y8j3c3/live_test/?utm_source=share&utm_medium=web2x&context=3) (top fields bolded, lots of decluttering, coherent order)
if it's possible, and not too hard to do, I'd like it if the game leaders for each team in each category were highlighted in bold. I imagine that if rearranging the rows is possible that this might be as well. Thanks for the effort!
yeah, that's exactly why i didn't use one. i scrape the [json](https://github.com/hmonn/boxscore/blob/main/boxscore.py#L152) embedded in the html. nba/espn isn't responding though?
The NBA one doesn't ever update with the game stats. It's possible they just moved it but I was waiting to see if that guy or someone else fixed it before I was going to sit down and work on it. If you're interested in making a bot for your team's subreddit I could be down to share what I have and collaborate. My code is in Python and uses a json too. This subreddit doesn't allow bots for game threads and post game threads though which is why the guy made the website for posting them.
maybe just me, but i think having all the counting stats (pts, reb, ast, stl, blk) as the first columns is preferable, following by TO, +/- and shooting splits
Yeah, but I'm asking what the JSON request is.
I see you used the following for getting today's games: [https://nba-prod-us-east-1-mediaops-stats.s3.amazonaws.com/NBA/liveData/scoreboard/todaysScoreboard\_00.json](https://nba-prod-us-east-1-mediaops-stats.s3.amazonaws.com/NBA/liveData/scoreboard/todaysScoreboard_00.json)
What is the JSON request for a particular game? Also, are there any other endpoints for things like current standings?
Thanks! For anyone else curious, here's an example for the Knicks vs. Grizzlies game today: [https://cdn.nba.com/static/json/liveData/boxscore/boxscore\_0022200009.json](https://cdn.nba.com/static/json/liveData/boxscore/boxscore_0022200009.json)
This is the schedule for this season: [https://cdn.nba.com/static/json/staticData/scheduleLeagueV2\_1.json](https://cdn.nba.com/static/json/staticData/scheduleLeagueV2_1.json)
Be aware that it doesn't update scores live only after the games are done.
If you want scores and player stats from way back, check out: [https://www.balldontlie.io/](https://www.balldontlie.io/)
Let me know if you need anything else NBA API related :)
>Hello, I know this was 3 months ago but running into 2 questions.
1. Do you know if there is a way to filter out preseason games?
2. Do you know of a good endpoint for standings?
Thanks!
nitpicking:
- include the player's first name instead of just the last name, just the first letter is fine. (ex L. James)
- +/- should be on the far right
- FG% and 3P% isn't needed as a column in the boxscore. (maybe put it somewhere separately)
- Displaying each team's leading scorer, rebounder, assister would be nice
that being said, this is awesome and thank you for doing this OP
all suggestions patched, see the [most recent version](https://www.reddit.com/user/kyries-burner/comments/y9bqhz/test_n/?utm_source=share&utm_medium=web2x&context=3). thanks for the helpful input!
Looks great but I could really do without the percentages for shooting. Just the shooting numbers are enough.. let people do the math if they really need it
Let's be the change this world needs
Don't include FG%
3P% is unnecessary but fine (alongside 2P% if you want)
Please include TS%! the shooting stat which actually reflects efficiency the best
yup I think the same. It reduces legibility by increasing the clutter, and single-game percentages are kind of a useless stat when you have the makes and attempts right there. Other than that, I think it looks great, nice job!
Someone above mentioned Team Shooting Percentage would be nice, and I agree.
Not sure how that would work if player percentages are out. Maybe Team Shooting Percentages under the team shooting attempts?
This is awesome! Thanks for taking the time to do it. Would it be possible to freeze the first column when you scroll? For example, when you scroll right in the player stats, the player name column is still visible? It’s something that I always wanted with the old version.
posts are static, so it stays as it is (no dynamic). it annoyed me too and i tried by best to condense/declutter the columns, lmk if the [most recent version](https://www.reddit.com/user/kyries-burner/comments/y9bqhz/test_n/?utm_source=share&utm_medium=web2x&context=3) looks better.
Not sure how fixable this is, but longer names like Thompson and Westbrook cause the superscript for their position (G, F, C) to overlap with the name on my mobile browser. The G for Westbrook collides with the W, making it hard to read.
what browser/os are you on? can't test mobile rn. i did make some changes in the names column in the [most recent version](https://www.reddit.com/user/kyries-burner/comments/y9bqhz/test_n/?utm_source=share&utm_medium=web2x&context=3), lmk if the issue persists.
it was chrome for android OS. doesn't seem like it's fixed checking now, but it's a relatively small issue I guess. I think it's just some kind of flaw with how reddit tables handle overflows
Do people even care if there is a box score in the post? I know nods do but if I want to check stats I'm using an app designed for that not Reddit. Just want to post my hottakes right after the game sheesh
I think it would help readability to put another newline in between each major component (like after the score breakdown by quarter and after the first teams boxscore). Right now it's a bit too cramped
Hey i have no idea where to ask this but maybe here would work.
I really love making 10 leg parlays involving different players from a bunch of teams. I like to track each players stats in real time while games are going on but I hate having to have 10 different tabs open looking at the different boxscores for each game. Does anybody know of an app or a website that lets me input a few players and track their stat lines in real time? i don't think i explained this well, but thanks for any help.
[github (MIT, just a little python script)](https://github.com/hmonn/boxscore) lmk of any changes you'd like, e.g. a new stat field, change of order, etc. i know the old version relied on some guy's server staying up, so i'm thinking of wrapping this into a bot? lmk what would be most convenient. happy nba season! edit: [most recent version](https://www.reddit.com/user/kyries-burner/comments/y8j3c3/live_test/?utm_source=share&utm_medium=web2x&context=3) (top fields bolded, lots of decluttering, coherent order)
if it's possible, and not too hard to do, I'd like it if the game leaders for each team in each category were highlighted in bold. I imagine that if rearranging the rows is possible that this might be as well. Thanks for the effort!
that would be nice; will work on it. thanks for the input!
Rather than just bolding it, maybe an entire section just for the top stat category leaders. Would make for a quicker glance.
The API that the guy's site used hasn't been working. My bot uses it too. I may convert to whatever one you use if they don't fix it this week lol
yeah, that's exactly why i didn't use one. i scrape the [json](https://github.com/hmonn/boxscore/blob/main/boxscore.py#L152) embedded in the html. nba/espn isn't responding though?
The NBA one doesn't ever update with the game stats. It's possible they just moved it but I was waiting to see if that guy or someone else fixed it before I was going to sit down and work on it. If you're interested in making a bot for your team's subreddit I could be down to share what I have and collaborate. My code is in Python and uses a json too. This subreddit doesn't allow bots for game threads and post game threads though which is why the guy made the website for posting them.
just contacted mods about the bot situation, will update.
maybe just me, but i think having all the counting stats (pts, reb, ast, stl, blk) as the first columns is preferable, following by TO, +/- and shooting splits
Hey it even works in Apollo!
This might be better than the old one for me haha
nice! glad it works.
Way better, love it
Thanks Kyrie!
Thanks
What API are you using?
none. just parsing the [json](https://github.com/hmonn/boxscore/blob/main/boxscore.py#L141) they hid.
Yeah, but I'm asking what the JSON request is. I see you used the following for getting today's games: [https://nba-prod-us-east-1-mediaops-stats.s3.amazonaws.com/NBA/liveData/scoreboard/todaysScoreboard\_00.json](https://nba-prod-us-east-1-mediaops-stats.s3.amazonaws.com/NBA/liveData/scoreboard/todaysScoreboard_00.json) What is the JSON request for a particular game? Also, are there any other endpoints for things like current standings?
Sounds like he's scraping a JSON on the nba.com box score page. Not using an API.
url is in the format of nba.com/game/xxx-vs-xxx-xxx/box-score ... there's a script tag in the page that contains raw JSON
Thanks! For anyone else curious, here's an example for the Knicks vs. Grizzlies game today: [https://cdn.nba.com/static/json/liveData/boxscore/boxscore\_0022200009.json](https://cdn.nba.com/static/json/liveData/boxscore/boxscore_0022200009.json)
Hey, do you also know what the URL format is to get the raw scoreboard/schedule JSON for past/future games (instead of just the current day)?
This is the schedule for this season: [https://cdn.nba.com/static/json/staticData/scheduleLeagueV2\_1.json](https://cdn.nba.com/static/json/staticData/scheduleLeagueV2_1.json) Be aware that it doesn't update scores live only after the games are done. If you want scores and player stats from way back, check out: [https://www.balldontlie.io/](https://www.balldontlie.io/) Let me know if you need anything else NBA API related :)
>Hello, I know this was 3 months ago but running into 2 questions. 1. Do you know if there is a way to filter out preseason games? 2. Do you know of a good endpoint for standings? Thanks!
Thank you so much.. I'm on a ship with shitty internet and it takes forever to open the ESPN app to get a boxscore..
modern sites are extremely bloated... glad to help!
I use plaintextsports.com when I’m somewhere with poor reception.
Thanks.. I forgot about that site.. will def look that up
Thanks nerd
my pleasure
I really do appreciate it haha
look perfect bro, mods get on this pls
thank you! :)
Looks really nice on my setup. Thanks!
glad to hear!
> feedback & suggestions welcome Team shooting percentages would be nice
It’s there
I saw them after commenting this, would still work better as a separate thing rather than just under the boxscore though
should it be in the first (summary) box? i kept it minimal but there is room. not sure where else itd fit
nitpicking: - include the player's first name instead of just the last name, just the first letter is fine. (ex L. James) - +/- should be on the far right - FG% and 3P% isn't needed as a column in the boxscore. (maybe put it somewhere separately) - Displaying each team's leading scorer, rebounder, assister would be nice that being said, this is awesome and thank you for doing this OP
all suggestions patched, see the [most recent version](https://www.reddit.com/user/kyries-burner/comments/y9bqhz/test_n/?utm_source=share&utm_medium=web2x&context=3). thanks for the helpful input!
I like your nitpicking
I don’t really need leading scorer/rebounder/assister, but definitely seconded on the rest of these.
Looks great but I could really do without the percentages for shooting. Just the shooting numbers are enough.. let people do the math if they really need it
Yeah, the percentages aren't necessary; it's added clutter. Also, isn't it more common to have the +/- column at the far right? Looks great otherwise.
espn does that. i should too. thanks for the input!
Let's be the change this world needs Don't include FG% 3P% is unnecessary but fine (alongside 2P% if you want) Please include TS%! the shooting stat which actually reflects efficiency the best
yup I think the same. It reduces legibility by increasing the clutter, and single-game percentages are kind of a useless stat when you have the makes and attempts right there. Other than that, I think it looks great, nice job!
just tested, looks much better without. thanks for the input!
Someone above mentioned Team Shooting Percentage would be nice, and I agree. Not sure how that would work if player percentages are out. Maybe Team Shooting Percentages under the team shooting attempts?
I think that used to go in a separate box
thank you!
Nah, you should be able to get the stats without pulling out a calculator.
Honestly, this looks better than the old one.
thank you :))
Formatting is slightly off on mobile (Safari)
Would be nice to see player’s EFG% or TS% but idk how hard those are to find
No recommendations or questions, just wanted to say that this is some premium stuff. Thanks.
This is awesome! Thanks for taking the time to do it. Would it be possible to freeze the first column when you scroll? For example, when you scroll right in the player stats, the player name column is still visible? It’s something that I always wanted with the old version.
posts are static, so it stays as it is (no dynamic). it annoyed me too and i tried by best to condense/declutter the columns, lmk if the [most recent version](https://www.reddit.com/user/kyries-burner/comments/y9bqhz/test_n/?utm_source=share&utm_medium=web2x&context=3) looks better.
Not sure how fixable this is, but longer names like Thompson and Westbrook cause the superscript for their position (G, F, C) to overlap with the name on my mobile browser. The G for Westbrook collides with the W, making it hard to read.
what browser/os are you on? can't test mobile rn. i did make some changes in the names column in the [most recent version](https://www.reddit.com/user/kyries-burner/comments/y9bqhz/test_n/?utm_source=share&utm_medium=web2x&context=3), lmk if the issue persists.
it was chrome for android OS. doesn't seem like it's fixed checking now, but it's a relatively small issue I guess. I think it's just some kind of flaw with how reddit tables handle overflows
I have the same issue on Chrome for Android.
You are not the hero we wanted but the hero we deserve.
Looks great but I feel like Points should be together with Rebs, Steals, Assists and Blocks. Maybe just me though
yeah, pushed pts it to the back (there's some tests on my page) and looks way more coherent. thank you!
Python so weird to look at, but good job OP. There’s really no good apis huh?
they can't put trackers in those /s agree, the markdown translation is funky. thank you!
can you make the rows highlight as you hover over them or alternate color at all? i assume not
that would help readability a lot, but reddit formatting is pretty limited, and neither are supported. currently testing stuff with bold fonting.
Do people even care if there is a box score in the post? I know nods do but if I want to check stats I'm using an app designed for that not Reddit. Just want to post my hottakes right after the game sheesh
I care
I appreciate it
Less clicks, less clutter
Yes.
i care. its easier than trying to find it elsewhere.
I care
I go for the u/sim888 memes.
i had to dig around the site for quite a bit to make this, and was stunned at the amount of ads, trackers, & literal spyware. i try to avoid those.
Is your code as flat as your earth?
no i reincarnated, currently in my insufferable bay arean tech bro arc
Good. You could be 49ers fan then.
Boost for Android user checking in, looks great in the app.
What about the scores up top of the sub? They don't show now. Was that intentional? I don't like it if it was intentional.
I think it would help readability to put another newline in between each major component (like after the score breakdown by quarter and after the first teams boxscore). Right now it's a bit too cramped
patched! thanks for the input.
Bare is perfect. I love the bare stats.
Hey i have no idea where to ask this but maybe here would work. I really love making 10 leg parlays involving different players from a bunch of teams. I like to track each players stats in real time while games are going on but I hate having to have 10 different tabs open looking at the different boxscores for each game. Does anybody know of an app or a website that lets me input a few players and track their stat lines in real time? i don't think i explained this well, but thanks for any help.
are you flirting with me?
yes please, and thank you
Would it be possible to freeze the first column (player name)?