Skip to main content
Version: 0.2.0

Basketligaen — Basketligaen site API (www.basketligaen.dk/api, Denmark; Sportality) — Game

sportality_game_header​

Game header: Genius match id (extId), arena, state, teams, scores.

Endpoint URL: GET https://www.basketligaen.dk/api/sports-v2/game-info/{game_uuid}

Valid URL: https://www.basketligaen.dk/api/sports-v2/game-info/c4hh5nig6t

API ParameterPythonPatternRequiredNullableDescription
game_uuidgame_uuidYGame uuid: gameInfo[].uuid of the schedule (10 lowercase letters and digits). Key space: platform game uuids; the Genius match id is extId / gameSourceId in the body.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
instance_context_site_team_is_in_gameBooleanWhether the requesting site's own team plays in the game.
instance_context_site_team_is_home_teamBooleanWhether the requesting site's own team is the home team.
instance_context_site_team_is_away_teamBooleanWhether the requesting site's own team is the away team.
game_info_game_uuidStringGame uuid (platform key space).
game_info_ext_idInt64Genius match id (Int64; the same number as gameday game_source_id).
game_info_start_date_timeStringScheduled start, ISO 8601 UTC with milliseconds.
game_info_arena_nameStringName of the arena (venue).
game_info_stateStringGame state, underscore form: post_game once played. Values: post_game = played (sports-v2 game-info).
game_info_overtimeBooleanWhether the game went to overtime.
game_info_shootoutStringUnobserved: null in every sample and every full body. When filled: Shootout flag (null on every game seen).
game_info_series_codeStringSeries code (DBL).
game_info_series_nameStringSeries name (Basketligaen).
game_info_round_numberInt64Round number (0).
game_info_round_labelStringRound label ('').
game_info_series_display_nameStringSeries display name (Basketligaen).
home_team_names_codeStringThree-letter team code (HOL, RAN ...); codes changed between seasons for some clubs (BAK in 2026, BKA in 2025 for Bakken Bears).
home_team_names_shortStringShort name of the team.
home_team_names_longStringLong name of the team.
home_team_names_fullStringFull name of the team.
home_team_names_code_siteStringTeam code as the club's own site shows it.
home_team_names_short_siteStringShort team name as the club's own site shows it.
home_team_names_full_siteStringFull team name as the club's own site shows it.
home_team_names_long_siteStringLong team name as the club's own site shows it.
home_team_uuidStringHome team uuid (platform key space); joins /sports-v2/teams/{team_uuid}.
home_team_instance_idStringSite instance id of the home club (platform key space).
home_team_founded_onStringYear the club was founded ('' when unknown).
home_team_iconStringHome team logo URL.
home_team_scoreInt64Points scored by the home team.
away_team_names_codeStringThree-letter team code (HOL, RAN ...); codes changed between seasons for some clubs (BAK in 2026, BKA in 2025 for Bakken Bears).
away_team_names_shortStringShort name of the team.
away_team_names_longStringLong name of the team.
away_team_names_fullStringFull name of the team.
away_team_names_code_siteStringTeam code as the club's own site shows it.
away_team_names_short_siteStringShort team name as the club's own site shows it.
away_team_names_full_siteStringFull team name as the club's own site shows it.
away_team_names_long_siteStringLong team name as the club's own site shows it.
away_team_uuidStringAway team uuid (platform key space); joins /sports-v2/teams/{team_uuid}.
away_team_instance_idStringSite instance id of the away club (platform key space).
away_team_founded_onStringYear the club was founded ('' when unknown).
away_team_iconStringAway team logo URL.
away_team_scoreInt64Points scored by the away team.
ssgt_uuidStringssgt uuid (platform key space: one season + series + game type); joins /statistics-v2/layout-info originalSeasonSeriesGameTypeTeams[].ssgtUuid and every route keyed by ssgt.
series_uuidStringSeries uuid (platform key space; Basketligaen = m1ay3mpa4t, the only series on this host).

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The site answered 404, an empty body (gameday routes before 2023/24, or an unknown game), a table with no rows, or the season and game type are not in layout-info.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. An error envelope or non-JSON 200, another game / team / athlete / ssgt than the one asked for, an unfinished game or truncated play-by-play, a cut stats table, or any other failed fetch (a 500 is the site's answer for an unknown uuid and is not retried).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

sportality_game_header(game_uuid='c4hh5nig6t')

sportality_game_overview​

Score, state, clock and the Genius ids of one game (2023/24 on).

Endpoint URL: GET https://www.basketligaen.dk/api/gameday/game-overview/{game_uuid}

Valid URL: https://www.basketligaen.dk/api/gameday/game-overview/c4hh5nig6t

API ParameterPythonPatternRequiredNullableDescription
game_uuidgame_uuidYGame uuid: gameInfo[].uuid of the schedule (10 lowercase letters and digits). Key space: platform game uuids; the Genius match id is extId / gameSourceId in the body.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
game_uuidStringPlatform game uuid (c4hh5nig6t); every gameday route takes it.
home_team_game_source_idInt64Genius match id (Genius key space; integer here).
home_team_game_idInt64Genius match id (Genius key space; the same number as gameSourceId).
home_team_team_idInt64Genius team id of the home team (Genius key space; Int64).
home_team_team_nameStringName of the home team.
home_team_team_codeStringHome team code as Genius spells it (mixed case, 'Hol').
home_team_team_numberInt64Team number in the game; home is 1.
home_team_placeStringhome. Values: home = home team.
home_team_instance_idStringSite instance id of the home club (platform key space).
home_team_sourceStringFeed that produced the row (genius-basketball-stream-reader).
home_team_game_uuidStringGame uuid (platform key space).
away_team_game_source_idInt64Genius match id (Genius key space; integer here).
away_team_game_idInt64Genius match id (Genius key space; the same number as gameSourceId).
away_team_team_idInt64Genius team id of the away team (Genius key space; Int64).
away_team_team_nameStringName of the away team.
away_team_team_codeStringAway team code as Genius spells it.
away_team_team_numberInt64Team number in the game; away is 2.
away_team_placeStringaway. Values: away = away team.
away_team_instance_idStringSite instance id of the away club (platform key space).
away_team_sourceStringFeed that produced the row (genius-basketball-stream-reader).
away_team_game_uuidStringGame uuid (platform key space).
home_goalsInt64Points scored by the home team.
away_goalsInt64Points scored by the away team.
stateStringGame state. Schedule and day views: pre-game or post-game (hyphen). sports-v2 game-info: post_game (underscore). Gameday overview: GameEnded. Values: GameEnded = played (gameday overview).
time_game_idInt64Genius match id (Genius key space).
time_periodInt64Period number the clock stands in (1-4 regulation, 5+ overtime).
time_period_timeStringClock remaining in the period, 'hh:mm:ss' ('00:00:00' once the period or game is over).
time_instance_idStringSite instance that owns the feed (platform key space; dbl1_dbl).
time_sourceStringFeed that produced the row (genius-basketball-stream-reader).

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The site answered 404, an empty body (gameday routes before 2023/24, or an unknown game), a table with no rows, or the season and game type are not in layout-info.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. An error envelope or non-JSON 200, another game / team / athlete / ssgt than the one asked for, an unfinished game or truncated play-by-play, a cut stats table, or any other failed fetch (a 500 is the site's answer for an unknown uuid and is not retried).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

sportality_game_overview(game_uuid='c4hh5nig6t')

sportality_game_summary​

Points per period, team comparison and best scorers (2023/24 on).

Endpoint URL: GET https://www.basketligaen.dk/api/gameday/game-info/{game_uuid}

Valid URL: https://www.basketligaen.dk/api/gameday/game-info/c4hh5nig6t

API ParameterPythonPatternRequiredNullableDescription
game_uuidgame_uuidYGame uuid: gameInfo[].uuid of the schedule (10 lowercase letters and digits). Key space: platform game uuids; the Genius match id is extId / gameSourceId in the body.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
team_head2_headStringTeam comparison rows (2P, 3P, FT, rebounds, ...), home and away side by side.
team_period_captionStringColumn caption of the table (G = goals/points). Values: G = goals/points column.
team_period_overtimeBooleanWhether the game went to overtime.
team_period_shootoutBooleanWhether the game was decided by a shootout (false).
team_period_statsStringOne row per period.
best_scorersStringThe game's top scorers, one per side (or the two best).
statistics_providerStringStats provider of the data (genius-basketball = Genius Sports LiveStats).

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The site answered 404, an empty body (gameday routes before 2023/24, or an unknown game), a table with no rows, or the season and game type are not in layout-info.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. An error envelope or non-JSON 200, another game / team / athlete / ssgt than the one asked for, an unfinished game or truncated play-by-play, a cut stats table, or any other failed fetch (a 500 is the site's answer for an unknown uuid and is not retried).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example​

sportality_game_summary(game_uuid='c4hh5nig6t')