Skip to contents

Match header: teams, status, score, bonus, current period and the content the site offers.

One row. status is the API's matchStatus (FINALIZED once over); home_score / away_score are the live or final score; time_left is the period clock as 'mm:ss'; start is UTC; the has_* flags say which panels (overview, play-by-play, box score, advanced stats) the site offers. team_id is the season-team entry, club_id the stable club.

Endpoint: GET https://api2.acb.com/api/matchdata/MatchHeader/match-header

Usage

acb_match_header(match_id)

Arguments

match_id

(required) ACB match id (integer), one global sequence for every competition: legacy ids (seasons up to 2019-20) sit below about 20000 (12559 = the 2005-06 final); ids from 2020-21 start around 100000 (105401 = Barca 89-86 Valencia Basket, Liga 2026-27 round 3). A whole number; a whole double is accepted.

Value

A hoopR_data tibble, one row per record described above; the columns are always these, in this order (sportsdataverse-py acb_match_header):

col_nametypedescription
match_idintegerMatch 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.
competition_idintegerCompetition id: 1 Liga Endesa, 2 Copa del Rey, 3 Supercopa Endesa, 10 Minicopa Endesa (x-competitions)
startPOSIXctTip-off, ISO 8601 UTC
statuscharacterGame state: FINALIZED once over; the live and scheduled values are unverified.
is_on_half_timelogicalAt half time (live)
time_leftcharacterPeriod clock remaining as 'mm:ss' ('00:00' once the game is over).
current_quarterintegerCurrent or last quarter (5+ = overtime; 0 for 2005-06 matches)
home_scoreintegerHome points: the final score once the game is over, else the live score.
away_scoreintegerAway points: the final score once the game is over, else the live score.
home_bonusintegerHome team-foul bonus counter of the current period (unverified meaning).
away_bonusintegerAway team-foul bonus counter of the current period (unverified meaning).
home_team_idintegerHome season-team entry id (new every season).
home_club_idintegerHome stable club id (2 = Barca, 9 = Real Madrid).
home_teamcharacterTeam name that season (sponsor names change)
home_team_abbrcharacterThree-letter abbreviation (BAR, RMB)
away_team_idintegerAway season-team entry id (new every season).
away_club_idintegerAway stable club id.
away_teamcharacterTeam name that season (sponsor names change)
away_team_abbrcharacterThree-letter abbreviation (BAR, RMB)
edition_idintegerSeason id (START year - 1935) read from the home team entry.
seasonintegerSeason END year (2027 = 2026-27) = edition_id + 1936: the key the wrappers take.
has_overviewlogicalTrue when the site offers the overview panels (lead tracker, lineups, leaders) for the game.
has_play_by_playlogicalTrue when the site offers play-by-play (2016-17 onward).
has_boxscorelogicalTrue when the site offers a box score for the game.
has_advancedlogicalTrue when the site offers advanced statistics for the game.
highlights_urlcharacterHighlights video URL; null when none is published.

Details

  • Legal notice (the aviso legal of acb.com): ACEB, S.A.U. claims intellectual property in the site's databases (the EU sui generis database right) among its other content. It authorises viewing and private copies for personal or journalistic use with the source credited, and requires prior express consent for distribution, reproduction or public communication. These wrappers fetch on your behalf for your own use; check the notice before you republish the data. robots.txt allows the paths.

  • Unofficial and unsupported: api2.acb.com is the .NET API behind acb.com and live.acb.com, not a documented public API. It needs the header X-APIKEY, a public key shipped in acb.com's bundle: the runtime sends the documented value ($ACB_API_KEY overrides it), re-reads the live bundle once on a 401, and never prints the key.

  • Seasons: the API keys a season by editionId = season START year - 1935 (91 = 2026-27, 48 = 1983-84, the first). The wrappers take season, the END year (2027 = 2026-27), and the runtime sends editionId = season - 1936. A route that omits season serves the current edition. team_id is a season-team entry (new every season); club_id is the stable club.

  • Coverage: box scores from 1983-84 (old seasons carry only the whole-game period, quarter 0); play-by-play and shots from 2016-17 (earlier games answer empty lists, which raise hoopR_no_data). Shot coordinates come in two systems, split by match id: millimetres from the attacked basket from 2020-21 (coord_system mm), a 0-100 full-court percent grid before (grid). A game that is not finished (matchFinished false) raises hoopR_asset_fetch for the routes that report it.

  • Errors are classed conditions, all inheriting hoopR_error: hoopR_no_data (HTTP 404 / 204, a route whose rows are empty: an unknown id, a game outside a playoff series, play-by-play or shots before 2016-17, a club with no games that season), hoopR_bad_request (a missing, unknown or non-integer argument or a season before 1984, raised before any request; HTTP 400 / 422) and hoopR_asset_fetch (a key the API still rejects after one re-read of the bundle, any other non-200 after three attempts, a non-JSON or problem+json body, an error envelope or empty stub, a body for another season, round, club, player or match, a game that is not finished). Wrappers raise; they never warn and return empty.

Examples

# \donttest{
  try(acb_match_header(match_id = 105401))
#> ── ACB Match Header from api2.acb.com ─────────────────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-10-31 21:26:31 UTC
#> # A tibble: 1 × 26
#>   match_id competition_id start               status   is_on_half_time time_left
#>      <int>          <int> <dttm>              <chr>    <lgl>           <chr>    
#> 1   105401              1 2026-10-11 17:00:00 FINALIZ… FALSE           00:00    
#> # ℹ 20 more variables: current_quarter <int>, home_score <int>,
#> #   away_score <int>, home_bonus <int>, away_bonus <int>, home_team_id <int>,
#> #   home_club_id <int>, home_team <chr>, home_team_abbr <chr>,
#> #   away_team_id <int>, away_club_id <int>, away_team <chr>,
#> #   away_team_abbr <chr>, edition_id <int>, season <int>, has_overview <lgl>,
#> #   has_play_by_play <lgl>, has_boxscore <lgl>, has_advanced <lgl>,
#> #   highlights_url <chr>
# }