NBA API

Realtime Sports API serves NBA games through the same REST endpoints and JSON schema as every other league, using sport=basketball and league=nba. You get the current scoreboard, live scores, game detail, play-by-play, teams, rosters and news and the injury report. Not currently available or not verified for this league: betting odds. Data is aggregated from public sources and is typically 20-30 seconds behind live play (about 1 second after our source). There is no SLA.

Slugs
sport=basketball
league=nba
Teams
30
Season (from data)
2026-27 Regular Season
In the scoreboard now
6 games

Upcoming and live NBA games

NBA games from the API
DateAwayHomeTime / ResultTVVenue
Sat, Nov 21Portland Trail BlazersatNew York Knicks7:30 PM ETTV: NBA TV, KUNP 16, BlazerVisionMadison Square Garden · New York, NY
Sat, Nov 21LA ClippersatDallas Mavericks8:00 PM ETTV: KFAA-TV, MavsTV, ClipperVisionAmerican Airlines Center · Dallas, TX
Sat, Nov 21Memphis GrizzliesatMinnesota Timberwolves8:00 PM ETTV: DAZN MIN, DAZN MEMTarget Center · Minneapolis, MN
Sat, Nov 21New Orleans PelicansatSan Antonio Spurs8:00 PM ETTV: DAZN SAS, GCSEN, Pelicans.comFrost Bank Center · San Antonio, TX
Sat, Nov 21Boston CelticsatSacramento Kings10:00 PM ETTV: NBA TVGolden 1 Center · Sacramento, CA

From the /events endpoint for this league, refreshed every few minutes. Times are US Eastern. Full NBA schedule · NBA team APIs · Free NBA scoreboard widget

Live example

Request

curl -H "Authorization: Bearer $RSA_API_KEY" \
  "https://www.realtimesportsapi.com/api/v1/sports/basketball/leagues/nba/events?limit=1"

Response captured from live data at 2026-11-21 21:38 UTC (refreshed every few minutes). Long arrays are trimmed; meta.rateLimit values are illustrative for a Free key.

Response

{
  "success": true,
  "data": [
    {
      "id": "401910023",
      "uid": "s:40~l:46~e:401910023",
      "name": "Milwaukee Bucks at Philadelphia 76ers",
      "shortName": "MIL @ PHI",
      "date": "2026-11-21T18:00Z",
      "status": {
        "state": "post",
        "completed": true,
        "period": 4,
        "clock": "0.0",
        "detail": "Final",
        "halftime": false,
        "firstHalfEnded": true
      },
      "homeTeam": {
        "id": "20",
        "name": "Philadelphia 76ers",
        "abbreviation": "PHI",
        "logo": "https://realtimesportsapi.com/api/images/proxy?id=GgcVSgNPTUMITUgaFFQVVVQXBVwOHV5LRQBZD1lbBllDXR0DW19AUlxGE0UASkoYVg",
        "color": "1d428a",
        "alternateColor": "e01234",
        "winner": true,
        "score": 132
      },
      "awayTeam": {
        "id": "15",
        "name": "Milwaukee Bucks",
        "abbreviation": "MIL",
        "logo": "https://realtimesportsapi.com/api/images/proxy?id=GgcVSgNPTUMITUgaFFQVVVQXBVwOHV5LRQBZD1lbBllDXR0DW19AUlxGDkQFSkoYVg",
        "color": "00471b",
        "alternateColor": "eee1c6",
        "winner": false,
        "score": 129
      },
      "competition": {
        "attendance": 21043,
        "neutralSite": false,
        "conferenceCompetition": false,
        "divisionCompetition": false,
        "playByPlayAvailable": true,
        "highlightsAvailable": true
      },
      "venue": {
        "id": "1845",
        "name": "Xfinity Mobile Arena",
        "city": "Philadelphia",
        "state": "PA",
        "indoor": true,
        "grass": false
      },
      "notes": [],
      "season": {
        "year": 2027,
        "displayName": "2026-27",
        "type": {
          "id": "2",
          "name": "Regular Season",
          "abbreviation": "reg"
        },
        "week": {}
      },
      "broadcasts": [
        {
          "network": "MyMi",
          "type": "TV"
        },
        {
          "network": "Bucks App",
          "type": "Streaming"
        }
      ],
      "officials": [
        {
          "id": "2610873",
          "fullName": "Jason Goldenberg",
          "displayName": "Jason Goldenberg",
          "order": 1,
          "position": "Referee"
        },
        {
          "id": "2616397",
          "fullName": "Tre Maddox",
          "displayName": "Tre Maddox",
          "order": 2,
          "position": "Referee"
        },
        {
          "id": "4065601",
          "fullName": "Jonathan Sterling",
          "displayName": "Jonathan Sterling",
          "order": 3,
          "position": "Referee"
        }
      ]
    }
  ],
  "meta": {
    "rateLimit": {
      "limit": 125,
      "remaining": 124,
      "reset": 1796083200000
    }
  }
}

NBA play-by-play example

Request

curl -H "Authorization: Bearer $RSA_API_KEY" \
  "https://www.realtimesportsapi.com/api/v1/sports/basketball/leagues/nba/events/401910023/plays?limit=3"

Response captured from live data at 2026-11-21 21:38 UTC (refreshed every few minutes). Long arrays are trimmed; meta.rateLimit values are illustrative for a Free key. Plays from Milwaukee Bucks at Philadelphia 76ers.

Response

{
  "success": true,
  "data": [
    {
      "id": "4019100235",
      "sequenceNumber": "5",
      "text": "Myles Turner vs. Joel Embiid (Kentavious Caldwell-Pope gains possession)",
      "alternativeText": "Myles Turner vs. Joel Embiid (Kentavious Caldwell-Pope gains possession)",
      "type": {
        "id": "615",
        "text": "Jumpball"
      },
      "period": 1,
      "clock": {
        "value": 720,
        "displayValue": "12:00"
      },
      "wallClock": "2026-11-21T18:10:32Z",
      "homeScore": 0,
      "awayScore": 0,
      "scoringPlay": false,
      "scoreValue": 0,
      "situation": null,
      "endSituation": null,
      "athletes": [
        {
          "id": "3059318",
          "name": "Joel Embiid",
          "displayName": "Joel Embiid",
          "shortName": "J. Embiid",
          "position": "C",
          "team": {
            "id": "20"
          },
          "order": 1
        },
        {
          "id": "3133628",
          "name": "Myles Turner",
          "displayName": "Myles Turner",
          "shortName": "M. Turner",
          "position": "C",
          "team": {
            "id": "15"
          },
          "order": 2
        },
        {
          "id": "2581018",
          "name": "Kentavious Caldwell-Pope",
          "displayName": "Kentavious Caldwell-Pope",
          "shortName": "K. Caldwell-Pope",
          "position": "G",
          "team": {
            "id": "20"
          },
          "order": 3
        }
      ],
      "priority": false,
      "modified": "2026-11-21T18:10Z"
    },
    {
      "id": "4019100238",
      "sequenceNumber": "8",
      "text": "LeBron James makes dunk (VJ Edgecombe assists)",
      "shortText": "L. James makes dunk (V. Edgecombe assists)",
      "alternativeText": "LeBron James makes dunk (VJ Edgecombe assists)",
      "type": {
        "id": "151",
        "text": "Cutting Dunk Shot"
      },
      "period": 1,
      "clock": {
        "value": 704,
        "displayValue": "11:44"
      },
      "wallClock": "2026-11-21T18:10:48Z",
      "homeScore": 2,
      "awayScore": 0,
      "scoringPlay": true,
      "scoreValue": 2,
      "situation": null,
      "endSituation": null,
      "athletes": [
        {
          "id": "1966",
          "name": "LeBron James",
          "displayName": "LeBron James",
          "shortName": "L. James",
          "position": "F",
          "team": {
            "id": "20"
          },
          "role": "shooter",
          "type": "shooter",
          "order": 1
        },
        {
          "id": "5124612",
          "name": "VJ Edgecombe",
          "displayName": "VJ Edgecombe",
          "shortName": "V. Edgecombe",
          "position": "G",
          "team": {
            "id": "20"
          },
          "role": "assister",
          "type": "assister",
          "order": 2
        }
      ],
      "priority": false,
      "modified": "2026-11-21T18:10Z"
    },
    {
      "id": "40191002310",
      "sequenceNumber": "10",
      "text": "Myles Turner misses 27-foot three point jumper",
      "shortText": "M. Turner misses 27-foot three point jumper",
      "alternativeText": "Myles Turner misses 27-foot three point jumper",
      "type": {
        "id": "92",
        "text": "Jump Shot"
      },
      "period": 1,
      "clock": {
        "value": 686,
        "displayValue": "11:26"
      },
      "wallClock": "2026-11-21T18:11:06Z",
      "homeScore": 2,
      "awayScore": 0,
      "scoringPlay": false,
      "scoreValue": 0,
      "situation": null,
      "endSituation": null,
      "athletes": [
        {
          "id": "3133628",
          "name": "Myles Turner",
          "displayName": "Myles Turner",
          "shortName": "M. Turner",
          "position": "C",
          "team": {
            "id": "15"
          },
          "role": "shooter",
          "type": "shooter",
          "order": 1
        }
      ],
      "priority": false,
      "modified": "2026-11-21T18:11Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 3,
      "total": 481,
      "totalPages": 161,
      "hasNextPage": true,
      "hasPreviousPage": false
    },
    "rateLimit": {
      "limit": 125,
      "remaining": 124,
      "reset": 1796083200000
    }
  }
}

Play-by-play API reference · Paid plans can receive each play as it happens over WebSocket or webhooks instead of polling.

NBA box score example

Request

curl -H "Authorization: Bearer $RSA_API_KEY" \
  "https://www.realtimesportsapi.com/api/v1/sports/basketball/leagues/nba/events/401910023/boxscore"

Response captured from live data at 2026-11-21 21:38 UTC (refreshed every few minutes). Long arrays are trimmed; meta.rateLimit values are illustrative for a Free key. Box score for Milwaukee Bucks at Philadelphia 76ers; player lists trimmed to 2 of 12 (home) and 13 (away).

Response

{
  "success": true,
  "data": {
    "homeTeam": {
      "id": "20",
      "name": "Philadelphia 76ers",
      "abbreviation": "PHI",
      "score": 132
    },
    "awayTeam": {
      "id": "15",
      "name": "Milwaukee Bucks",
      "abbreviation": "MIL",
      "score": 129
    },
    "homePlayers": [
      {
        "id": "1966",
        "name": "LeBron James",
        "jersey": "23",
        "position": "F",
        "starter": true,
        "didNotPlay": false,
        "points": "21",
        "rebounds": "6",
        "assists": "6",
        "minutes": "35",
        "fieldGoalsMade-fieldGoalsAttempted": "9-14",
        "threePointFieldGoalsMade-threePointFieldGoalsAttempted": "0-1",
        "freeThrowsMade-freeThrowsAttempted": "3-3",
        "turnovers": "1",
        "steals": "3",
        "blocks": "1",
        "offensiveRebounds": "1",
        "defensiveRebounds": "5",
        "fouls": "2",
        "plusMinus": "-3"
      },
      {
        "id": "3059318",
        "name": "Joel Embiid",
        "jersey": "21",
        "position": "C",
        "starter": true,
        "didNotPlay": false,
        "points": "26",
        "rebounds": "17",
        "assists": "9",
        "minutes": "34",
        "fieldGoalsMade-fieldGoalsAttempted": "7-17",
        "threePointFieldGoalsMade-threePointFieldGoalsAttempted": "0-1",
        "freeThrowsMade-freeThrowsAttempted": "12-14",
        "turnovers": "1",
        "steals": "0",
        "blocks": "1",
        "offensiveRebounds": "2",
        "defensiveRebounds": "15",
        "fouls": "1",
        "plusMinus": "+3"
      }
    ],
    "awayPlayers": [
      {
        "id": "3134907",
        "name": "Kyle Kuzma",
        "jersey": "18",
        "position": "F",
        "starter": true,
        "didNotPlay": false,
        "points": "12",
        "rebounds": "5",
        "assists": "1",
        "minutes": "33",
        "fieldGoalsMade-fieldGoalsAttempted": "4-16",
        "threePointFieldGoalsMade-threePointFieldGoalsAttempted": "2-8",
        "freeThrowsMade-freeThrowsAttempted": "2-2",
        "turnovers": "0",
        "steals": "0",
        "blocks": "0",
        "offensiveRebounds": "0",
        "defensiveRebounds": "5",
        "fouls": "2",
        "plusMinus": "-2"
      },
      {
        "id": "4432848",
        "name": "Jaime Jaquez Jr.",
        "jersey": "24",
        "position": "F",
        "starter": true,
        "didNotPlay": false,
        "points": "9",
        "rebounds": "0",
        "assists": "1",
        "minutes": "25",
        "fieldGoalsMade-fieldGoalsAttempted": "4-7",
        "threePointFieldGoalsMade-threePointFieldGoalsAttempted": "1-2",
        "freeThrowsMade-freeThrowsAttempted": "0-0",
        "turnovers": "0",
        "steals": "0",
        "blocks": "0",
        "offensiveRebounds": "0",
        "defensiveRebounds": "0",
        "fouls": "2",
        "plusMinus": "-12"
      }
    ],
    "periodScores": {
      "home": [
        29,
        31,
        38,
        "... 1 more"
      ],
      "away": [
        30,
        29,
        33,
        "... 1 more"
      ]
    }
  },
  "meta": {
    "rateLimit": {
      "limit": 125,
      "remaining": 124,
      "reset": 1796083200000
    }
  }
}

Box score API reference

Build with the NBA API

NBA endpoints

Checked against live data on 2026-10-04. Paths are relative to /api/v1/sports/basketball/leagues/nba.

EndpointPathNBANotes
Live scores/events/liveAvailable
Events (scoreboard)/eventsAvailable
Event detail/events/{eventId}Available
Play-by-play/events/{eventId}/playsAvailable
Box score/events/{eventId}/boxscoreAvailable
Odds/events/{eventId}/oddsSeasonal / not verifiedPreseason or off-season when checked; no odds were returned for the games available.
Win probability/events/{eventId}/winprobabilitySeasonal / not verifiedA preseason game returned no series; regular season not yet checked.
Teams/teamsAvailable
Rosters/teams/{teamId}/rosterAvailable
Athletes/athletes/searchAvailable
Injuries/injuriesAvailable
News/newsAvailable
Schedule / weeks/seasons/{season}/scheduleAvailable
NCAA tournament/seasons/{season}/tournamentNot available
Rankings/rankingsNot available
Webhooks/webhooksAvailable
WebSocket/websocket/authAvailable
  • Schedules are by date, not week: use /events for the current scoreboard and /seasons/{season}/schedule for a season. Week parameters return SCHEDULE_WEEKS_NOT_SUPPORTED.

Every NBA game in the events, live and schedule endpoints uses the same Event object as other leagues: Event object field reference.

NBA API in Python, JavaScript and curl

curl

curl -H "Authorization: Bearer $RSA_API_KEY" \
  "https://www.realtimesportsapi.com/api/v1/sports/basketball/leagues/nba/events?limit=5"

JavaScript (fetch)

const res = await fetch("https://www.realtimesportsapi.com/api/v1/sports/basketball/leagues/nba/events?limit=5", {
  headers: { Authorization: `Bearer ${process.env.RSA_API_KEY}` }
});
const { success, data, meta } = await res.json();
console.log(data, meta.rateLimit);

Python (requests)

import os, requests

res = requests.get(
    "https://www.realtimesportsapi.com/api/v1/sports/basketball/leagues/nba/events?limit=5",
    headers={"Authorization": f"Bearer {os.environ['RSA_API_KEY']}"},
    timeout=10,
)
body = res.json()
print(body["data"])

MCP prompt (Claude, Cursor, ChatGPT)

Using the Realtime Sports MCP server (https://www.realtimesportsapi.com/api/mcp), call get_events with sport "basketball" and league "nba" and list the games it returns with start times, status and scores for NBA.

Connect the hosted MCP server first: setup guide. Each tool call counts as one API call.

Each request above is 1 call. Free covers 125 calls a month after a 1,000-call first month, at 1 request/second. Starter is $29/month for 10,000 calls (about 333 a day) plus webhooks and WebSocket, so you stop polling for changes; 7-day free trial. Compare plans

Real-time NBA push: WebSocket and webhooks

Instead of polling, paid plans can receive every NBA game start, score change and final as it is detected (typically 20-30 seconds behind live play): a NBA WebSocket feed for live dashboards and apps, or NBA webhooks that POST each event to your server. On the Free plan you can watch the stream and send yourself a sample webhook from the dashboard.

Shipping a product with NBA data?

Polling works on every plan. Production apps usually also want events pushed to them, by webhook or WebSocket, as soon as we detect them (typically 20-30 seconds behind live play). These guides show the setup and the plan each one needs.

NBA API pricing and rate limits

The NBA API is included in every plan, Free included: one key covers all leagues. Free starts with 1,000 calls in your first 30 days (no card); paid plans start at $29/month with a 7-day free trial.

PlanPriceCallsRateWebSocketWebhooks
Free$0125/mo (1,000 first 30 days)1/s500 msgs/moNo
Starter$29/mo ($290/yr)10,000/mo5/sShares monthly poolShares monthly pool
Growth$49/mo ($490/yr)25,000/mo10/sShares monthly poolShares monthly pool
Pro$99/mo ($990/yr)50,000/mo20/s100,000 msgs/mo25,000/mo
Business$179/mo ($1,790/yr)150,000/mo40/s300,000 msgs/mo75,000/mo
Scale$299/mo ($2,990/yr)500,000/mo100/s500,000 msgs/mo100,000/mo

Every successful REST call counts as one call. Over the limit you get HTTP 429 with a Retry-After header. No SLA. Full pricing.

29 leagues monitored live: NFL, college football, NBA, men's college basketball, MLB, NHL and 23 soccer competitions.

FAQ

Is there a free NBA API?
Yes. The Free plan is $0 with 125 calls per month (1,000 in the first 30 days) at 1 request per second, no card required. The same key works for all 29 leagues.
How fresh is the NBA data?
Data is aggregated from public sources and is typically 20-30 seconds behind live play (about 1 second after our source). There is no SLA. It is not intended for in-play betting that needs sub-second data.
Which NBA endpoints are available?
Available: live scores, events (scoreboard), event detail, play-by-play, box score, teams, rosters, athletes, injuries, news, schedule / weeks. Not available or not verified: odds (seasonal / not verified), win probability (seasonal / not verified), ncaa tournament (not available), rankings (not available).
Does the NBA API include betting odds?
Not currently. Preseason or off-season when checked; no odds were returned for the games available. The odds endpoint returns data: null with a message when a game has no odds.
Does it include NBA injuries?
Yes. The injuries endpoint returned current NBA designations grouped by team, and player-availability normalizes them to values like OUT and QUESTIONABLE. Pass team for a complete team report.
Can I get NBA score updates pushed instead of polling?
Yes. Webhooks are included on every paid plan (Starter, Growth, Pro, Business, Scale). WebSocket is included on paid plans, and the Free plan gets a 500-message monthly preview. Both can be filtered to nba.