Skip to contents

One competition: season, gender, category, rank and type (its phases are kzs_phases).

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

Usage

kzs_competition(competition_id)

Arguments

competition_id

(required) Competition id (competition_id in kzs_competitions): one per competition per season, e.g. 579 (men's first league 2025/26).

Value

A hoopR_data tibble: One competition: season, gender, category, rank and type (its phases are kzs_phases). An empty valid answer raises hoopR_no_data; the columns are always these, in this order (sportsdataverse-py kzs_competition):

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 (glossary in kzs-returns.md).
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.
gendercharacterMALE or FEMALE.
categorycharacterAge category: ABSOLUTE (senior) or U8-U23 / ANY (code table in kzs-returns.md).
rankcharacterTier: FIRST-FOURTH or TOURNAMENT (code table).
typecharacterCompetition type (code table).
seasonintegerSeason of the record: opaque id and 'START/END' name.
social_mediascharacterUnobserved: null, or an empty array, in every sample, so its type and meaning are unconfirmed.

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_competition(competition_id = 579))
#> ── KZS Competition from api.kzs.si ────────────────────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-10-31 21:31:14 UTC
#> # A tibble: 1 × 12
#>   competition_id name       season_id season_name season_is_active season_active
#>            <int> <chr>          <int> <chr>       <lgl>            <lgl>        
#> 1            579 Liga OTP …        26 2025/2026   FALSE            FALSE        
#> # ℹ 6 more variables: gender <chr>, category <chr>, rank <chr>, type <chr>,
#> #   season <int>, social_medias <chr>
# }