Skip to main content
Version: 0.2.0

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

sportality_team​

One team.

Endpoint URL: GET https://www.basketligaen.dk/api/sports-v2/teams/{team_uuid}

Valid URL: https://www.basketligaen.dk/api/sports-v2/teams/rfo82vr830

API ParameterPythonPatternRequiredNullableDescription
team_uuidteam_uuidYTeam uuid: homeTeamInfo.uuid / awayTeamInfo.uuid in the schedule or teamList[].uuid. Key space: platform team uuids (not the numeric Genius team id).

Returns​

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

col_nametypedescription
names_codeStringThree-letter team code (HOL, RAN ...); codes changed between seasons for some clubs (BAK in 2026, BKA in 2025 for Bakken Bears).
names_shortStringShort name of the team.
names_longStringLong name of the team.
names_fullStringFull name of the team.
names_code_siteStringTeam code as the club's own site shows it.
names_short_siteStringShort team name as the club's own site shows it.
names_full_siteStringFull team name as the club's own site shows it.
names_long_siteStringLong team name as the club's own site shows it.
infoStringDetail record (shape depends on the route; see the child columns).
uuidStringPlatform uuid of this record (10-character lowercase key space of its record type; joins the route that serves it).
nationalityStringISO 3166-1 alpha-2 country code.
arena_nameStringName of the arena.
public_urlStringThe club's own website.
iconStringTeam logo URL (SVG on sportality.cdn.s8y.se).
owner_instance_idStringSite instance id of the club that owns the team (platform key space, e.g. hol2_hol).
site_display_nameStringTeam name as the league site displays it.

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_team(team_uuid='rfo82vr830')

sportality_team_played_games​

A team's recent games (current season view).

Endpoint URL: GET https://www.basketligaen.dk/api/sports-v2/played-games/{team_uuid}

Valid URL: https://www.basketligaen.dk/api/sports-v2/played-games/rfo82vr830

API ParameterPythonPatternRequiredNullableDescription
team_uuidteam_uuidYTeam uuid: homeTeamInfo.uuid / awayTeamInfo.uuid in the schedule or teamList[].uuid. Key space: platform team uuids (not the numeric Genius team id).

Returns​

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

col_nametypedescription
dateStringGame date, 'D mon YY' in English ('10 oct 26').
timeStringLocal start time 'HH:MM' (Europe/Copenhagen).
game_uuidStringPlatform game uuid (c4hh5nig6t); every gameday route takes it.
start_date_timeStringScheduled start. On the schedule route this is the LOCAL (Europe/Copenhagen) wall time 'YYYY-MM-DD HH:MM:SS' with no zone; on the other routes it is ISO 8601 UTC with milliseconds (compare rawStartDateTime).
stateStringGame state. Schedule and day views: pre-game or post-game (hyphen). sports-v2 game-info: post_game (underscore). Gameday overview: GameEnded. Values: post-game = played (schedule, day views).
overtimeBooleanWhether the game went to overtime.
shootoutStringUnobserved: null in every sample and every full body. When filled: Whether the game was decided by a shootout (null on every game seen; basketball has none).
ssgt_uuidStringssgt uuid (platform key space: one season + series + game type); joins /statistics-v2/layout-info originalSeasonSeriesGameTypeTeams[].ssgtUuid and every route keyed by ssgt.
home_team_statusStringWIN or LOSE for the home team once the game is played; absent or empty before. Values: LOSE = the team lost; WIN = the team won.
home_team_uuidStringHome team uuid (platform key space); joins /sports-v2/teams/{team_uuid}.
home_team_owner_instance_idStringSite instance id of the club that owns the team (platform key space, e.g. hol2_hol).
home_team_codeStringThree-letter code of the home team.
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_scoreInt64Home points; null before the game is played.
home_team_iconStringHome team logo URL.
away_team_statusStringWIN or LOSE for the away team once the game is played; absent or empty before. Values: LOSE = the team lost; WIN = the team won.
away_team_uuidStringAway team uuid (platform key space); joins /sports-v2/teams/{team_uuid}.
away_team_owner_instance_idStringSite instance id of the club that owns the team (platform key space, e.g. hol2_hol).
away_team_codeStringThree-letter code of the away 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_scoreInt64Away points; null before the game is played.
away_team_iconStringAway team logo URL.
venue_uuidStringVenue uuid (platform key space).
venue_nameStringVenue name; absent when unknown.
series_uuidStringSeries uuid (platform key space).
series_codeStringSeries display name (Basketligaen; NOT the DBL code).
series_display_nameStringSeries display name (Basketligaen).

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_team_played_games(team_uuid='rfo82vr830')

sportality_team_stats​

Team totals per period (2023/24 on).

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

Valid URL: https://www.basketligaen.dk/api/gameday/team-stats/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_sideStringhome or away: the side the row belongs to.
game_source_idInt64Genius match id (Int64), the same number as game_id and sports-v2 game_info_ext_id.
game_idInt64Genius match id (Int64), the join to the genius family; on play-by-play lines, an integer elsewhere.
team_idInt64Genius team id (Int64): in gameday bodies, an integer in standings and stats tables.
team_nameStringName of the team.
team_codeStringPlatform team code (HOL, RAN).
team_numberInt64Team number; home is 1.
instance_idStringSite instance that owns the feed (platform key space; dbl1_dbl).
sourceStringFeed that produced the row (genius-basketball-stream-reader).
game_uuidStringPlatform game uuid (c4hh5nig6t); every gameday route takes it.
periodInt64Period: 0 = the whole game, 1-4 the quarters, 5 and up overtime.
period_typeStringREGULAR or OVERTIME; absent on the whole-game row of some eras. Values: REGULAR = regulation period.
tpInt64Points scored by the team in the period (period 0 = the whole game).
fgmInt64Field goals made (total).
aInt64Assists (total).
rebInt64Total rebounds.
stlInt64Number of steals.
blkInt64Number of blocked shots made.
pfInt64Personal fouls.

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_team_stats(game_uuid='c4hh5nig6t')

sportality_team_upcoming_games​

A team's next games (current season view).

Endpoint URL: GET https://www.basketligaen.dk/api/sports-v2/upcoming-games/{team_uuid}

Valid URL: https://www.basketligaen.dk/api/sports-v2/upcoming-games/rfo82vr830

API ParameterPythonPatternRequiredNullableDescription
team_uuidteam_uuidYTeam uuid: homeTeamInfo.uuid / awayTeamInfo.uuid in the schedule or teamList[].uuid. Key space: platform team uuids (not the numeric Genius team id).

Returns​

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

col_nametypedescription
dateStringGame date, 'D mon YY' in English.
timeStringLocal start time 'HH:MM' (Europe/Copenhagen).
game_uuidStringPlatform game uuid (c4hh5nig6t); every gameday route takes it.
start_date_timeStringScheduled start. On the schedule route this is the LOCAL (Europe/Copenhagen) wall time 'YYYY-MM-DD HH:MM:SS' with no zone; on the other routes it is ISO 8601 UTC with milliseconds (compare rawStartDateTime).
stateStringGame state. Schedule and day views: pre-game or post-game (hyphen). sports-v2 game-info: post_game (underscore). Gameday overview: GameEnded. Values: pre-game = not yet played (schedule, day views).
overtimeBooleanWhether the game went to overtime.
shootoutStringUnobserved: null in every sample and every full body. When filled: Whether the game was decided by a shootout (null on every game seen; basketball has none).
ssgt_uuidStringssgt uuid (platform key space: one season + series + game type); joins /statistics-v2/layout-info originalSeasonSeriesGameTypeTeams[].ssgtUuid and every route keyed by ssgt.
home_team_statusStringWIN or LOSE for the home team once the game is played; absent or empty before. Values: N/A = no result yet / not applicable.
home_team_uuidStringHome team uuid (platform key space); joins /sports-v2/teams/{team_uuid}.
home_team_owner_instance_idStringSite instance id of the club that owns the team (platform key space, e.g. hol2_hol).
home_team_codeStringThree-letter code of the home team.
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_scoreInt64Home points; null before the game is played.
home_team_iconStringHome team logo URL.
away_team_statusStringWIN or LOSE for the away team once the game is played; absent or empty before. Values: N/A = no result yet / not applicable.
away_team_uuidStringAway team uuid (platform key space); joins /sports-v2/teams/{team_uuid}.
away_team_owner_instance_idStringSite instance id of the club that owns the team (platform key space, e.g. hol2_hol).
away_team_codeStringThree-letter code of the away 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_scoreInt64Away points; null before the game is played.
away_team_iconStringAway team logo URL.
venue_uuidStringVenue uuid (platform key space).
venue_nameStringVenue name; absent when unknown.
series_uuidStringSeries uuid (platform key space).
series_codeStringSeries display name (Basketligaen; NOT the DBL code).
series_display_nameStringSeries display name (Basketligaen).

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_team_upcoming_games(team_uuid='rfo82vr830')