FIBA (digital API and game pages) — FIBA digital API (GDAP, digital-api.fiba.basketball) — Player
fiba_gdap_player_game_stats
A player's game log (full box lines) at a competition.
Endpoint URL: GET https://digital-api.fiba.basketball/hapi/getgdapplayergamestatisticsbyplayerid
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
gdapPlayerId | player_id | Y | Required. FIBA person id (global): personId of a roster row, pId in play-by-play, P_ | ||
gdapCompetitionId | comp | Y | Required. FIBA competition id (GDAP key space), one per edition: competition.competitionId of any game row (208182 = World Cup 2023, 208722 = Paris 2024 men, 208850 = BCL 2024-25). Find it with fiba_gdap_editions or fiba_gdap_games_between. |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
player_id | Int64 | FIBA person id (Int64), global; the player_id argument. |
competition_id | Int64 | FIBA competition id (Int64) the game log belongs to; the comp argument. |
game_id | Int64 | FIBA game id, global across competitions (GDAP key space): gdapGameId, the |
game_day | Int64 | Game day number within the round. |
round_id | Int64 | Round id (GDAP key space, unique across competitions); the first segment of gameName. |
round_code | String | Round code (GP group phase, QF, SF, F final, RS regular season, CL17-32 classification...). |
round_name | String | Round label (Group Phase, Quarter-Finals, Final...). |
team_id | Int64 | Competition team id: one per team per competition (Germany = 279569 at the 2023 World Cup, 281545 at Paris 2024). Joins getgdapcompetitionteamrosterbyteamid / getgdapcompetitionteamstatisticsbyteamid gdapTeamId; not an organisationId. |
team_name | String | Player's team name. |
team_code | String | Player's team code. |
team_organisation_id | Int64 | Organisation id, stable across competitions and seasons: the national federation for a national team (64 = Germany), the club for a club team (396 = Filou Oostende). Same key space as nationalFederationId, clubId, play-by-play oId and the game page's T_ |
versus_team_id | Int64 | Opponent's competition team id (see teamId). |
versus_team_name | String | Opponent's name. |
versus_team_code | String | Opponent's code. |
versus_team_organisation_id | Int64 | Opponent's organisation id (see organisationId). |
play_duration_in_seconds | Int64 | Playing time in seconds in the game. |
points | Int64 | Points in the game. |
field_goals_made | Int64 | Field goals made in the game. |
field_goals_attempted | Int64 | Field goals attempted in the game. |
field_goals_percentage | Float64 | Field-goal percentage, 0-100 (in the game; full float precision in averages). |
two_points_made | Int64 | Two-point field goals made in the game. |
two_points_attempted | Int64 | Two-point field goals attempted in the game. |
two_points_percentage | Float64 | Two-point field-goal percentage, 0-100 (in the game; full float precision in averages). |
three_points_made | Int64 | Three-point field goals made in the game. |
three_points_attempted | Int64 | Three-point field goals attempted in the game. |
three_points_percentage | Float64 | Three-point field-goal percentage, 0-100 (in the game; full float precision in averages). |
free_throws_made | Int64 | Free throws made in the game. |
free_throws_attempted | Int64 | Free throws attempted in the game. |
free_throws_percentage | Float64 | Free-throw percentage, 0-100 (in the game; full float precision in averages). |
offensive_rebounds | Int64 | Offensive rebounds in the game. |
defensive_rebounds | Int64 | Defensive rebounds in the game. |
rebounds | Int64 | Rebounds in the game. |
assists | Int64 | Assists in the game. |
personal_fouls | Int64 | Personal fouls in the game. |
turnovers | Int64 | Turnovers in the game. |
steals | Int64 | Steals in the game. |
blocked_shots | Int64 | Blocked shots in the game. |
plus_minus | Int64 | Plus/minus (point differential while on court) in the game. |
efficiency | Int64 | Efficiency (FIBA EFF) in the game. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. FIBA has nothing for the request (HTTP 404, or GDAP answered {} or [] for an unknown id). |
AssetFetchError | The 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 about the request (an error envelope, HTTP 401 after a key refresh, HTTP 500, a body for another game, competition, team, player, federation, family or season). |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. HTTP 400 / 422, or a malformed id, season or date. |
Example
fiba_gdap_player_game_stats(comp=208182, player_id=211501)
fiba_gdap_player_info
A player's bio and per-game averages with ranks at a competition.
Endpoint URL: GET https://digital-api.fiba.basketball/hapi/getgdapplayerinfobycompetitionid
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
gdapPlayerId | player_id | Y | Required. FIBA person id (global): personId of a roster row, pId in play-by-play, P_ | ||
gdapCompetitionId | comp | Y | Required. FIBA competition id (GDAP key space), one per edition: competition.competitionId of any game row (208182 = World Cup 2023, 208722 = Paris 2024 men, 208850 = BCL 2024-25). Find it with fiba_gdap_editions or fiba_gdap_games_between. |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
player_id | Int64 | FIBA person id, global across competitions and roles (player, coach, official): roster personId = play-by-play pId = game-page P_ |
competition_id | Int64 | FIBA competition id (GDAP key space): one per edition (2023 World Cup = 208182, BCL 2024-25 = 208850); gdapCompetitionId. |
competition_team_id | Int64 | Competition team id: one per team per competition (Germany = 279569 at the 2023 World Cup, 281545 at Paris 2024). Joins getgdapcompetitionteamrosterbyteamid / getgdapcompetitionteamstatisticsbyteamid gdapTeamId; not an organisationId. |
organisation_id | Int64 | Organisation id, stable across competitions and seasons: the national federation for a national team (64 = Germany), the club for a club team (396 = Filou Oostende). Same key space as nationalFederationId, clubId, play-by-play oId and the game page's T_ |
first_name | String | Given name(s) as registered with FIBA. |
last_name | String | Last name (officials: upper case). |
height_cm | Int64 | Height in centimetres. |
height_ft_in | String | Height, feet and inches string. |
club_name | String | Club at the time of the competition. |
club_code | String | Club abbreviation; always null in the samples, values unverified. |
is_player_free_agent | Boolean | True when the player had no club. |
points_per_game | Float64 | The player's average points per game played. |
rank_points_per_game | Float64 | Rank in the competition by points per game (1 = highest). |
rebounds_per_game | Float64 | The player's average rebounds per game played. |
rank_rebounds_per_game | Float64 | Rank in the competition by rebounds per game (1 = highest). |
assists_per_game | Float64 | The player's average assists per game played. |
rank_assists_per_game | Float64 | Rank in the competition by assists per game (1 = highest). |
points_per_game_per_competition_category | Float64 | Average points per game across the competition category, the comparison baseline (unverified). |
rebounds_per_game_per_competition_category | Float64 | Average rebounds per game across the competition category, the comparison baseline (unverified). |
assists_per_game_per_competition_category | Float64 | Average assists per game across the competition category, the comparison baseline (unverified). |
birth_date | String | Date of birth, YYYY-MM-DD. |
nationalities | String | Nationalities (FIBA codes on player info; country objects on rosters and officials). Stored as a JSON string. |
social_media_website | String | Website URL; always null in the samples, values unverified. |
social_media_twitter | String | X/Twitter handle; always null in the samples, values unverified. |
social_media_facebook | String | Facebook handle or URL; always null in the samples, values unverified. |
social_media_instagram | String | Instagram handle; always null in the samples, values unverified. |
social_media_youtube | String | YouTube handle; always null in the samples, values unverified. |
social_networks | String | Social-network handles. Stored as a JSON string. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. FIBA has nothing for the request (HTTP 404, or GDAP answered {} or [] for an unknown id). |
AssetFetchError | The 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 about the request (an error envelope, HTTP 401 after a key refresh, HTTP 500, a body for another game, competition, team, player, federation, family or season). |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. HTTP 400 / 422, or a malformed id, season or date. |
Example
fiba_gdap_player_info(comp=208182, player_id=211501)
fiba_gdap_player_stats
A player's per-game averages, totals and highs at a competition.
Endpoint URL: GET https://digital-api.fiba.basketball/hapi/getgdapplayercompetitionstatisticsbyplayerid
| API Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
gdapPlayerId | player_id | Y | Required. FIBA person id (global): personId of a roster row, pId in play-by-play, P_ | ||
gdapCompetitionId | comp | Y | Required. FIBA competition id (GDAP key space), one per edition: competition.competitionId of any game row (208182 = World Cup 2023, 208722 = Paris 2024 men, 208850 = BCL 2024-25). Find it with fiba_gdap_editions or fiba_gdap_games_between. |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
player_id | Int64 | FIBA person id, global across competitions and roles (player, coach, official): roster personId = play-by-play pId = game-page P_ |
competition_id | Int64 | FIBA competition id (GDAP key space): one per edition (2023 World Cup = 208182, BCL 2024-25 = 208850); gdapCompetitionId. |
points_per_game | Float64 | The player's average points per game played. |
rebounds_per_game | Float64 | The player's average rebounds per game played. |
rebounds_offensive_per_game | Float64 | The player's average offensive rebounds per game played. |
rebounds_defensive_per_game | Float64 | The player's average defensive rebounds per game played. |
assists_per_game | Float64 | The player's average assists per game played. |
blocks_per_game | Float64 | The player's average blocked shots per game played. |
turnovers_per_game | Float64 | The player's average turnovers per game played. |
fouls_per_game | Float64 | The player's average personal fouls per game played. |
plus_minus_per_game | Float64 | The player's average plus/minus (point differential while on court) per game played. |
efficiency_per_game | Float64 | The player's average efficiency (FIBA EFF) per game played. |
play_time_in_seconds_per_game | Float64 | The player's average playing time in seconds per game played. |
field_goals_made_per_game | Float64 | The player's average field goals made per game played. |
field_goals_attempted_per_game | Float64 | The player's average field goals attempted per game played. |
two_points_made_per_game | Float64 | The player's average two-point field goals made per game played. |
two_points_attempted_per_game | Float64 | The player's average two-point field goals attempted per game played. |
three_points_made_per_game | Float64 | The player's average three-point field goals made per game played. |
three_points_attempted_per_game | Float64 | The player's average three-point field goals attempted per game played. |
free_throws_made_per_game | Float64 | The player's average free throws made per game played. |
free_throws_attempted_per_game | Float64 | The player's average free throws attempted per game played. |
points_from_turnovers_per_game | Float64 | The player's average points from turnovers per game played. |
fast_break_points_per_game | Float64 | The player's average fast-break points per game played. |
second_chance_points_per_game | Float64 | The player's average second-chance points per game played. |
points_in_the_paint_per_game | Float64 | The player's average points in the paint per game played. |
steals_per_game | Float64 | The player's average steals per game played. |
total_games_played | Int64 | The player's total games played over the games played. |
total_games_won | Int64 | The player's total games won over the games played. |
total_games_lost | Int64 | The player's total games lost over the games played. |
total_rebounds | Int64 | The player's total rebounds over the games played. |
total_rebounds_offensive | Int64 | The player's total offensive rebounds over the games played. |
total_rebounds_defensive | Int64 | The player's total defensive rebounds over the games played. |
total_blocks | Int64 | The player's total blocked shots over the games played. |
total_turnovers | Int64 | The player's total turnovers over the games played. |
total_fouls | Int64 | The player's total personal fouls over the games played. |
total_assists | Int64 | The player's total assists over the games played. |
total_plus_minus | Int64 | The player's total plus/minus (point differential while on court) over the games played. |
total_efficiency | Int64 | The player's total efficiency (FIBA EFF) over the games played. |
total_play_time_in_seconds | Int64 | The player's total playing time in seconds over the games played. |
total_points | Int64 | The player's total points over the games played. |
total_field_goals_made | Int64 | The player's total field goals made over the games played. |
total_field_goals_attempted | Int64 | The player's total field goals attempted over the games played. |
field_goals_percentage | Float64 | Field-goal percentage, 0-100 (over the competition; full float precision in averages). |
total_two_points_made | Int64 | The player's total two-point field goals made over the games played. |
total_two_points_attempted | Int64 | The player's total two-point field goals attempted over the games played. |
two_points_percentage | Float64 | Two-point field-goal percentage, 0-100 (over the competition; full float precision in averages). |
total_three_points_made | Int64 | The player's total three-point field goals made over the games played. |
total_three_points_attempted | Int64 | The player's total three-point field goals attempted over the games played. |
three_points_percentage | Float64 | Three-point field-goal percentage, 0-100 (over the competition; full float precision in averages). |
total_free_throws_made | Int64 | The player's total free throws made over the games played. |
total_free_throws_attempted | Int64 | The player's total free throws attempted over the games played. |
free_throws_percentage | Float64 | Free-throw percentage, 0-100 (over the competition; full float precision in averages). |
total_double_doubles | Int64 | The player's total double-doubles over the games played. |
total_triple_doubles | Int64 | The player's total triple-doubles over the games played. |
total_quadruple_doubles | Int64 | The player's total quadruple-doubles over the games played. |
total_quintuple_doubles | Int64 | The player's total quintuple-doubles over the games played. |
total_points_from_turnovers | Int64 | The player's total points from turnovers over the games played. |
total_fast_break_points | Int64 | The player's total fast-break points over the games played. |
total_second_chance_points | Int64 | The player's total second-chance points over the games played. |
total_points_in_the_paint | Int64 | The player's total points in the paint over the games played. |
total_steals | Int64 | The player's total steals over the games played. |
rank_points_per_game | Float64 | Rank in the competition by points per game (1 = highest). |
rank_rebounds_per_game | Float64 | Rank in the competition by rebounds per game (1 = highest). |
rank_assists_per_game | Float64 | Rank in the competition by assists per game (1 = highest). |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. FIBA has nothing for the request (HTTP 404, or GDAP answered {} or [] for an unknown id). |
AssetFetchError | The 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 about the request (an error envelope, HTTP 401 after a key refresh, HTTP 500, a body for another game, competition, team, player, federation, family or season). |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. HTTP 400 / 422, or a malformed id, season or date. |
Example
fiba_gdap_player_stats(comp=208182, player_id=211501)