Skip to contents

A player's totals and per-game averages in each competition of one season.

Endpoint: GET https://api.kzs.si/api/v1/public/players/{player_id}/stats

Usage

kzs_player_stats(player_id, season)

Arguments

player_id

(required) Player registry id (player_id in a box score or roster), e.g. 106285. Not the person id.

season

(required) Season END year (2027 = 2026/2027); the wrapper maps it to KZS' opaque season id.

Value

A hoopR_data tibble: A player's totals and per-game averages in each competition of one season. An empty valid answer raises hoopR_no_data; the columns are always these, in this order (sportsdataverse-py kzs_player_stats):

col_nametypedescription
player_idintegerPlayer registry id of the request (the body does not echo it).
season_idintegerOpaque KZS season id (27 = 2026/2027); the sdv season is the END year in season.
seasonintegerSeason END year (2026/2027 = 2027), from the row's own season name or id, else from the request.
competition_idintegerCompetition id: one per competition per season (men's top league 2025-26 = 579, 2026-27 = 608). Joins to /competitions/{competitionId} and the competitionId query params.
a1integerSeason total: free throws attempted.
a2integerSeason total: two-pointers attempted.
a3integerSeason total: three-pointers attempted.
ptsintegerSeason total: points.
assintegerSeason total: assists.
blagintegerSeason total: own shots blocked (blocks against).
blfvintegerSeason total: blocks made (blocks in favour).
captainintegerGames as captain.
m1integerSeason total: free throws made.
m2integerSeason total: two-pointers made.
m3integerSeason total: three-pointers made.
minsdoubleSeason total: minutes played (decimal minutes).
pfcmintegerSeason total: fouls committed.
pfrvintegerSeason total: fouls received.
rdintegerSeason total: defensive rebounds.
rointegerSeason total: offensive rebounds.
stintegerSeason total: steals.
startinglineupintegerGames the player started in the competition.
tovintegerSeason total: turnovers.
playedintegerGames the player played in the competition.
plus_minusintegerSeason total: the team's point difference while the player was on court.
efficiencyintegerSeason total: efficiency (PIR).
avgptsdoublePer game: points.
avga1doublePer game: free throws attempted.
avga2doublePer game: two-pointers attempted.
avga3doublePer game: three-pointers attempted.
avgassdoublePer game: assists.
avgblagdoublePer game: own shots blocked (blocks against).
avgblfvdoublePer game: blocks made (blocks in favour).
avgm1doublePer game: free throws made.
avgm2doublePer game: two-pointers made.
avgm3doublePer game: three-pointers made.
avgminsdoublePer game: minutes played (decimal minutes).
avgpfcmdoublePer game: fouls committed.
avgpfrvdoublePer game: fouls received.
avgrddoublePer game: defensive rebounds.
avgrodoublePer game: offensive rebounds.
avgsecsintegerPer game: seconds (0 in every sample: unused).
avgstdoublePer game: steals.
avgtovdoublePer game: turnovers.
avgplus_minusdoublePer game: the team's point difference while the player was on court.
avgefficiencydoublePer game: efficiency (PIR).
live_statslogicalTrue when the competition has live stats.
competition_namecharacterCompetition name, Slovenian (e.g. 'Liga OTP banka', 'Pokal Spar').
competition_rankcharacterTier of the competition (code table).
competition_categorycharacterCategory of the competition (code table).
competition_gendercharacterMALE or FEMALE competition.

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_player_stats(player_id = 106285, season = 2026))
#> ── KZS Player Season Stats from api.kzs.si ────────────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-10-31 21:31:23 UTC
#> # A tibble: 2 × 51
#>   player_id season_id season competition_id    a1    a2    a3   pts   ass  blag
#>       <int>     <int>  <int>          <int> <int> <int> <int> <int> <int> <int>
#> 1    106285        26   2026            579   108   175   162   432   148    16
#> 2    106285        26   2026            584     9     8    12    25     3     1
#> # ℹ 41 more variables: blfv <int>, captain <int>, m1 <int>, m2 <int>, m3 <int>,
#> #   mins <dbl>, pfcm <int>, pfrv <int>, rd <int>, ro <int>, st <int>,
#> #   startinglineup <int>, tov <int>, played <int>, plus_minus <int>,
#> #   efficiency <int>, avgpts <dbl>, avga1 <dbl>, avga2 <dbl>, avga3 <dbl>,
#> #   avgass <dbl>, avgblag <dbl>, avgblfv <dbl>, avgm1 <dbl>, avgm2 <dbl>,
#> #   avgm3 <dbl>, avgmins <dbl>, avgpfcm <dbl>, avgpfrv <dbl>, avgrd <dbl>,
#> #   avgro <dbl>, avgsecs <int>, avgst <dbl>, avgtov <dbl>, …
# }