Skip to main content

LBA — Lega Basket Serie A site API (www.legabasket.it/api, Italy) — Other

lba_championships​

Championships of a season, one per phase (Regular Season, Play Off); every season when none is given.

Endpoint URL: GET https://www.legabasket.it/api/championships/get-championships

Valid URL: https://www.legabasket.it/api/championships/get-championships?cs_id=1&items=1000&s=2027

API ParameterPythonPatternRequiredNullableDescription
sseasonYSeason END year (2027 = 2026-27). Omitted = every season (310 championships).

Returns​

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

col_nametypedescription
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
championship_idintegerChampionship id (one season and phase).
yearintegerSeason START year (2026 = 2026-27); sdv END year = year + 1.
namecharacterChampionship name, e.g. Regular Season A, Play Off A1.
statusintegerChampionship status: 1 = in progress, 2 = finished (inferred from the 2026-27 and past samples).
championship_type_idintegerPhase type id: 4 = Regular Season, 2 = Play Off.
championship_series_idintegerSeries id, 1 = Serie A.
full_namecharacterName with the season, e.g. Regular Season A 2017.
focus_onlogicalHighlighted on the site.
ctype_codecharacterPhase type code: RS / PO.
ctype_namecharacterPhase type name, as sent in English: Regular Season, Play Off.
cserie_codecharacterSeries code, A1 = Serie A.
cserie_namecharacterName of the championship series, e.g. Serie A.
logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).

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

Example​

lba_championships(season=2027)

Last validated n/a.

lba_calendar​

Games of one round of a championship: teams, score, venue, referees and broadcasters.

Endpoint URL: GET https://www.legabasket.it/api/championships/get-championships-calendar-by-id

Valid URL: https://www.legabasket.it/api/championships/get-championships-calendar-by-id?id=602&d=1

API ParameterPythonPatternRequiredNullableDescription
idchampionship_idYChampionship id (championship_id in lba_championships): one season AND one phase.
droundYRound number (day_serial, 1, 2, ...). Omitted = the current round (the last played for a finished championship).

Returns​

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

col_nametypedescription
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
game_idintegerGame id (global across seasons); joins lba_calendar and lba_game.
game_statuscharacterGame status, number sent as a string: 0 scheduled, 1 live, 2 final (per the OSS client; only 2 sampled).
championship_idintegerChampionship id (season + phase) of the game.
championships_day_idintegerRound id (championships_day_id key space: one round of one championship; joins filters.days[].id and standings championships_day_id; not the d param).
yearintegerSeason START year (2026 = 2026-27); sdv END year = year + 1.
numberintegerRound number of the game, equal to day_serial (the d echo the capture checks).
match_datetimecharacterTip-off, ISO-8601 with the Italian offset (1995-96: midnight, no time kept).
match_hhintegerTip-off hour, local time.
match_mmintegerTip-off minute, local time.
home_final_scoreintegerFinal points of the home team.
visitor_final_scoreintegerFinal points of the away team.
target_scorecharacterNull in every sample (meaning unverified).
additional_timeintegerOvertime periods played (0 in every sample; reading inferred).
plant_idintegerArena id (arena key space; joins nothing specced).
websocket_match_idintegerLive-feed game id, number sent as a string; separate from the game id.
ticketing_urlcharacterTicket shop URL (null for old games).
has_streaminginteger1 when a stream exists, else 0.
updated_atcharacterTimestamp, ISO-8601 with the Italian offset. Last update of the game row.
h_team_idintegerHome team id (team-season).
h_team_namecharacterHome team name (sponsor name of that season).
h_club_codecharacterHome club code, e.g. TVB; null on the 2017-18 and 1995-96 calendar rows.
h_team_enabledlogicalHome team page enabled on the site.
home_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
v_team_idintegerAway team id (team-season).
v_team_namecharacterVisitor team name (the sponsor name of that season).
v_club_codecharacterAway club code (BCR); null on the 2017-18 and 1995-96 calendar rows.
v_team_enabledlogicalAway team page enabled on the site.
v_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
town_idintegerTown id of the arena (town key space; joins nothing specced).
plant_namecharacterName of the arena where the game is played.
town_namecharacterTown of the arena.
day_codecharacterRound code (1, 2, ...; string in game rows, integer in standings).
day_serialintegerRound number (event_serial, the d param).
day_namecharacterRound name, Italian: 1° Giornata = matchday 1.
match_serie_keycharacterThe two team ids joined low_high (1761_1764).
refereescharacterJSON list of the game's referees (id, name, surname); null when the site lists none.
broadcasterscharacterJSON list of the game's broadcasters (name, logo key); null when the site lists none.

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

Example​

lba_calendar(championship_id=602, round=1)

Last validated n/a.

lba_game​

Game header: teams, venue, quarter scores, coaches, referees and broadcasters.

Endpoint URL: GET https://www.legabasket.it/api/championships/get-championships-matches-by-id

Valid URL: https://www.legabasket.it/api/championships/get-championships-matches-by-id?sc=1&id=25602

API ParameterPythonPatternRequiredNullableDescription
idgame_idYGame id (game_id in lba_calendar), e.g. 25602. Global across seasons.

Returns​

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

col_nametypedescription
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
game_idintegerGame id (global across seasons); joins lba_calendar and lba_game.
game_statuscharacterGame status, number sent as a string: 0 scheduled, 1 live, 2 final (per the OSS client; only 2 sampled).
championship_idintegerChampionship id (season + phase) of the game.
competition_namecharacterChampionship full name, e.g. Regular Season 2026/27.
championships_day_idintegerRound id (championships_day_id key space: one round of one championship; joins filters.days[].id and standings championships_day_id; not the d param).
yearintegerSeason START year (2026 = 2026-27); sdv END year = year + 1.
numberintegerRound number of the game, equal to day_serial (the d echo the capture checks).
match_datetimecharacterTip-off, ISO-8601 with the Italian offset (1995-96: midnight, no time kept).
match_hhintegerTip-off hour, local time.
match_mmintegerTip-off minute, local time.
target_scorecharacterNull in every sample (meaning unverified).
home_final_scoreintegerFinal points of the home team.
visitor_final_scoreintegerFinal points of the away team.
q1_hsintegerHome points in the 1st quarter (null in the 1995-96 sample: no period scores then).
q1_vsintegerAway points in the 1st quarter.
q2_hsintegerHome points in the 2nd quarter.
q2_vsintegerAway points in the 2nd quarter.
q3_hsintegerHome points in the 3rd quarter (0 in the 1995-96 sample: a placeholder, not a score).
q3_vsintegerAway points in the 3rd quarter (0 placeholder in 1995-96).
q4_hsintegerHome points in the 4th quarter (0 placeholder in 1995-96).
q4_vsintegerAway points in the 4th quarter (0 placeholder in 1995-96).
ot_hsintegerHome overtime points (0 without overtime).
ot_vsintegerAway overtime points.
home_coach_idintegerHome head coach id.
home_coach_codecharacterHome head coach code SURNAME3-NAME3.
home_coach_fullnamecharacterHome head coach, Surname Name.
visitor_coach_idintegerAway head coach id.
visitor_coach_codecharacterAway head coach code.
visitor_coach_fullnamecharacterAway head coach, Surname Name.
additional_timeintegerOvertime periods played (0 in every sample; reading inferred).
plant_idintegerArena id (arena key space; joins nothing specced).
websocket_match_idintegerLive-feed game id, number sent as a string; separate from the game id.
has_streaminginteger1 when a stream exists, else 0.
live_match_datacharacterNull in every sample (meaning unverified).
quartercharacterLast period played, number sent as a string (4; 5 = overtime).
ticketing_urlcharacterTicket shop URL (null for old games).
match_seriecharacterAll-time head-to-head as home wins-away wins (6-18; inferred from match_hw / match_vw).
match_hwintegerAll-time head-to-head wins of the home club (inferred).
match_vwintegerAll-time head-to-head wins of the away club (inferred).
updated_atcharacterTimestamp, ISO-8601 with the Italian offset. Last update of the game row.
h_team_idintegerHome team id (team-season).
h_team_namecharacterHome team name (sponsor name of that season).
h_team_enabledlogicalHome team page enabled on the site.
home_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
v_team_idintegerAway team id (team-season).
v_team_namecharacterVisitor team name (the sponsor name of that season).
v_team_enabledlogicalAway team page enabled on the site.
v_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
plant_namecharacterName of the arena where the game is played.
day_codecharacterRound code (1, 2, ...; string in game rows, integer in standings).
day_serialintegerRound number (event_serial, the d param).
day_namecharacterRound name, Italian: 1° Giornata = matchday 1.
competition_type_idintegerPhase type id: 4 = Regular Season, 2 = Play Off.
competition_type_codecharacterPhase type code: RS / PO.
competition_typecharacterPhase type name: Regular Season / Play Off.
competition_serie_idintegerSeries id, 1 = Serie A.
competition_seriecharacterSeries name, Serie A.
day_phase_idintegerPhase id: 1 = Andata (first half of the season), 2 = Ritorno (second half).
spectatorsintegerAttendance: spectators at the game.
refereescharacterJSON list of the game's referees (id, name, surname); null when the site lists none.
broadcasterscharacterJSON list of the game's broadcasters (name, logo key); null when the site lists none.

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

Example​

lba_game(game_id=25602)

Last validated n/a.

lba_box_score​

Box score of a final game: one row per player of both teams (Italian-named stat columns).

Endpoint URL: GET https://www.legabasket.it/api/championships/get-championships-matches-scores-by-id

Valid URL: https://www.legabasket.it/api/championships/get-championships-matches-scores-by-id?info=true&id=25602

API ParameterPythonPatternRequiredNullableDescription
idgame_idYGame id (game_id in lba_calendar), e.g. 25602. Global across seasons.

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_idintegerGame id (global across seasons); joins lba_calendar and lba_game.
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
sidecharacterWhich team of the game the row belongs to: home or visitor.
team_idintegerTeam-season id (re-issued every season); join lba_teams for the stable club_id.
player_idintegerPlayer id (global).
player_numintegerJersey number the player wore in the game.
player_surnamecharacterFamily name, upper case.
player_namecharacterPlayer's given name.
player_codecharacterPlayer code SURNAME3-NAME3-YY.
player_p_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
punintegerPoints (punti).
minintegerMinutes played, whole minutes (minuti); 200 in totals = 5 × 40.
secintegerSeconds played (secondi) = min × 60 in every sample.
sfcharacterStarter flag (starting five), number sent as a string: 1 = started.
falli_cintegerFouls committed (falli commessi).
falli_sfintegerFouls drawn (falli subiti).
falli_tc1integerTechnical fouls (falli tecnici; reading tc1 as category-1 technicals is inferred).
falli_flaintegerUnsportsmanlike / flagrant fouls (falli antisportivi).
t2_rinteger2-point field goals made (tiri da 2 realizzati).
t2_tinteger2-point field goals attempted (tiri da 2 tentati).
t2_percnumeric2-point field-goal percentage, 0-100 (number; 0 when no attempt).
scintegerDunks (schiacciate).
t3_rinteger3-point field goals made.
t3_tinteger3-point field goals attempted.
t3_percnumeric3-point field-goal percentage, 0-100.
tl_rintegerFree throws made (tiri liberi realizzati).
tl_tintegerFree throws attempted (tiri liberi tentati).
tl_percnumericFree-throw percentage, 0-100.
rimbalzi_ointegerOffensive rebounds (rimbalzi offensivi).
rimbalzi_dintegerDefensive rebounds (rimbalzi difensivi).
rimbalzi_tintegerTotal rebounds (rimbalzi totali).
stoppate_datintegerBlocks (stoppate date).
stoppate_subintegerOwn shots blocked (stoppate subite).
palle_pintegerTurnovers (palle perse).
palle_rintegerSteals (palle recuperate).
assintegerAssists credited to the player in the game.
val_legaintegerLBA efficiency rating (valutazione Lega).
val_oernumericOER = points / (FGA + turnovers + FTA / 2); verified on every 2026-27 sample row.
plus_minusintegerPlus-minus: point margin while on court.

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

Example​

lba_box_score(game_id=25602)

Last validated n/a.

lba_pbp​

Play-by-play of a final game (2017-18 on), one row per action with x/y; coordinate frame by era.

Endpoint URL: GET https://www.legabasket.it/api/championships/get-championships-matches-play-by-play

Valid URL: https://www.legabasket.it/api/championships/get-championships-matches-play-by-play?info=true&sort=asc&id=25602

API ParameterPythonPatternRequiredNullableDescription
idgame_idYGame id (game_id in lba_calendar), e.g. 25602. Global across seasons.

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_idintegerGame id (global across seasons); joins lba_calendar and lba_game.
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
home_team_idintegerHome team-season id of the game (the play-by-play ht_id).
visitor_team_idintegerVisitor team-season id of the game (the play-by-play vt_id).
team_sidecharacterSide of the acting team, home or visitor; null for a clock action without a team.
home_scoreintegerHome points after the action, parsed from the score text (2021-22 on; else null).
visitor_scoreintegerVisitor points after the action, parsed from the score text (2021-22 on; else null).
coord_framecharacterFrame of x and y: half_court_px (2017-18 and 2018-19 image pixels) or court_pct (2019-20 on, 0-100).
action_idintegerAction id within the game (ascending in time from 2021-22; not ordered before).
descriptioncharacterAction type in Italian, e.g. 2 punti segnato (2-pointer made); full translation table in the Divergence notes.
player_idintegerPlayer id (null for team and clock actions).
team_idintegerTeam id (team-season) of the actor.
home_clubinteger1 = the home team acted, 0 = the away team; null for clock actions, and on every action in 2018-19 and 2019-20 (use side there).
in_arealogicalTrue on shots from the paint (zone 3).
dunkinteger1 = dunk, 0 otherwise.
secondsintegerElapsed seconds within minute (0-59); 0 before 2019-20. Elapsed = minute × 60 + seconds; print_time = period length minus that.
minuteintegerElapsed minute of the period (2019-20 on: 0-9, with seconds); 2017-18 / 2018-19: 1-10, the minute in progress, seconds 0.
periodintegerPeriod: 1-4, 5+ = overtime.
orderintegerSort key; sort=asc orders by it.
sideintegerWhich team of the game the row belongs to: home or visitor.
xintegerCourt x; frame by era (see the coordinates section): 2019-20 on, 0-100 % of the 28 m length; 2017-18 / 2018-19, half-court image pixels; null (2019-20 on) or 0 (earlier) when unlocated.
yintegerCourt y; 2019-20 on, 0-100 % of the 15 m width; 2017-18 / 2018-19, image pixels (see the coordinates section).
scorecharacterScore after the action, home - away string (0 - 0); 2020-21 on scoring actions only, null before.
linked_action_idintegeraction_id of the related action: the shot an assist or rebound belongs to, the foul a drawn foul answers, the player swapped in a substitution.
print_timecharacterGame clock remaining, MM:SS (10:00 at a period start); null before 2021-22.
action_1_qualifier_codecharacterFirst qualifier code, number sent as a string (shot type, turnover type, foul type; see legend).
action_2_qualifier_codecharacterSecond qualifier code (fast break 500, blocked 1005, tip-ins 1001-1004, ...).
action_1_qualifier_descriptioncharacterlegend label of action_1_qualifier_code, Italian.
action_2_qualifier_descriptioncharacterlegend label of action_2_qualifier_code, Italian.
side_area_zonecharacterA = in the actor's attacking half, D = its defensive half (2021-22 on).
side_area_codecharacterCourt zone 1-10, number sent as a string (see the coordinates section; 2021-22 on).
player_namecharacterGiven name of the acting player.
player_surnamecharacterFamily name of the acting player.
player_numbercharacterJersey number, number sent as a string.
team_namecharacterTeam name in that season, with its sponsor (Nutribullet Treviso Basket); changes with the sponsor.
idintegerAlways null (not a key).

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

Example​

lba_pbp(game_id=25602)

Last validated n/a.

lba_pbp_legend​

The play-by-play qualifier code table (59 codes) with its Italian labels.

Endpoint URL: GET https://www.legabasket.it/api/championships/get-championships-matches-play-by-play

Valid URL: https://www.legabasket.it/api/championships/get-championships-matches-play-by-play?info=true&sort=asc&id=25602

API ParameterPythonPatternRequiredNullableDescription
idgame_idYGame id (game_id in lba_calendar), e.g. 25602. Global across seasons.

Returns​

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

col_nametypedescription
codeintegerQualifier code, the value of action_1_qualifier_code / action_2_qualifier_code on the actions.
labelcharacterItalian label of the qualifier code, as sent (translated in sdv-internal-refs legabasket-returns.md).

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

Example​

lba_pbp_legend(game_id=25602)

Last validated n/a.

lba_shots​

Shooting by court zone per team for a final game (made / attempted aggregates; zone 7 includes free throws).

Endpoint URL: GET https://www.legabasket.it/api/matches/get-championship-matches-shots-by-id

Valid URL: https://www.legabasket.it/api/matches/get-championship-matches-shots-by-id?info=1&id=25602

API ParameterPythonPatternRequiredNullableDescription
idgame_idYGame id (game_id in lba_calendar), e.g. 25602. Global across seasons.

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_idintegerGame id (global across seasons); joins lba_calendar and lba_game.
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
sidecharacterWhich team of the game the row belongs to: home or visitor.
team_idintegerTeam-season id (re-issued every season); join lba_teams for the stable club_id.
zoneintegerCourt zone 1-10 (the play-by-play side_area_code); zone 7 also holds the free throws.
madeintegerShots made in the zone, parsed from num.
attemptsintegerShots attempted in the zone, parsed from num.
percnumericMade / attempted × 100.
precisionintegerDecimal places the site shows (1).
numcharacterMade/attempted as a string (17/21); zone 7 also counts free throws.
opacityintegerHeat-map shading for the site: perc floored, minimum 5.

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

Example​

lba_shots(game_id=25602)

Last validated n/a.

lba_standings​

Standings of a championship after a round, one row per team.

Endpoint URL: GET https://www.legabasket.it/api/championships/get-championship-ranking

Valid URL: https://www.legabasket.it/api/championships/get-championship-ranking?id=602&d=3

API ParameterPythonPatternRequiredNullableDescription
idchampionship_idYChampionship id (championship_id in lba_championships; a Regular Season id carries standings).
droundYStandings after this round. Required in practice for a finished championship: without it the site sends none (NoDataError).

Returns​

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

col_nametypedescription
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
standing_idintegerStandings row id (one team after one round; joins nothing else).
championships_day_idintegerRound id the standings are after.
team_idintegerTeam id (team-season).
positionintegerRank in the standings.
winsintegerGames the team has won through the round.
defeatsintegerGames the team has lost through the round.
points_madeintegerPoints the team has scored through the round.
points_sufferedintegerPoints allowed.
qpintegerTie-break quotient (quoziente punti?); 1 in the samples (unverified).
lvcharacterNull in every sample (meaning unverified).
lpcharacterNull in every sample (meaning unverified).
lpfcharacterNull in every sample (meaning unverified).
lpscharacterNull in every sample (meaning unverified).
lqpcharacterNull in every sample (meaning unverified).
updated_atcharacterTimestamp, ISO-8601 with the Italian offset.
pointsintegerStandings points (2 per win).
penalty_pointsintegerPoints deducted (0 or null).
game_playedintegerGames the team has played through the round.
home_game_playedintegerHome games played.
home_winsintegerHome games won.
home_defeatsintegerHome games the team has lost through the round.
away_game_playedintegerAway games played.
away_winsintegerAway games won.
away_defeatsintegerAway games the team has lost through the round.
avg_points_madenumericPoints scored per game.
avg_points_sufferednumericPoints allowed per game.
home_points_madeintegerPoints scored at home.
home_points_sufferedintegerPoints allowed at home.
home_avg_points_madenumericPoints scored per home game.
home_avg_points_sufferednumericPoints allowed per home game.
away_points_madeintegerPoints scored away.
away_points_sufferedintegerPoints allowed away.
away_avg_points_madenumericPoints scored per away game.
away_avg_points_sufferednumericPoints allowed per away game.
yearintegerSeason START year (2026 = 2026-27); sdv END year = year + 1.
tiesintegerTies (0 or null; basketball has none).
home_tiesintegerHome ties (null).
away_tiesintegerAway ties (null).
play_off_qualifiedlogicalClinched a play-off place (null in old seasons).
relegationlogicalRelegated (null in old seasons).
movementcharacterPosition change since the previous round, signed string (+2, -1; null for finished seasons).
wins_percentnumericWin percentage as a string with % (100%).
home_wins_percentnumericHome win percentage, string with %.
away_wins_percentnumericAway win percentage, string with %.
max_points_madeintegerMost points scored in a game.
home_max_points_madeintegerMost points scored in a home game.
away_max_points_madeintegerMost points scored in an away game.
day_codeintegerRound code the standings are after (integer).
day_namecharacterRound name, Italian (4ª Giornata - 2° fase = matchday 4 of the 2nd phase).
team_namecharacterTeam name in that season, with its sponsor (Nutribullet Treviso Basket); changes with the sponsor.
club_codecharacterClub code (TVB, TS); whether it is stable across seasons is unverified.
logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
ctpintegerClassification marker; 0 or null in the samples (unverified).
ctp_symbolcharacterNull in every sample (meaning unverified).
ctp_descriptioncharacterNull in every sample (meaning unverified).
season_start_yearintegerThe wire season field: the season START year (2026 = 2026-27), same as year.

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

Example​

lba_standings(championship_id=602, round=3)

Last validated n/a.

lba_roster​

Players of one team-season with bio, number and role.

Endpoint URL: GET https://www.legabasket.it/api/teams/get-team-roster

Valid URL: https://www.legabasket.it/api/teams/get-team-roster?id=1764

API ParameterPythonPatternRequiredNullableDescription
idteam_idYTeam id (team_id in lba_teams), e.g. 1764. One team-season: ids are re-issued every season.

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_idintegerTeam-season id (re-issued every season); join lba_teams for the stable club_id.
club_idintegerClub id: the cross-season join key for team ids (only here and in the team headers); stability across seasons is unverified.
club_codecharacterClub code (TVB, TS); whether it is stable across seasons is unverified.
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
player_idintegerPlayer id (global).
namecharacterPlayer's given name.
surnamecharacterPlayer's family name.
codecharacterPlayer code SURNAME3-NAME3-YY.
place_of_birthcharacterBirthplace (Italian spelling).
birth_datecharacterBirth date, Date YYYY-MM-DD.
player_numbercharacterJersey number, number sent as a string.
countrycharacterNationality, ISO alpha-3.
uefa_ratiocharacterEligibility class for the foreign-player quota: I, E or C (7 / 6 / 1 on the Treviso roster; reading as Italian / EU / non-EU is inferred).
heightintegerPlayer's height in centimetres.
weightintegerPlayer's weight in kilograms.
yearintegerSeason START year of the player entry (2026 = 2026-27).
start_datecharacterContract start with the team, Date YYYY-MM-DD.
end_datecharacterContract end with the team, Date YYYY-MM-DD.
player_role_idintegerPosition id (position key space: the id behind player_role; joins the r_id filter).
player_rolecharacterPosition, Italian: Playmaker (point guard), Guardia (guard), Ala (forward), Centro (center), - unknown.
team_namecharacterTeam name in that season, with its sponsor (Nutribullet Treviso Basket); changes with the sponsor.
player_picture_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
team_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).

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

Example​

lba_roster(team_id=1764)

Last validated n/a.

lba_roster_coach​

Head coach of one team-season.

Endpoint URL: GET https://www.legabasket.it/api/teams/get-team-roster

Valid URL: https://www.legabasket.it/api/teams/get-team-roster?id=1764

API ParameterPythonPatternRequiredNullableDescription
idteam_idYTeam id (team_id in lba_teams), e.g. 1764. One team-season: ids are re-issued every season.

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_idintegerTeam-season id (re-issued every season); join lba_teams for the stable club_id.
club_idintegerClub id: the cross-season join key for team ids (only here and in the team headers); stability across seasons is unverified.
club_codecharacterClub code (TVB, TS); whether it is stable across seasons is unverified.
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
coach_idintegerCoach id (global coach key space; joins the game header home_coach_id / visitor_coach_id).
namecharacterCoach's given name.
surnamecharacterCoach's family name.
birth_datecharacterBirth date, Date YYYY-MM-DD.
place_of_birthcharacterBirthplace (Italian spelling, e.g. Londra).
coach_type_idintegerCoach role id (1 = head coach).
coach_type_descriptioncharacterCoach role, Italian: Allenatore = head coach.
coach_type_codecharacterCoach role code, number sent as a string.
team_namecharacterTeam, short name.
coach_picture_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
team_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).

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

Example​

lba_roster_coach(team_id=1764)

Last validated n/a.

lba_game_log​

A player's game log for one season, one row per game.

Endpoint URL: GET https://www.legabasket.it/api/players/get-player-matches

Valid URL: https://www.legabasket.it/api/players/get-player-matches?cs_id=1&id=969&s=2027

API ParameterPythonPatternRequiredNullableDescription
idplayer_idYPlayer id (player_id in lba_players or a box score), e.g. 969. Global: one id for a whole career.
sseasonYSeason END year (2027 = 2026-27). Omitted = the site's default season (unverified).

Returns​

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

col_nametypedescription
seasonintegerSeason END year (2027 = 2026-27): the row's START year + 1.
stat_line_idintegerId of the player's stat line for the game (one per player and game).
championship_idintegerChampionship id of the game.
championships_match_idintegerGame id (global across seasons); joins lba_calendar and lba_game.
player_idintegerPlayer id (global, one per career).
team_idintegerTeam id (team-season) of the player.
numberintegerJersey number the player wore in the game.
played_minutesintegerMinutes played, in that game.
pointsintegerPoints, in that game.
suffered_foulsintegerFouls drawn, in that game.
done_foulsintegerFouls committed, in that game.
shots_2p_realizedinteger2-point field goals made, in that game.
shots_2p_totalinteger2-point field goals attempted, in that game.
shots_3p_realizedinteger3-point field goals made, in that game.
shots_3p_totalinteger3-point field goals attempted, in that game.
free_throws_realizedintegerFree throws made, in that game.
free_throws_totalintegerFree throws attempted, in that game.
restricted_area_p1characterNull in every sample (meaning unverified).
restricted_area_p2characterNull in every sample (meaning unverified).
restricted_area_p3characterNull in every sample (meaning unverified).
slam_dunkintegerDunks, in that game.
offensive_reboundintegerOffensive rebounds, in that game.
defensive_reboundintegerDefensive rebounds, in that game.
ball_stop_givenintegerBlocks, in that game.
ball_stop_receivedintegerOwn shots blocked, in that game.
lost_ballsintegerTurnovers, in that game.
regain_ballsintegerSteals, in that game.
assistsintegerAssists, in that game.
technical_foulscharacterTechnical fouls (null in old seasons).
minute5_foulsintegerMinute of the fifth foul (0 = did not foul out; inferred, unverified).
time5_foulsintegerGame time of the fifth foul (0 = did not foul out; inferred, unverified).
rating_legaintegerLBA efficiency rating (valutazione), in that game.
quintetintegerStarts (in the starting five), in that game.
rating_oernumericOER (points / (FGA + turnovers + FTA / 2)), in that game.
avg_pointsintegerThe player's plus-minus in the game (the site's name is misleading).
wp_idintegerNull in every sample (meaning unverified).
deleted_atcharacterNull in every sample (meaning unverified).
created_atcharacterTimestamp, ISO-8601 with the Italian offset.
updated_atcharacterTimestamp, ISO-8601 with the Italian offset.
player_role_idintegerPosition id (position key space: the id behind player_role; joins the r_id filter).
orderintegerRow order in the box score.
captainlogicalTeam captain in that game.
shots_2p_percinteger2-point field-goal percentage, 0-100, in that game.
shots_3p_percinteger3-point field-goal percentage, 0-100, in that game.
free_throws_percintegerFree-throw percentage, 0-100, in that game.
total_reboundintegerTotal rebounds, in that game.
ext_codecharacter`<websocket_match_id>\
fouls_first_categoryintegerCategory-1 technical fouls (null in old seasons; reading inferred).
fouls_flagrantintegerUnsportsmanlike / flagrant fouls.
championship_day_namecharacterRound code, number sent as a string.
home_scoreintegerHome points after the action, parsed from the score text (2021-22 on; else null).
visitor_scoreintegerVisitor points after the action, parsed from the score text (2021-22 on; else null).
match_datecharacterTip-off in UTC, ISO-8601 Z (local time in match_hh / match_mm).
match_hhintegerTip-off hour, local time.
match_mmintegerTip-off minute, local time.
championship_match_idintegerGame id (repeated).
player_team_idintegerTeam id (team-season) of the player (repeated).
player_team_namecharacterShort name of the player's team in the game (without the season sponsor).
player_team_codecharacter`\
visitor_team_idintegerVisitor team-season id of the game (the play-by-play vt_id).
visitor_team_namecharacterAway team short name.
visitor_team_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
home_team_idintegerHome team-season id of the game (the play-by-play ht_id).
home_team_namecharacterHome team short name.
home_team_logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
phase_descriptioncharacterPhase code: And (Andata, 1st half of the season) / Rit (Ritorno).
match_adpintegerThe player's plus-minus in the game (the site's name is misleading).
home_match_resultcharacterw / l for the home team when the player was on it, else null.
visitor_match_resultcharacterw / l for the away team when the player was on it, else null.

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

Example​

lba_game_log(player_id=969, season=2027)

Last validated n/a.