Skip to main content
Version: 0.2.0

ACB — ACB API (api2.acb.com, Spain) — Other: calendar–search

acb_calendar​

Every round of a season with its games: one call lists every game id.

Endpoint URL: GET https://api2.acb.com/api/seasondata/Calendar/season-calendar

Valid URL: https://api2.acb.com/api/seasondata/Calendar/season-calendar?season=2027

API ParameterPythonPatternRequiredNullableDescription
competitionIdcompetition_idYCompetition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (youth). Omitted = the API's default competition.
seasonseasonYSeason END year (2027 = 2026-27; the first ACB season, 1983-84, is 1984). acb_runtime sends the API's editionId = season - 1936. Omitted = the current 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
competition_idInt64Competition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa.
edition_idInt64Season id (editionId) = season START year - 1935 (91 = 2026-27). The wrappers take the END year, season.
seasonInt64Season END year (2027 = 2026-27) = edition_id + 1936: the key the wrappers take.
round_idInt64Global round id (6017 = Liga 2026-27 round 3); not the round number.
round_numberInt64Round number within its phase.
subphase_idInt64Sub-phase id of the round (playoff stages); null in the regular season.
subphase_numberInt64Sub-phase number of the round; null in the regular season.
week_idInt64Not sent by the calendar route (always null).
match_idInt64Match id. Legacy ids (seasons up to 2019-20) sit below about 20000 (12559 = 2005-06 final, 17718 = 2016-17 final); from 2020-21 they start at about 100000 (102920 in 2021-22, 105401 in 2026-27). One key space across competitions: the matchId param of every matchdata route.
home_team_idInt64Home season-team entry id (new every season; joins the body's team list).
away_team_idInt64Away season-team entry id (new every season; joins the body's team list).
home_scoreInt64Home points (null before the match)
away_scoreInt64Away points (null before the match)
startStringTip-off, ISO 8601 UTC
statusStringMatch state (x-match-statuses)
is_on_half_timeBooleanAt half time (live)
current_quarterInt64Current or last quarter (5+ = overtime); not reliable after the match (1 in the 2017 series rows)
home_club_idInt64Stable club id of the home team (looked up in the body's team list).
home_teamStringHome team name for the season (looked up in the body's team list).
home_team_abbrStringHome team three-letter abbreviation (looked up in the body's team list).
away_club_idInt64Stable club id of the away team (looked up in the body's team list).
away_teamStringAway team name for the season (looked up in the body's team list).
away_team_abbrStringAway team three-letter abbreviation (looked up in the body's team list).
ticketing_linkStringTicket shop URL; null when none.
broadcastersStringBroadcast channel names of the game joined with '; ' (the first is the primary).

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_calendar(season=2027)

acb_league_zones​

League-wide shooting by court zone for a season.

Endpoint URL: GET https://api2.acb.com/api/seasondata/ShotChart/league-zones

Valid URL: https://api2.acb.com/api/seasondata/ShotChart/league-zones?season=2027

API ParameterPythonPatternRequiredNullableDescription
competitionIdcompetition_idYCompetition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (youth). Omitted = the API's default competition.
seasonseasonYSeason END year (2027 = 2026-27; the first ACB season, 1983-84, is 1984). acb_runtime sends the API's editionId = season - 1936. Omitted = the current 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
competition_idInt64Competition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa.
edition_idInt64Season id (editionId) = season START year - 1935 (91 = 2026-27). The wrappers take the END year, season.
seasonInt64Season END year (2027 = 2026-27) = edition_id + 1936: the key the wrappers take.
phase_idInt64Phase the statistics cover; null in the sample (read as all phases, unverified).
zoneStringCourt zone (acb_codes.SHOT_ZONES): restricted_area, paint, mid_range_, corner_three_, wing_three_*, top_three.
attemptsInt64Field-goal attempts in the zone, league-wide.
madeInt64Field goals made in the zone, league-wide.
points_scoredInt64Points scored from the zone, league-wide.

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_league_zones(season=2027)

acb_next_matches​

A club's most recent and upcoming games.

Endpoint URL: GET https://api2.acb.com/api/seasondata/TeamProfile/next-matches

Valid URL: https://api2.acb.com/api/seasondata/TeamProfile/next-matches?clubId=2&numberOfMatches=5

API ParameterPythonPatternRequiredNullableDescription
clubIdclub_idYRequired. ACB club id (integer), stable across seasons and sponsor names (2 = Barca, 9 = Real Madrid, 13 = Valencia Basket). Not the season-team team_id.
numberOfMatchesnumber_of_matchesYHow many games to return (the site asks for 5).
competitionIdcompetition_idYCompetition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (youth). Omitted = the API's default competition.
seasonseasonYSeason END year (2027 = 2026-27; the first ACB season, 1983-84, is 1984). acb_runtime sends the API's editionId = season - 1936. Omitted = the current 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
match_idInt64Match id. Legacy ids (seasons up to 2019-20) sit below about 20000 (12559 = 2005-06 final, 17718 = 2016-17 final); from 2020-21 they start at about 100000 (102920 in 2021-22, 105401 in 2026-27). One key space across competitions: the matchId param of every matchdata route.
round_typeStringPhase code: LR = Liga Regular (regular season), PO = playoffs (a bundle value, not in the samples); null on every row of /Menu/competition-data and /TeamProfile/next-matches
round_idInt64Round id: global across seasons, not the round number (6017 = Liga 2026-27 round 3; 2600 = 2016-17 round 1)
round_numberInt64Round number within the phase
group_idInt64Group id in group-stage competitions
subphase_idInt64Sub-phase id inside a phase (a playoff round or a cup round, e.g. 291, 292, 293); null in the regular season
subphase_numberInt64Sub-phase number
week_idInt64Week id: global across seasons (2989 = the week of 2026-10-10)
statusStringMatch state (x-match-statuses)
is_on_half_timeBooleanAt half time (live)
current_quarterInt64Current or last quarter (0 before the match and in some finished rows)
home_scoreInt64Home points (null before the match)
away_scoreInt64Away points (null before the match)
startStringTip-off, ISO 8601 UTC
home_winsInt64Home team's wins so far
home_lossesInt64Home team's losses so far
away_winsInt64Away team's wins so far
away_lossesInt64Away team's losses so far
home_team_idInt64Season-team id: one team's entry in one competition edition (4467 = Barça in Liga 2026-27, 4388 = Real Madrid in Liga 2025-26). Changes every season and competition. Joins every homeTeamId / awayTeamId / teamId / teamEditionId. Not the club id.
home_club_idInt64Club id, stable across seasons and sponsor names (2 = Barça, 9 = Real Madrid, 13 = Valencia Basket): the clubId request param and every homeClubId / awayClubId.
home_teamStringTeam name that season (sponsor names change)
home_team_abbrStringThree-letter abbreviation (BAR, RMB)
away_team_idInt64Season-team id: one team's entry in one competition edition (4467 = Barça in Liga 2026-27, 4388 = Real Madrid in Liga 2025-26). Changes every season and competition. Joins every homeTeamId / awayTeamId / teamId / teamEditionId. Not the club id.
away_club_idInt64Club id, stable across seasons and sponsor names (2 = Barça, 9 = Real Madrid, 13 = Valencia Basket): the clubId request param and every homeClubId / awayClubId.
away_teamStringTeam name that season (sponsor names change)
away_team_abbrStringThree-letter abbreviation (BAR, RMB)
competition_idInt64Competition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (x-competitions)
edition_idInt64Season id (editionId) = season START year - 1935 (91 = 2026-27, 81 = 2016-17, 70 = 2005-06, 48 = 1983-84, the first). The sdv season (END year) is editionId + 1936. Season lists also carry seasonStartYear / seasonEndYear
seasonInt64Season END year (2027 = 2026-27) = edition_id + 1936: the key the wrappers take.
is_selected_localBooleanNot sent by this route (always null).

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_next_matches(club_id=2, number_of_matches=5)

acb_club_data​

Club profile: arena, contacts and links.

Endpoint URL: GET https://api2.acb.com/api/seasondata/TeamProfile/club-data

Valid URL: https://api2.acb.com/api/seasondata/TeamProfile/club-data?clubId=2

API ParameterPythonPatternRequiredNullableDescription
clubIdclub_idYRequired. ACB club id (integer), stable across seasons and sponsor names (2 = Barca, 9 = Real Madrid, 13 = Valencia Basket). Not the season-team 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
team_idInt64Season-team id: one team's entry in one competition edition (4467 = Barça in Liga 2026-27, 4388 = Real Madrid in Liga 2025-26). Changes every season and competition. Joins every homeTeamId / awayTeamId / teamId / teamEditionId. Not the club id.
club_idInt64Club id, stable across seasons and sponsor names (2 = Barça, 9 = Real Madrid, 13 = Valencia Basket): the clubId request param and every homeClubId / awayClubId.
teamStringTeam name that season (sponsor names change)
team_abbrStringThree-letter abbreviation (BAR, RMB)
competition_idInt64Competition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (x-competitions)
edition_idInt64Season id (editionId) = season START year - 1935 (91 = 2026-27, 81 = 2016-17, 70 = 2005-06, 48 = 1983-84, the first). The sdv season (END year) is editionId + 1936. Season lists also carry seasonStartYear / seasonEndYear
seasonInt64Season END year (2027 = 2026-27) = edition_id + 1936: the key the wrappers take.
stadium_nameStringArena name (the club's home venue).
stadium_addressStringArena street address.
stadium_capacityInt64Arena capacity.
presidentStringClub president's name; null for most clubs.
foundation_yearInt64Year the club was founded.
web_urlStringClub website URL.
ticketing_urlStringClub ticket shop URL.
merchandising_urlStringClub merchandise shop URL (the API's merchanUrl).
instagram_urlStringClub Instagram URL.
twitter_urlStringClub X / Twitter URL.
facebook_urlStringClub Facebook URL.
youtube_urlStringClub YouTube URL.
tiktok_urlStringClub TikTok URL.
validatedBooleanTrue when the club profile is validated by the league.
temporary_rosterBooleanTrue while the club's roster is provisional.

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_club_data(club_id=2)

acb_current_roster​

A club's players and staff for an edition (default: the current one).

Endpoint URL: GET https://api2.acb.com/api/seasondata/TeamProfile/current-roster

Valid URL: https://api2.acb.com/api/seasondata/TeamProfile/current-roster?clubId=2&season=2027

API ParameterPythonPatternRequiredNullableDescription
clubIdclub_idYRequired. ACB club id (integer), stable across seasons and sponsor names (2 = Barca, 9 = Real Madrid, 13 = Valencia Basket). Not the season-team team_id.
competitionIdcompetition_idYCompetition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (youth). Omitted = the API's default competition.
seasonseasonYSeason END year (2027 = 2026-27; the first ACB season, 1983-84, is 1984). acb_runtime sends the API's editionId = season - 1936. Omitted = the current 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
club_idInt64Stable club id asked for (the body names no club).
roleStringplayer or staff (head coach and assistants).
person_idInt64ACB licence number of the person; a player's player_id elsewhere.
person_nameStringDisplay name as the site shows it.
first_nameStringFirst name(s); null when the API does not send it.
last_nameStringLast name(s); null when the API does not send it.
shirt_numberStringShirt number as a string; null for staff.
game_roleStringPosition or staff role in Spanish (Base, Escolta, Alero, Ala-pivot, Pivot; Entrenador, Segundo Entrenador).
licensingStringLicence code (for example EUR, JFL, CRE); meaning unverified.
ageInt64Age in years as sent by the roster route.
nationalityStringNationality as sent, a Spanish country name ('Serbia', 'EE.UU.').
nationality_isoStringISO 3166-1 alpha-2 code of nationality, from the 31 observed names; null for an unseen name.
height_cmInt64Height in centimetres (players only).
is_license_activeBooleanTrue when the licence is active in the current season.
edition_idInt64Season id the person record was read for (START year - 1935).
seasonInt64Season END year (2027 = 2026-27) = edition_id + 1936: the key the wrappers take.
temporary_rosterBooleanTrue while the roster is provisional.

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_current_roster(club_id=2, season=2027)

acb_career_stints​

A player's club stints, one row per stint.

Endpoint URL: GET https://api2.acb.com/api/seasondata/PlayerProfile/career

Valid URL: https://api2.acb.com/api/seasondata/PlayerProfile/career?playerLicenceId=20209407

API ParameterPythonPatternRequiredNullableDescription
playerLicenceIdplayer_idYRequired. ACB licence number (integer): the person id everywhere (box score, play-by-play, shots, rosters). 20209407 = Edy Tavares, 20212243 = Olek Balcerowski.

Returns​

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

col_nametypedescription
player_idInt64ACB licence number asked for.
initial_yearInt64Year the stint starts.
end_yearInt64Year the stint ends (the season's END year).
team_idInt64Team entry of the stint's latest edition.
club_idInt64Club id, stable across seasons and sponsor names (2 = Barça, 9 = Real Madrid, 13 = Valencia Basket): the clubId request param and every homeClubId / awayClubId.
teamStringTeam name that season (sponsor names change)
team_abbrStringThree-letter abbreviation (BAR, RMB)
edition_idInt64Season id of the stint's team entry (START year - 1935).
n_editionsInt64Editions the stint spans.
has_no_validated_dataBooleanTrue when the stint has no validated data.

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_career_stints(player_id=20209407)

acb_career_trophies​

A player's trophies, one row per competition.

Endpoint URL: GET https://api2.acb.com/api/seasondata/PlayerProfile/career

Valid URL: https://api2.acb.com/api/seasondata/PlayerProfile/career?playerLicenceId=20209407

API ParameterPythonPatternRequiredNullableDescription
playerLicenceIdplayer_idYRequired. ACB licence number (integer): the person id everywhere (box score, play-by-play, shots, rosters). 20209407 = Edy Tavares, 20212243 = Olek Balcerowski.

Returns​

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

col_nametypedescription
player_idInt64ACB licence number asked for.
competition_idInt64Competition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (x-competitions)
times_championInt64Times the player won the competition.
times_runner_upInt64Times the player was runner-up in the competition.

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_career_trophies(player_id=20209407)

Search players, teams and coaches by name.

Endpoint URL: GET https://api2.acb.com/api/seasondata/Search/search

Valid URL: https://api2.acb.com/api/seasondata/Search/search?searchTerm=tavares&limit=5

API ParameterPythonPatternRequiredNullableDescription
searchTermsearch_termYRequired. Name fragment (accent-insensitive on the player rows); a blank term is refused.
limitlimitYMaximum results per kind (players, teams, coaches).

Returns​

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

col_nametypedescription
kindStringplayer, team or coach.
person_idInt64ACB licence number (players, coaches) or the team entry id (teams).
nameStringDisplay name (nickname) of a player or coach; the team name of a team.
short_nameStringShort display name ('T. Martin').
first_nameStringLegal first name(s)
last_nameStringLegal last name(s)
shirt_numberStringShirt number, a string ('' or null when unknown)
game_roleStringPosition or staff role, in Spanish: Base (point guard), Escolta (shooting guard), Alero (small forward), Ala-pivot (power forward), Pivot (centre); Entrenador (head coach), Segundo Entrenador / Entrenador Ayudante (assistant coach). Null or '' in many rows
is_license_activeBooleanThe licence is active in the current season
club_idInt64Stable club id of a team hit; null for players.
edition_idInt64Season id of the record; null in search results.
seasonInt64Season END year (2027 = 2026-27) = edition_id + 1936: the key the wrappers take.

return_parsed=False — the raw body (dict): the route's JSON plus _request (the ids asked for, in snake_case, with season the END year).

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. The ACB has nothing for the request (an unknown id, play-by-play or shots before 2016-17, a club with no games that season); a game outside a playoff series is zero rows.
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. The fetch failed or the answer is not the one asked for (a rejected key, an error envelope or stub, a body for another season, round, club or player, a game that is not finished).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. A missing or non-integer id, or a season before 1984 (raised before any request), or the API's HTTP 400 / 422.

Example​

acb_search(limit=5, search_term='tavares')