NBA play-by-play API

Every NBA play in order, live or final: the play text, type, clock, quarter and score after the play, from a supported API rather than a scraper.

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.

AvailableReturned NBA data when checked.

Endpoint

  • GET/api/v1/sports/basketball/leagues/nba/events/{eventId}/plays

Live NBA example

Request

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

Response captured from live data at 2026-11-07 13:48 UTC (refreshed every few minutes). Long arrays are trimmed; meta.rateLimit values are illustrative for a Free key. Plays from Washington Wizards at Atlanta Hawks.

Response

{
  "success": true,
  "data": [
    {
      "id": "4019092874",
      "sequenceNumber": "4",
      "text": "Alex Sarr vs. Onyeka Okongwu (Kyshawn George gains possession)",
      "shortText": "Jumpball: WASHINGTON controls the tip.",
      "alternativeText": "Alex Sarr vs. Onyeka Okongwu (Kyshawn George gains possession)",
      "type": {
        "id": "615",
        "text": "Jumpball"
      },
      "period": 1,
      "clock": {
        "value": 720,
        "displayValue": "12:00"
      },
      "wallClock": "2026-11-07T00:10:15Z",
      "homeScore": 0,
      "awayScore": 0,
      "scoringPlay": false,
      "scoreValue": 0,
      "situation": null,
      "endSituation": null,
      "athletes": [
        {
          "id": "5160992",
          "name": "Alex Sarr",
          "displayName": "Alex Sarr",
          "shortName": "A. Sarr",
          "position": "C",
          "team": {
            "id": "27"
          },
          "order": 1
        },
        {
          "id": "4431680",
          "name": "Onyeka Okongwu",
          "displayName": "Onyeka Okongwu",
          "shortName": "O. Okongwu",
          "position": "F",
          "team": {
            "id": "1"
          },
          "order": 2
        },
        {
          "id": "5174563",
          "name": "Kyshawn George",
          "displayName": "Kyshawn George",
          "shortName": "K. George",
          "position": "F",
          "team": {
            "id": "27"
          },
          "order": 3
        }
      ],
      "priority": false,
      "modified": "2026-11-07T00:10Z"
    },
    {
      "id": "4019092877",
      "sequenceNumber": "7",
      "text": "Kyshawn George misses 11-foot step back jumpshot",
      "shortText": "K. George misses 11-foot step back jumpshot",
      "alternativeText": "Kyshawn George misses 11-foot step back jumpshot",
      "type": {
        "id": "132",
        "text": "Step Back Jump Shot"
      },
      "period": 1,
      "clock": {
        "value": 701,
        "displayValue": "11:41"
      },
      "wallClock": "2026-11-07T00:10:34Z",
      "homeScore": 0,
      "awayScore": 0,
      "scoringPlay": false,
      "scoreValue": 0,
      "situation": null,
      "endSituation": null,
      "athletes": [
        {
          "id": "5174563",
          "name": "Kyshawn George",
          "displayName": "Kyshawn George",
          "shortName": "K. George",
          "position": "F",
          "team": {
            "id": "27"
          },
          "role": "shooter",
          "type": "shooter",
          "order": 1
        }
      ],
      "priority": false,
      "modified": "2026-11-07T00:10Z"
    },
    {
      "id": "4019092878",
      "sequenceNumber": "8",
      "text": "Dyson Daniels defensive rebound",
      "shortText": "D. Daniels defensive rebound",
      "alternativeText": "Dyson Daniels defensive rebound",
      "type": {
        "id": "155",
        "text": "Defensive Rebound"
      },
      "period": 1,
      "clock": {
        "value": 701,
        "displayValue": "11:41"
      },
      "wallClock": "2026-11-07T00:10:34Z",
      "homeScore": 0,
      "awayScore": 0,
      "scoringPlay": false,
      "scoreValue": 0,
      "situation": null,
      "endSituation": null,
      "athletes": [
        {
          "id": "4869342",
          "name": "Dyson Daniels",
          "displayName": "Dyson Daniels",
          "shortName": "D. Daniels",
          "position": "G",
          "team": {
            "id": "1"
          },
          "role": "rebounder",
          "type": "rebounder",
          "order": 1
        }
      ],
      "priority": false,
      "modified": "2026-11-07T00:10Z"
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 3,
      "total": 482,
      "totalPages": 161,
      "hasNextPage": true,
      "hasPreviousPage": false
    },
    "rateLimit": {
      "limit": 125,
      "remaining": 124,
      "reset": 1796083200000
    }
  }
}

Code samples

curl

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

JavaScript (fetch)

const res = await fetch("https://www.realtimesportsapi.com/api/v1/sports/basketball/leagues/nba/events/401909287/plays?limit=3", {
  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/401909287/plays?limit=3",
    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_plays with sport "basketball" and league "nba" and pick a finished game from get_events and summarize its scoring plays 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

Fields

FieldTypeNotes
idstring
sequenceNumberstring
textstring
shortTextstring
alternativeTextstring
typeobject
periodinteger
clockobject
wallClockstring
homeScoreinteger
awayScoreinteger
scoringPlayboolean
scoreValueinteger
scoringTypestring
situationobject
endSituationobject
yardsGainedinteger
teamIdstring
athletesPlayAthlete[]
priorityboolean
modifiedstring

Rate limits and pricing

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.

FAQ

Is there a free NBA play-by-play API?
Yes. A free key (no card) includes every endpoint and league: 1,000 calls in the first 30 days, then 125 a month at 1 request per second. Paid plans start at $29/month for 10,000 calls and add webhooks and WebSocket.
Can I stream NBA plays live?
On paid plans, each new play is also pushed to you: webhooks send event.play and the WebSocket stream sends event_play, so you don't have to poll the plays endpoint during a game.
How far behind live is the NBA play-by-play?
Data typically runs 20-30 seconds behind live play, so it suits apps, alerts, dashboards and bots, not in-play betting.

Related