Basketball · USA · 30 teams
NBA API with box scores, play-by-play and live tracking
An NBA API for live scores, box scores, play-by-play, shot charts, standings, playoff series and the draft on league id 198277, with seasons back to 1946/47. On Enterprise it also tracks the ball and every player on court at five frames a second.
- Seasons since 1946/47
- 30 teams
- League id 198277
- Player tracking at 5 frames a second

NBA
GET /v2/leagues/198277
- League id
198277- Category
- USA
- Archive
- Seasons since 1946/47
- Teams
- 30 teams
- Live channel
league:198277
In the data
The NBA in the API
What league id 198277 holds, and how its seasons are laid out.
Days, not rounds
The source does not split the NBA regular season into rounds, so read it by day: /v2/fixtures?date=…&league=198277 returns one day's games, /calendar lists every day of the season with its number of games, and /v2/teams/{id}/fixtures gives one team's schedule. The standings hold several tables, which group=all returns together.
Every possession
During a game the score and clock are current to the second, and the line-ups carry each player's figures for the game, refreshed about every 30 seconds. From Pro, play-by-play lists every basket, free throw, rebound, foul and turnover with the clock and the running score, and the shot map puts every field-goal attempt on the court as made, missed or blocked. On Enterprise, /tracking/players returns all ten players and the ball at five frames a second, with the ball carrier, the game clock and the shot clock.
Playoffs and the draft
/v2/fixtures/{id}/series returns every game of a playoff series from any one of them, and /cup-trees draws the playoff bracket with series wins as the score. /draft?year= gives both rounds of a draft in pick order, traded picks marked with the team they came from. The preseason, the All-Star Game, the Summer League and the G League are separate competitions with ids of their own.
Endpoints
The calls behind a NBA app
Each takes league id 198277, a season id from its seasons list, or a game or team id from those. Every row opens its page in the docs.
- GET
/v2/leagues/{id}/standingsStandingsEvery table of the season with group=all.All plans - GET
/v2/leagues/{id}/calendarSeason calendarEach day of the season with its number of games.All plans - GET
/v2/fixturesFixtures by dateOne day's NBA games in a single request.All plans - GET
/v2/fixtures/{id}/lineupsLineupsBoth rosters with each player's figures for the game.All plans - GET
/v2/fixtures/{id}/play-by-playPlay by playEvery basket, free throw, rebound, foul and turnover, with clock and score.Pro and up - GET
/v2/fixtures/{id}/shotmapShot mapEvery field-goal attempt on the court: made, missed or blocked.Pro and up - GET
/v2/fixtures/{id}/seriesPlayoff seriesAll games of the playoff series a game belongs to.All plans - GET
/v2/leagues/{id}/draftDraftA draft round in pick order, traded picks marked.All plans - GET
/v2/fixtures/{id}/tracking/playersPlayer trackingAll ten players and the ball, five frames a second, live.Enterprise
First request
The NBA in three calls
Every call starts from the league id, 198277. The seasons list gives the season ids, newest first, and the season id is what the tables, rounds, leaderboards and statistics ask for.
The answers use the usual { data, meta } envelope and the same field names as every other basketball competition, so the code works unchanged for the next league you add.
# Every season, newest first, with its season id
curl "https://api.datasportsapi.com/v2/leagues/198277/seasons" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"
# Every table of the season
curl "https://api.datasportsapi.com/v2/leagues/198277/standings?season={seasonId}&group=all" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"
# The first round of the 2026 draft
curl "https://api.datasportsapi.com/v2/leagues/198277/draft?year=2026" \
-H "Authorization: Bearer $DATASPORTSAPI_API_KEY"{ "data": {
"id": 198277, "name": "NBA", "sport": "basketball",
"category": "USA", "country": { "code": "US", "name": "USA" },
"gender": "male",
…
} }History
How much of the NBA each plan reads
The archive goes back to 1946/47. Each plan reads back a set time from today; nothing live or upcoming is ever held back.
| Topic | History | What it covers of the NBA |
|---|---|---|
| Free | Last 7 days | Live and upcoming games, the table and statistics of a season still being played, and finished games from the last 7 days. |
| Starter | Last 30 days | Live and upcoming games, the table and statistics of a season still being played, and finished games from the last 30 days. |
| Pro | Last 6 months | Live and upcoming games, the table and statistics of a season still being played, and finished games from the last 6 months. |
| Business | Last 12 months | Live and upcoming games, the table and statistics of a season still being played, and finished games from the last 12 months. |
| Enterprise | Full history | The whole archive: seasons since 1946/47. |
Questions
NBA API, answered
Anything else? The full FAQ covers quota, plans and the data in general.
Does the NBA API include player tracking?
Yes, on Enterprise. /v2/fixtures/{id}/tracking/players returns the ball and all ten players on the court at five frames a second, live, with who holds the ball, the game clock, the shot clock and each player's name, number and position. The same frames stream over the tracking:{id} WebSocket channel.
How do I get playoff series and the bracket?
Pass any playoff game to /v2/fixtures/{id}/series for the ids of every game in that series, and ask /v2/leagues/198277/cup-trees?season= for the bracket, where each tie's score is the series wins.
Does it include the NBA draft?
Yes, on every plan. /v2/leagues/198277/draft?year=2026&round=1 lists the picks in order, each with the selecting team, the team a traded pick came from and the prospect's position and college, plus a player id once the source has a profile. The NBA draft has two rounds.
How far back does NBA data go?
To the 1946/47 season. How far back a key can read is set by its plan, counted back from today: Free 7 days, Starter 30 days, Pro 6 months, Business 12 months, and Enterprise the whole archive. Live and upcoming games, and the table and statistics of a season still being played, are open on every plan.
Can I follow NBA games live on the free plan?
Yes. Live and upcoming games are never held back by a plan, so a Free key follows every NBA game in play through /v2/livescores or /v2/fixtures/{id}, with score, status and clock current to the second, within the plan's request quota. On Business and Enterprise, the WebSocket channel league:198277 pushes every change instead.
Keep reading
Other competitions
Premier League APILeague id 195828: live scores, the table, xG and every season since 1992/93.
Champions League APILeague id 4409: the 36-club league phase, the knockout bracket and every season since 1992/93.
La Liga APILeague id 4408: Spain's top flight, head-to-head records and every season since 1969/70.
Serie A APILeague id 195910: Italy's top flight, venues and the longest big-five archive, back to 1965/66.
Bundesliga APILeague id 195937: Germany's 18 clubs, the team of the week and every season since 1970/71.
Ligue 1 APILeague id 195793: France's top flight, every player's statistics and seasons since 1970/71.
World Cup APILeague id 195843: all 23 tournaments from 1930 to 2026, group tables and the bracket.
NFL APILeague id 201295: down and distance live, win probability, the draft and seasons back to 1920.
NHL APILeague id 201302: conference and division tables, shot maps by strength, the three stars and playoff series.
MLB APILeague id 201220: the live count, every at-bat and pitch, umpire crews and ballpark weather.
IPL APILeague id 195830: full scorecards, every ball with wagon wheel and pitch map, and seasons since 2013.
Süper Lig APILeague id 172801: Turkey's top division, its referees on record and seasons back to 1980/81.
MLS APILeague id 6540: 30 clubs, two conference tables and calendar-year seasons since 2008.
Europa League APILeague id 43443: one 36-club table, knockout ties on aggregate and seasons since 2009/10.
Everything in the basketball data Sports statistics API Live scores API
Build on the NBA today.
1,000 free requests a day during the beta. No card, no sales call.