Skip to contents

Play-by-play ('film') of a finished game with court x/y (2021-22 and 2026-27 only).

Endpoint: GET https://bnxt.sportpress.info/api/v1/film/game/{competition_id}/{game_id}

Usage

sportpress_game_film(competition_id, game_id)

Arguments

competition_id

(required) Competition id (integer), ONE per season of the league: 24 = 2025-26, 25 = 2026-27 (sportpress_phases() maps a season to it).

game_id

(required) Game id (integer), unique across seasons; from sportpress_schedule() (game_id).

Value

A hoopR_data tibble: Play-by-play ('film') of a finished game with court x/y (2021-22 and 2026-27 only). An empty valid answer raises hoopR_no_data; the columns are always these, in this order (sportsdataverse-py sportpress_game_film):

col_nametypedescription
game_idintegerGame id the film was asked for (the body does not echo it).
competition_idintegerCompetition id the film was asked for; checked against the game.
orderintegerEvent sequence number in the game, strictly increasing from 0.
periodintegerPeriod of the event: 1-4 quarters, 5 and up overtimes.
minuteintegerWhole minutes ELAPSED in the period (not clock remaining).
secondintegerSeconds elapsed within that minute.
team_sidecharacterSide of the game the row belongs to: home or away (the provider's is_home, or side 1 / 2).
competition_team_idintegerCompetition-team id (key space: sportpress competition teams): a team in ONE competition, so a club has a new id every season (Antwerp = 3 in 2021-22, 506 in 2025-26, 541 in 2026-27). uu_team_id is the stable club key.
teamcharacterTeam display name including the sponsor; varies with language and playoff suffixes: never join on it.
team_short_namecharacterThree-letter club code (ANT, MON, ...), stable across seasons in the samples.
event_codeintegerProvider event code: 1000 made shot, 1001 missed shot, 1002 defensive rebound, 1003 offensive rebound, 1004 steal, 1005 turnover, 1006 foul drawn, 1007 foul committed, 1008 assist, 1009 block, 1011 substitution, 1101 period marker; 2xxx team events (meaning unverified).
event_subcodeintegerProvider sub-type of the event: for shots 1, 2 and 5 = two-pointer, 3 = three-pointer, 4 = free throw; turnover and foul sub-types are unnamed by the provider.
xintegerCourt x position of the event in the provider's integer court coordinates (0 on events with none); the coordinate system and orientation are unverified.
yintegerCourt y position of the event in the provider's integer court coordinates (0 on events with none); the coordinate system and orientation are unverified.
home_scoreintegerRunning home score AFTER the event; the maximum is the final score.
away_scoreintegerRunning away score AFTER the event; the maximum is the final score.
player_idintegerPlayer id of the actor; null on team events and period markers.
first_namecharacterGiven name of the player as entered in the CMS.
last_namecharacterFamily name of the player as entered in the CMS.
nationality_codecharacterNationality code in FIBA style (USA, BEL, NED): DIRTY, with lower-case variants, '/'-joined pairs (USA/BEL), the empty string and 'HOL'; normalise before joining.
birth_dateDateDate of birth as shown on the public player page; null when unknown.
player2_idintegerPlayer id of the second player; filled on substitutions only.
player2_first_namecharacterGiven name of the second player; substitutions only.
player2_last_namecharacterFamily name of the second player; substitutions only.

Details

Source, terms of use, request pacing, seasons, ids, coverage and error classes of this family: see the notes in sportpress_ui_strings().

 sportpress_game_film(competition_id = 25, game_id = 11295)