Skip to contents

Competitions of a season (leagues, cups, youth, 3x3, national teams), or of every season.

Endpoint: GET https://api.kzs.si/api/v1/public/competitions/

Usage

kzs_competitions(season = NULL)

Arguments

season

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

Value

A hoopR_data tibble: Competitions of a season (leagues, cups, youth, 3x3, national teams), or of every season. An empty valid answer raises hoopR_no_data; the columns are always these, in this order (sportsdataverse-py kzs_competitions):

col_nametypedescription
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.
namecharacterCompetition name, Slovenian; the sponsor name changes over the years (glossary in kzs-returns.md).
gendercharacterMALE or FEMALE.
categorycharacterAge category: ABSOLUTE (senior) or U8-U23 / ANY (code table in kzs-returns.md).
rankcharacterTier: FIRST-FOURTH or TOURNAMENT (code table).
season_idintegerSeason id: OPAQUE, not a year (1 = 2000/2001 ... 27 = 2026/2027, 31 = 1991/1992). The season name is 'START/END'; the sdv season is the END year (the second half of name).
season_namecharacterSeason, 'START/END' (2025/2026); sdv season = the END year.
season_is_activelogicalTrue for the current season only (2026/2027 on 2026-10-12).
season_activelogicalSame as isActive.
typecharacterCompetition type (code table); absent on 2 competitions.
seasonintegerThe competition's season.

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_competitions(season = 2026))
#> ── KZS Competitions from api.kzs.si ───────────────────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-10-31 21:31:15 UTC
#> # A tibble: 44 × 11
#>    competition_id name               gender category rank  season_id season_name
#>             <int> <chr>              <chr>  <chr>    <chr>     <int> <chr>      
#>  1            579 Liga OTP banka     MALE   ABSOLUTE FIRST        26 2025/2026  
#>  2            553 Pripravljalne tek… MALE   ABSOLUTE FIRST        26 2025/2026  
#>  3            585 1. Ž SKL           FEMALE ABSOLUTE FIRST        26 2025/2026  
#>  4            546 Pripravljalne tek… FEMALE ABSOLUTE FIRST        26 2025/2026  
#>  5            581 2. SKL             MALE   ABSOLUTE SECO…        26 2025/2026  
#>  6            582 3. SKL             MALE   ABSOLUTE THIRD        26 2025/2026  
#>  7            583 4. SKL             MALE   ABSOLUTE FOUR…        26 2025/2026  
#>  8            584 Pokal Spar         MALE   ABSOLUTE TOUR…        26 2025/2026  
#>  9            580 Superpokal         MALE   ABSOLUTE TOUR…        26 2025/2026  
#> 10            586 Pokal članice      FEMALE ABSOLUTE TOUR…        26 2025/2026  
#> # ℹ 34 more rows
#> # ℹ 4 more variables: season_is_active <lgl>, season_active <lgl>, type <chr>,
#> #   season <int>
# }