Get NBA play-by-play

GET/v1/nba/games/{game_id}/play-by-play

Granular event stream: every shot, assist, foul, substitution, and timeout with shot location coordinates.

Code samples

# Get live scores across every league
curl "https://api.sportapi.io/v1/nba/scores/live" \
  -H "Authorization: Bearer $API_KEY"

# Response
{
  "games": [{
    "game_id": "0022500412",
    "status": "in_progress",
    "period": 3, "clock": "07:42",
    "home": { "team": "BOS", "score": 78 },
    "away": { "team": "LAL", "score": 71 },
    "last_play": "J. Tatum makes 3-pt jumper from 25 ft"
  }]
}

Query parameters

ParameterTypeRequiredDescription
game_idstringYesNBA game ID
since_event_idstringNoResume from a specific event ID (useful for live polling)

Response

{
  "plays": [
    {
      "event_id": 412,
      "period": 3, "clock": "07:42",
      "team": "BOS", "player": "jayson-tatum",
      "type": "3pt_made",
      "description": "J. Tatum makes 3-pt jumper from 25 ft",
      "shot": { "x": 23.4, "y": 7.1, "distance_ft": 25.2, "made": true },
      "score": { "home": 78, "away": 71 }
    }
  ]
}

Error responses

StatusCodeDescription
401unauthorizedMissing or invalid API key
403tier_insufficientYour plan tier doesn't include this resource
429rate_limitedExceeded rate limit; honor Retry-After
500internal_errorServer error; retry with exponential backoff