Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab

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.

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"
GET /v2/leagues/198277 · trimmed
{ "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.

TopicHistoryWhat it covers of the NBA
FreeLast 7 daysLive and upcoming games, the table and statistics of a season still being played, and finished games from the last 7 days.
StarterLast 30 daysLive and upcoming games, the table and statistics of a season still being played, and finished games from the last 30 days.
ProLast 6 monthsLive and upcoming games, the table and statistics of a season still being played, and finished games from the last 6 months.
BusinessLast 12 monthsLive and upcoming games, the table and statistics of a season still being played, and finished games from the last 12 months.
EnterpriseFull historyThe 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

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.