STAT-API

NBA game_possessions API

game_possessionsnba.game_possessions
Each offensive possession in an NBA game (regular season, play-in, IST, and playoffs — no preseason) — which team had the ball, how the possession started, how it ended (made shot, missed shot, turnover, foul), and how long it lasted.
GET/api/v1/nba/game_possessions
Requires one of: game_id — requests satisfying none of these return 400.
Parameters
game_idquerybigintoptional
Filter to a single game.
team_idquerybigintoptional
Filter by team in possession.
limitqueryintegeroptionaldefault 50
Page size. Defaults to 50; max 5000.
from_idquerybigintoptional
Return rows with id strictly greater than this value; page using the previous response's `next_from_id`. Omit on the first page.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  'https://api.stat-api.com/api/v1/nba/game_possessions?game_id=1'
Responses
200game_possessions rows matching the declared filter set, wrapped in { game_possessions, limit, next_from_id }. next_from_id is the last row's id on a full page — pass it back via ?from_id= to walk the full result; null marks the terminal page.application/jsonshow example ▸
400No declared filter set was satisfied — response body matches MissingRequiredFiltersError; pick one combo from the accepted-sets hint and resend.application/json
Response Schema(29 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 2357
team_id
bigintnullable—
e.g. 19
ast
integer——
e.g. 0
away_score
integer——
e.g. 38
blk
integer——
e.g. 0
cum_away_poss
integer——
e.g. 13
cum_home_poss
integer——
e.g. 75
dreb
integer——
e.g. 0
end_clock
integernullable——
e.g. 0
end_nba_event_num
integer——
e.g. 7
fg3a
integer——
e.g. 0
fg3m
integer——
e.g. 0
fga
integer——
e.g. 1
fgm
integer——
e.g. 0
fta
integer——
e.g. 0
ftm
integer——
e.g. 0
game_seconds_elapsed
integer——
e.g. 720
home_score
integer——
e.g. 82
oreb
integer——
e.g. 0
period
integer——
e.g. 1
pf
integer——
e.g. 0
pts
integer——
e.g. 0
start_clock
integer——
e.g. 720
start_nba_event_num
integer——
e.g. 4
stl
integer——
e.g. 0
time_actual_end
timestamptznullable——
e.g. 2024-10-30T02:08:06.000Z
time_actual_start
timestamptznullable——
e.g. 2024-10-28T23:53:48.400Z
tov
integer——
e.g. 0
GET/api/v1/nba/game_possessions/{id}
Parameters
idpathbigintrequired
Primary key (id) of the game_possession row.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  'https://api.stat-api.com/api/v1/nba/game_possessions/{pk_value}'
Responses
200Single game_possession row.application/jsonshow example ▸
404Row not found.
Response Schema(29 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 2357
team_id
bigintnullable—
e.g. 19
ast
integer——
e.g. 0
away_score
integer——
e.g. 38
blk
integer——
e.g. 0
cum_away_poss
integer——
e.g. 13
cum_home_poss
integer——
e.g. 75
dreb
integer——
e.g. 0
end_clock
integernullable——
e.g. 0
end_nba_event_num
integer——
e.g. 7
fg3a
integer——
e.g. 0
fg3m
integer——
e.g. 0
fga
integer——
e.g. 1
fgm
integer——
e.g. 0
fta
integer——
e.g. 0
ftm
integer——
e.g. 0
game_seconds_elapsed
integer——
e.g. 720
home_score
integer——
e.g. 82
oreb
integer——
e.g. 0
period
integer——
e.g. 1
pf
integer——
e.g. 0
pts
integer——
e.g. 0
start_clock
integer——
e.g. 720
start_nba_event_num
integer——
e.g. 4
stl
integer——
e.g. 0
time_actual_end
timestamptznullable——
e.g. 2024-10-30T02:08:06.000Z
time_actual_start
timestamptznullable——
e.g. 2024-10-28T23:53:48.400Z
tov
integer——
e.g. 0