Skip to contents

Box score of a final game (2015/16 on): one row per player of both teams.

Endpoint: GET https://api.kzs.si/api/v1/public/matches/{match_id}/stats

Usage

kzs_box_score(match_id)

Arguments

match_id

(required) Match id (match_id in kzs_matches), e.g. 101839. Global across seasons.

Value

A hoopR_data tibble: Box score of a final game (2015/16 on): one row per player of both teams. An empty valid answer raises hoopR_no_data; the columns are always these, in this order (sportsdataverse-py kzs_box_score):

col_nametypedescription
match_idintegerMatch id: the federation key of a game, global across seasons (joins kzs_matches and kzs_match).
team_sidecharacterWhich side of the match the row belongs to: home (the organiser, firstTeam on the wire) or away.
team_idintegerTeam id: one club team in one season (joins kzs_teams); not the match-team id and not the club id.
team_namecharacterName of the team for the season, sponsor included.
minutesdoubleThe player's minutes played, decimal minutes (39.67 = 39 min 40 s); the team line sums its players (225.0 = 5 x 45 with overtime).
two_pmintegerThe player's two-point field goals made.
two_paintegerThe player's two-point field goals attempted.
two_p_percdoubleThe player's two-point percentage, 0-100.
three_pmintegerThe player's three-point field goals made.
three_paintegerThe player's three-point field goals attempted.
three_p_percdoubleThe player's three-point percentage, 0-100.
f_tmintegerThe player's free throws made.
f_taintegerThe player's free throws attempted.
f_t_percdoubleThe player's free-throw percentage, 0-100.
fg_mintegerThe player's field goals made.
fg_aintegerThe player's field goals attempted.
fg_percdoubleThe player's field-goal percentage, 0-100.
offensive_reboundsintegerThe player's offensive rebounds.
defensive_reboundsintegerThe player's defensive rebounds.
total_reboundsintegerThe player's total rebounds.
assistsintegerThe player's assists.
stealsintegerThe player's steals.
turnoversintegerThe player's turnovers.
blocks_in_favorintegerThe player's shots blocked (blocks made).
blocks_againstintegerThe player's own shots that were blocked.
foul_commitedintegerThe player's fouls committed.
foul_receivedintegerThe player's fouls drawn.
p_irintegerThe player's PIR, performance index rating ((points + rebounds + assists + steals + blocks + fouls drawn) - (missed field goals + missed free throws + turnovers + shots blocked + fouls committed)).
plus_minusintegerThe player's plus-minus: points scored minus allowed while on court (team line: the final margin).
assists_turnover_ratiodoubleThe player's assist-to-turnover ratio (0 in every sample: not computed).
defensive_ratingdoubleThe player's defensive rating (0 in every sample: not computed).
efficiencyintegerThe player's efficiency as the feed computes it (equal to pIR on 2025-26 team lines).
pointsintegerThe player's points.
efficiency_customdoubleThe player's custom efficiency as the federation computes it (equal to efficiency on player rows; 0 on team lines).
efficiency_game_scoredoubleThe player's game score (0 in every sample: not computed).
fast_break_points_attemptedintegerThe player's fast-break attempts (0 in every sample: not computed).
fast_break_points_madeintegerThe player's fast-break makes (0 in every sample: not computed).
usage_percentagedoubleThe player's usage percentage (0 in every sample: not computed).
m_vp_votesintegerThe player's MVP votes (0 in every sample).
minusintegerThe player's points allowed on court (0 in every sample: not computed).
offensive_ratingdoubleThe player's offensive rating (0 in every sample: not computed).
p_erdoubleThe player's PER (0 in every sample: not computed).
plusintegerThe player's points scored on court (0 in every sample: not computed).
points_fast_breakintegerThe player's fast-break points.
points_in_the_paintintegerThe player's points in the paint.
points_in_the_paint_attemptedintegerThe player's paint attempts (0 in every sample: not computed).
points_in_the_paint_madeintegerThe player's paint makes (0 in every sample: not computed).
points_second_chanceintegerThe player's second-chance points.
second_chance_points_attemptedintegerThe player's second-chance attempts (0 in every sample: not computed).
second_chance_points_madeintegerThe player's second-chance makes (0 in every sample: not computed).
true_shooting_attemptsintegerThe player's true-shooting attempts (0 in every sample: not computed).
true_shooting_percentagedoubleThe player's true-shooting percentage (0 in every sample: not computed).
player_idintegerPlayer id (KZS player registry). Joins to /players/{playerId}, box-score and play-by-play playerId.
photo_uuidcharacterPlayer photo: image file id, served at https://api.kzs.si/public/images/{uuid}.
match_team_player_firstnamecharacterThe player's given name, as entered for this match (lower-case n in this route).
match_team_player_lastnamecharacterThe player's family name, as entered for this match (lower-case n in this route).
match_team_player_year_of_birthcharacterBirth year from the match entry, sent as a string ('2002'); the profile person.yearOfBirth is an integer.
jersey_numbercharacterShirt number worn, sent as a string ('1', '55').
starting_lineuplogicalTrue when the player started.
captainlogicalGames as captain.
playedlogicalTrue when the player got on court.

Details

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

Examples

# \donttest{
  try(kzs_box_score(match_id = 101839))
#> ── KZS Player Box Score from api.kzs.si ───────────────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-10-31 21:31:13 UTC
#> # A tibble: 23 × 61
#>    match_id team_side team_id team_name         minutes two_pm two_pa two_p_perc
#>       <int> <chr>       <int> <chr>               <dbl>  <int>  <int>      <dbl>
#>  1   101839 home        17551 Perspektiva Ilir…   39.7       5      8       62.5
#>  2   101839 home        17551 Perspektiva Ilir…    5.68      0      0        0  
#>  3   101839 home        17551 Perspektiva Ilir…    0         0      0        0  
#>  4   101839 home        17551 Perspektiva Ilir…   24.5       0      3        0  
#>  5   101839 home        17551 Perspektiva Ilir…   36.9       5      9       55.6
#>  6   101839 home        17551 Perspektiva Ilir…   37.4       6      7       85.7
#>  7   101839 home        17551 Perspektiva Ilir…    4.76      3      3      100  
#>  8   101839 home        17551 Perspektiva Ilir…   31.7       5      5      100  
#>  9   101839 home        17551 Perspektiva Ilir…   16.6       1      2       50  
#> 10   101839 home        17551 Perspektiva Ilir…   20.2       1      5       20  
#> # ℹ 13 more rows
#> # ℹ 53 more variables: three_pm <int>, three_pa <int>, three_p_perc <dbl>,
#> #   f_tm <int>, f_ta <int>, f_t_perc <dbl>, fg_m <int>, fg_a <int>,
#> #   fg_perc <dbl>, offensive_rebounds <int>, defensive_rebounds <int>,
#> #   total_rebounds <int>, assists <int>, steals <int>, turnovers <int>,
#> #   blocks_in_favor <int>, blocks_against <int>, foul_commited <int>,
#> #   foul_received <int>, p_ir <int>, plus_minus <int>, …
# }