Skip to main content

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

lba_team_box_score​

Team lines of a final game's box score: the team-booked stats and the totals of each side.

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.
row_typecharacterteam = stats booked to the team itself (team rebounds, team turnovers); totals = the whole side.
punintegerPoints (punti). (team totals (players + team row))
falli_cintegerFouls committed (falli commessi). (team totals (players + team row))
falli_sfintegerFouls drawn (falli subiti). (team totals (players + team row))
falli_tc1integerTechnical fouls (falli tecnici; reading tc1 as category-1 technicals is inferred). (team totals (players + team row))
falli_flaintegerUnsportsmanlike / flagrant fouls (falli antisportivi). (team totals (players + team row))
rimbalzi_ointegerOffensive rebounds (rimbalzi offensivi). (team totals (players + team row))
rimbalzi_dintegerDefensive rebounds (rimbalzi difensivi). (team totals (players + team row))
rimbalzi_tintegerTotal rebounds (rimbalzi totali). (team totals (players + team row))
palle_pintegerTurnovers (palle perse). (team totals (players + team row))
palle_rintegerSteals (palle recuperate). (team totals (players + team row))
val_legaintegerLBA efficiency rating (valutazione Lega). (team totals (players + team row))
minintegerMinutes played, whole minutes (minuti); 200 in totals = 5 × 40. (team totals (players + team row))
secintegerSeconds played (secondi) = min × 60 in every sample. (team totals (players + team row))
t2_rinteger2-point field goals made (tiri da 2 realizzati). (team totals (players + team row))
t2_tinteger2-point field goals attempted (tiri da 2 tentati). (team totals (players + team row))
t2_percnumeric2-point field-goal percentage, 0-100 (number; 0 when no attempt). (team totals (players + team row))
scintegerDunks (schiacciate). (team totals (players + team row))
t3_rinteger3-point field goals made. (team totals (players + team row))
t3_tinteger3-point field goals attempted. (team totals (players + team row))
t3_percnumeric3-point field-goal percentage, 0-100. (team totals (players + team row))
tl_rintegerFree throws made (tiri liberi realizzati). (team totals (players + team row))
tl_tintegerFree throws attempted (tiri liberi tentati). (team totals (players + team row))
tl_percnumericFree-throw percentage, 0-100. (team totals (players + team row))
stoppate_datintegerBlocks (stoppate date). (team totals (players + team row))
stoppate_subintegerOwn shots blocked (stoppate subite). (team totals (players + team row))
assintegerAssists. (team totals (players + team row))
val_oernumericOER = points / (FGA + turnovers + FTA / 2); verified on every 2026-27 sample row. (team totals (players + team row))

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

Example​

lba_team_box_score(game_id=25602)

Last validated n/a.

lba_teams​

Teams of a season, one row per team-season with the stable club id.

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

Valid URL: https://www.legabasket.it/api/teams/get-teams?items=50&year=2027

API ParameterPythonPatternRequiredNullableDescription
yearseasonYSeason 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.
team_idintegerTeam id (one team-season).
namecharacterTeam name of that season (sponsor name).
yearintegerSeason START year (2026 = 2026-27); sdv END year = year + 1.
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.
updated_atcharacterTimestamp, ISO-8601 with the Italian offset.
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_teams(season=2027)

Last validated n/a.

lba_team_players_stats​

Season totals of each player of a team-season.

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

Valid URL: https://www.legabasket.it/api/teams/get-team-players-stats?cs_id=1&id=1764&s=2027

API ParameterPythonPatternRequiredNullableDescription
idteam_idYTeam id (team_id in lba_teams), e.g. 1764. One team-season: ids are re-issued every season.
sseasonYSeason END year (2027 = 2026-27) of the team id. Omitted = the site's default (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
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, one per career).
player_namecharacterPlayer's given name.
player_surnamecharacterPlayer's family name.
player_seasonintegerSeason START year (2026 = 2026-27); sdv END year = year + 1.
player_photo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
played_matchesintegerGames the player appeared in, in the request's championship series.
total_matchesintegerTeam games while the player was listed (inferred).
start_formationintegerGames the player started, in the request's championship series.
points_sumintegerSeason total of points.
played_minutes_sumintegerSeason total of minutes played.
rating_lega_sumintegerSeason total of LBA efficiency rating (valutazione).
rating_oer_sumnumericSum of the per-game OER values (3.34 over 3 games), not a season OER.
offensive_rebound_sumintegerSeason total of offensive rebounds.
defensive_rebound_sumintegerSeason total of defensive rebounds.
total_rebound_sumintegerSeason total of total rebounds.
assists_sumintegerSeason total of assists.
regain_balls_sumintegerSeason total of steals.
lost_balls_sumintegerSeason total of turnovers.
ball_stop_given_sumintegerSeason total of blocks.
ball_stop_received_sumintegerSeason total of own shots blocked.
done_fouls_sumintegerSeason total of fouls committed.
suffered_fouls_sumintegerSeason total of fouls drawn.
plus_minus_sumintegerSeason total of plus-minus.
aplus_dp_sumintegerSeason total of aplus_dp, an unverified metric (not plus-minus or assists: Macura 2026-27 has 9 against plus-minus 8 and 3 assists).
slam_dunk_sumintegerSeason total of dunks.
shots_2p_realized_sumintegerSeason total of 2-point field goals made.
shots_2p_total_sumintegerSeason total of 2-point field goals attempted.
shots_2p_perc_sumnumericSeason 2-point percentage, 0-100 (a rate despite _sum).
shots_3p_realized_sumintegerSeason total of 3-point field goals made.
shots_3p_total_sumintegerSeason total of 3-point field goals attempted.
shots_3p_perc_sumnumericSeason 3-point percentage, 0-100 (a rate despite _sum).
free_throws_realized_sumintegerSeason total of free throws made.
free_throws_total_sumintegerSeason total of free throws attempted.
free_throws_perc_sumnumericSeason free-throw percentage, 0-100 (a rate despite _sum).

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

Example​

lba_team_players_stats(season=2027, team_id=1764)

Last validated n/a.

lba_teams_leaderboard​

Season team leaderboards, offensive or defensive, one row per team and category.

Endpoint URL: GET https://www.legabasket.it/api/statistics/get-teams-statistics-by-type

Valid URL: https://www.legabasket.it/api/statistics/get-teams-statistics-by-type?cs_id=1&type=teams_offensive&s=2027

API ParameterPythonPatternRequiredNullableDescription
typeboardYBoard: teams_offensive or teams_defensive.
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.
categorycharacterCategory of this row (the cat param, e.g. points).
namecharacterGiven name (players) / team name (teams).
sponsor_namecharacterSponsor name (empty or null in the samples).
short_namecharacterShort name of the team, e.g. BC Roma.
tv_namecharacterShort team name for TV graphics.
yearintegerSeason START year (2026 = 2026-27); sdv END year = year + 1.
logo_keycharacterImage key: the image is {cdn_url}/{key}, resized copies {cdn_url}/variants/{key}/thumb or /large (the site's getApiImageUrl).
attemptsintegerShots attempted in the zone, parsed from num.
total_played_matchesintegerGames the team has played, counted for the leaderboard.
total_pointsintegerPoints scored (offensive) or allowed (defensive) in the season.
minutesintegerMinutes per game (players: decimal string 28.67) / total minutes (teams: integer).
score_40_minnumericValue per 40 minutes.
scorenumericValue in the category under the ob order (default avg = per game); players send a decimal string, teams a number.
team_idintegerTeam id (team-season).

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

Example​

lba_teams_leaderboard(board='teams_offensive', season=2027)

Last validated n/a.