Skip to contents

Whole-game team totals of both teams: shooting, rebounds, fouls, assists, turnovers and paint points.

Endpoint: GET https://api.tpbl.basketball/api/games/{game_id}/stats

Usage

tpbl_box_teams(game_id)

Arguments

game_id

Required. TPBL game id (integer), e.g. 6; game_id in tpbl_games. Not sequential by date (2024-25 = 1-1367, 2025-26 = 1371-8641, 2026-27 = 27535-27667). Only a finished game is served.

Value

A hoopR_data tibble: Whole-game team totals of both teams: shooting, rebounds, fouls, assists, turnovers and paint points. An empty answer raises hoopR_no_data; the columns are always these, in this order (sportsdataverse-py tpbl_box_teams):

col_nametypedescription
game_idintegerTPBL game id (key space: TPBL games on api.tpbl.basketball): the {game_id} of the game routes. Not sequential by date (2024-25 = 1-1367, 2025-26 = 1371-8641, 2026-27 = 27535-27667). The box score echoes no game id, so a box frame parsed without the request stamp has a null game_id.
sidecharacterSide of the game: home or away (the API lists the home team first and never infers it from the venue).
team_idintegerTPBL team id (key space: TPBL teams = franchises, 2-8 so far; stable across seasons): the {team_id} of the division team routes. Not the GoHoops franchise id and not the squad id.
teamcharacterTeam name in Traditional Chinese with the sponsor (Kaohsiung Aquas, Formosa Dreamers, Hsinchu Lioneers, Taoyuan Leopards, New Taipei CTBC DEA, New Taipei Kings, Taipei Mars).
gohoops_squad_idintegerGoHoops squad id (key space: GoHoops squads = one team in one season: 8209-8215 in 2024-25, 11931-11937 in 2025-26, 15536-15542 in 2026-27; it changes every season).
opponent_team_idintegerTPBL team id of the other side of the game (franchise, 2-8). Joins team_id.
field_goals_madeintegerField goals made by the team over the whole game.
field_goals_missedintegerField goals missed by the team over the whole game.
field_goals_attemptedintegerField goals attempted by the team over the whole game.
field_goals_percentagedoubleField goals percentage by the team over the whole game, 0-100 as a string with one decimal ('57.1'); '0.0' without attempts.
two_pointers_madeinteger2-point field goals made by the team over the whole game.
two_pointers_missedinteger2-point field goals missed by the team over the whole game.
two_pointers_attemptedinteger2-point field goals attempted by the team over the whole game.
two_pointers_percentagedouble2-point field goals percentage by the team over the whole game, 0-100 as a string with one decimal ('57.1'); '0.0' without attempts.
three_pointers_madeinteger3-point field goals made by the team over the whole game.
three_pointers_missedinteger3-point field goals missed by the team over the whole game.
three_pointers_attemptedinteger3-point field goals attempted by the team over the whole game.
three_pointers_percentagedouble3-point field goals percentage by the team over the whole game, 0-100 as a string with one decimal ('57.1'); '0.0' without attempts.
free_throws_madeintegerFree throws made by the team over the whole game.
free_throws_missedintegerFree throws missed by the team over the whole game.
free_throws_attemptedintegerFree throws attempted by the team over the whole game.
free_throws_percentagedoubleFree throws percentage by the team over the whole game, 0-100 as a string with one decimal ('57.1'); '0.0' without attempts.
won_scoreintegerTeam-row field: points the team scored in the whole game (the final score).
total_won_scoreintegerTeam-row field: points the team scored in the whole game (the final score; equals won_score on this line).
lost_scoreintegerTeam-row field: points the team conceded in the whole game (the opponent's final score).
total_lost_scoreintegerTeam-row field: points the team conceded in the whole game (equals lost_score on this line).
reboundsintegerTotal rebounds by the team over the whole game (offensive + defensive).
defensive_reboundsintegerDefensive rebounds by the team over the whole game.
offensive_reboundsintegerOffensive rebounds by the team over the whole game.
defensive_foulsintegerFouls committed on defense by the team over the whole game.
offensive_foulsintegerFouls committed on offense by the team over the whole game.
personal_foulsintegerPersonal fouls by the team over the whole game (excludes technical, unsportsmanlike and disqualifying fouls).
foulsintegerFouls charged by the team over the whole game: personal + technical + unsportsmanlike + disqualifying; equals defensive_fouls + offensive_fouls (checked on 4,237 played player lines of 189 games).
assistsintegerAssists by the team over the whole game.
stealsintegerSteals by the team over the whole game.
blocksintegerBlocked shots by the team over the whole game.
turnoversintegerTurnovers committed by the team over the whole game; equals the sum of the *_turnovers type columns (checked on 4,237 played player lines of 189 games).
points_in_paintintegerPoints scored in the paint by the team over the whole game.
second_chance_pointsintegerPoints scored on second chances (after an offensive rebound) by the team over the whole game.
fast_break_pointsintegerPoints scored on the fast break by the team over the whole game.

Details

Source, terms of use, request pacing, seasons, ids, coverage and error classes of this family: see the notes in tpbl_seasons().

Examples

# \donttest{
  try(tpbl_box_teams(game_id = 6))
#> ── TPBL Team Box Score from api.tpbl.basketball ───────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-10-31 21:35:05 UTC
#> # A tibble: 2 × 40
#>   game_id side  team_id team  gohoops_squad_id opponent_team_id field_goals_made
#>     <int> <chr>   <int> <chr>            <int>            <int>            <int>
#> 1       6 home        4 新竹御嵿…             8211                8               47
#> 2       6 away        8 臺北台新…             8215                4               42
#> # ℹ 33 more variables: field_goals_missed <int>, field_goals_attempted <int>,
#> #   field_goals_percentage <dbl>, two_pointers_made <int>,
#> #   two_pointers_missed <int>, two_pointers_attempted <int>,
#> #   two_pointers_percentage <dbl>, three_pointers_made <int>,
#> #   three_pointers_missed <int>, three_pointers_attempted <int>,
#> #   three_pointers_percentage <dbl>, free_throws_made <int>,
#> #   free_throws_missed <int>, free_throws_attempted <int>, …
# }