Guides
Basketball data, one question at a time
Working Python, JavaScript and cURL for common basketball data questions, each run against the live API with the real response shown.
How do I get NBA play-by-play data in Python?
One call returns a game's plays in order, with shot location, zone, expected points and win probability on each. This pulls the shots from one game into pandas.
get_plays · 10 credits
How do I build an NBA shot chart by zone in Python?
A player's shot profile by zone, with attempts, makes and expected points per shot, for one season. Set include_shots to true to get every shot's x and y as well.
get_shot_chart · 10 credits
How do I backtest NBA closing lines in Python?
A day of games with every sportsbook's opening and closing moneyline, spread and total, next to whether the home side covered and the total went over.
get_odds · 5 credits
How do I compare NBA team pace and efficiency in pandas?
Pace, offensive and defensive rating, net rating and the four factors for all 30 teams in one call, ready to sort and plot.
get_team_stats · 5 credits
How do I get an NBA player's game log and a rolling average?
Every game a player appeared in, with minutes, points, shooting and plus-minus, loaded into pandas for a 10-game rolling average.
get_player_games · 5 credits
How do I compare NBA player prop lines across sportsbooks?
Every sportsbook's points line and over and under price for each player in a game, to find where books post different lines and who pays best on each side.
get_player_props · 10 credits
How do I get NBA line movement before tip-off in Python?
Snapshots of each sportsbook's moneyline, spread and total from the day before a game to tip-off, with the final score, to see when the line moved and if it was right.
get_line_movement · 10 credits
How do I get today's NBA schedule and scores in Python?
Every NBA game on a date with score, venue and attendance. October 10 had seven preseason games that averaged 227.7 total points.
list_games · 2 credits
How do I get NBA standings in Python?
NBA standings for 2025-26 computed from every final game: record, scoring margin and last 10 by conference. Oklahoma City finished 64-18.
get_standings · 2 credits
How do I get the NBA injury report in Python?
The NBA injury report as of November 18: 108 listed players, 87 of them out, with injury type, status and expected return date.
get_injuries · 2 credits
How often does an NBA player go over his points line?
One row per game with a player's closing points line, the price, what he scored and whether he went over. Shai Gilgeous-Alexander went over in 28 of 68.
get_prop_history · 10 credits
How often does an NBA shooter go over his threes line?
One row per game with a player's threes made line, the price, how many he hit and whether he went over. Stephen Curry went over in 18 of 43 last season.
get_prop_history · 10 credits
How often does an NBA big man go over his rebounds line?
One row per game with a player's rebounds line, the price, how many he grabbed and whether he went over. Karl-Anthony Towns went over in 42 of 76 last season.
get_prop_history · 10 credits
How often does an NBA playmaker go over his assists line?
One row per game with a player's assists line, the price, how many he passed for and whether he went over. Nikola Jokic went over in 40 of 64 last season.
get_prop_history · 10 credits
How often does an NBA star go over his points + rebounds + assists line?
One row per game with a player's points + rebounds + assists line, the price, his total and whether he went over. Luka Doncic split 32 overs and 32 unders last season.
get_prop_history · 10 credits
How often does a college basketball player go over his points line?
One row per game with a college player's points line, the price, what he scored and whether he went over. Purdue's Braden Smith went under in 22 of 38 last season.
get_prop_history · 10 credits
How often does a college basketball player go over his rebounds line?
One row per game with a college player's rebounds line, the price, how many he grabbed and whether he went over. Duke's Cameron Boozer went over in 19 of 38 last season.
get_prop_history · 10 credits
How often does an NBA big man go over his blocks line?
One row per game with a player's blocks line, the price, how many he blocked and whether he went over. Victor Wembanyama went over in 30 of 65.
get_prop_history · 10 credits
How often does an NBA guard go over his steals line?
One row per game with a player's steals line, the price, how many he took and whether he went over. Dyson Daniels went over in 37 of 74.
get_prop_history · 10 credits
How do I get first quarter NBA odds history in Python?
Each sportsbook's opening and closing 1st quarter point spread for a game, from May 2023, for the larger books.
get_market_odds · 10 credits