Skip to main content
Version: 0.2.0

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

Valid URL: https://digital-api.fiba.basketball/hapi/getgdapplayergamestatisticsbyplayerid?gdapPlayerId=211501&gdapCompetitionId=208182

API ParameterPythonPatternRequiredNullableDescription
gdapPlayerIdplayer_idYRequired. FIBA person id (global): personId of a roster row, pId in play-by-play, P_ in the game-page box
gdapCompetitionIdcompYRequired. 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_nametypedescription
player_idInt64FIBA person id (Int64), global; the player_id argument.
competition_idInt64FIBA competition id (Int64) the game log belongs to; the comp argument.
game_idInt64FIBA game id, global across competitions (GDAP key space): gdapGameId, the of a game-page URL.
game_dayInt64Game day number within the round.
round_idInt64Round id (GDAP key space, unique across competitions); the first segment of gameName.
round_codeStringRound code (GP group phase, QF, SF, F final, RS regular season, CL17-32 classification...).
round_nameStringRound label (Group Phase, Quarter-Finals, Final...).
team_idInt64Competition 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_nameStringPlayer's team name.
team_codeStringPlayer's team code.
team_organisation_idInt64Organisation 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_idInt64Opponent's competition team id (see teamId).
versus_team_nameStringOpponent's name.
versus_team_codeStringOpponent's code.
versus_team_organisation_idInt64Opponent's organisation id (see organisationId).
play_duration_in_secondsInt64Playing time in seconds in the game.
pointsInt64Points in the game.
field_goals_madeInt64Field goals made in the game.
field_goals_attemptedInt64Field goals attempted in the game.
field_goals_percentageFloat64Field-goal percentage, 0-100 (in the game; full float precision in averages).
two_points_madeInt64Two-point field goals made in the game.
two_points_attemptedInt64Two-point field goals attempted in the game.
two_points_percentageFloat64Two-point field-goal percentage, 0-100 (in the game; full float precision in averages).
three_points_madeInt64Three-point field goals made in the game.
three_points_attemptedInt64Three-point field goals attempted in the game.
three_points_percentageFloat64Three-point field-goal percentage, 0-100 (in the game; full float precision in averages).
free_throws_madeInt64Free throws made in the game.
free_throws_attemptedInt64Free throws attempted in the game.
free_throws_percentageFloat64Free-throw percentage, 0-100 (in the game; full float precision in averages).
offensive_reboundsInt64Offensive rebounds in the game.
defensive_reboundsInt64Defensive rebounds in the game.
reboundsInt64Rebounds in the game.
assistsInt64Assists in the game.
personal_foulsInt64Personal fouls in the game.
turnoversInt64Turnovers in the game.
stealsInt64Steals in the game.
blocked_shotsInt64Blocked shots in the game.
plus_minusInt64Plus/minus (point differential while on court) in the game.
efficiencyInt64Efficiency (FIBA EFF) in the game.

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

Raises​

ExceptionDescription
NoDataErrorThe 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).
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 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).
ValueErrorThe 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

Valid URL: https://digital-api.fiba.basketball/hapi/getgdapplayerinfobycompetitionid?gdapPlayerId=211501&gdapCompetitionId=208182

API ParameterPythonPatternRequiredNullableDescription
gdapPlayerIdplayer_idYRequired. FIBA person id (global): personId of a roster row, pId in play-by-play, P_ in the game-page box
gdapCompetitionIdcompYRequired. 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_nametypedescription
player_idInt64FIBA person id, global across competitions and roles (player, coach, official): roster personId = play-by-play pId = game-page P_ = gdapPlayerId.
competition_idInt64FIBA competition id (GDAP key space): one per edition (2023 World Cup = 208182, BCL 2024-25 = 208850); gdapCompetitionId.
competition_team_idInt64Competition 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_idInt64Organisation 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_nameStringGiven name(s) as registered with FIBA.
last_nameStringLast name (officials: upper case).
height_cmInt64Height in centimetres.
height_ft_inStringHeight, feet and inches string.
club_nameStringClub at the time of the competition.
club_codeStringClub abbreviation; always null in the samples, values unverified.
is_player_free_agentBooleanTrue when the player had no club.
points_per_gameFloat64The player's average points per game played.
rank_points_per_gameFloat64Rank in the competition by points per game (1 = highest).
rebounds_per_gameFloat64The player's average rebounds per game played.
rank_rebounds_per_gameFloat64Rank in the competition by rebounds per game (1 = highest).
assists_per_gameFloat64The player's average assists per game played.
rank_assists_per_gameFloat64Rank in the competition by assists per game (1 = highest).
points_per_game_per_competition_categoryFloat64Average points per game across the competition category, the comparison baseline (unverified).
rebounds_per_game_per_competition_categoryFloat64Average rebounds per game across the competition category, the comparison baseline (unverified).
assists_per_game_per_competition_categoryFloat64Average assists per game across the competition category, the comparison baseline (unverified).
birth_dateStringDate of birth, YYYY-MM-DD.
nationalitiesStringNationalities (FIBA codes on player info; country objects on rosters and officials). Stored as a JSON string.
social_media_websiteStringWebsite URL; always null in the samples, values unverified.
social_media_twitterStringX/Twitter handle; always null in the samples, values unverified.
social_media_facebookStringFacebook handle or URL; always null in the samples, values unverified.
social_media_instagramStringInstagram handle; always null in the samples, values unverified.
social_media_youtubeStringYouTube handle; always null in the samples, values unverified.
social_networksStringSocial-network handles. Stored as a JSON string.

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

Raises​

ExceptionDescription
NoDataErrorThe 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).
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 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).
ValueErrorThe 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

Valid URL: https://digital-api.fiba.basketball/hapi/getgdapplayercompetitionstatisticsbyplayerid?gdapPlayerId=211501&gdapCompetitionId=208182

API ParameterPythonPatternRequiredNullableDescription
gdapPlayerIdplayer_idYRequired. FIBA person id (global): personId of a roster row, pId in play-by-play, P_ in the game-page box
gdapCompetitionIdcompYRequired. 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_nametypedescription
player_idInt64FIBA person id, global across competitions and roles (player, coach, official): roster personId = play-by-play pId = game-page P_ = gdapPlayerId.
competition_idInt64FIBA competition id (GDAP key space): one per edition (2023 World Cup = 208182, BCL 2024-25 = 208850); gdapCompetitionId.
points_per_gameFloat64The player's average points per game played.
rebounds_per_gameFloat64The player's average rebounds per game played.
rebounds_offensive_per_gameFloat64The player's average offensive rebounds per game played.
rebounds_defensive_per_gameFloat64The player's average defensive rebounds per game played.
assists_per_gameFloat64The player's average assists per game played.
blocks_per_gameFloat64The player's average blocked shots per game played.
turnovers_per_gameFloat64The player's average turnovers per game played.
fouls_per_gameFloat64The player's average personal fouls per game played.
plus_minus_per_gameFloat64The player's average plus/minus (point differential while on court) per game played.
efficiency_per_gameFloat64The player's average efficiency (FIBA EFF) per game played.
play_time_in_seconds_per_gameFloat64The player's average playing time in seconds per game played.
field_goals_made_per_gameFloat64The player's average field goals made per game played.
field_goals_attempted_per_gameFloat64The player's average field goals attempted per game played.
two_points_made_per_gameFloat64The player's average two-point field goals made per game played.
two_points_attempted_per_gameFloat64The player's average two-point field goals attempted per game played.
three_points_made_per_gameFloat64The player's average three-point field goals made per game played.
three_points_attempted_per_gameFloat64The player's average three-point field goals attempted per game played.
free_throws_made_per_gameFloat64The player's average free throws made per game played.
free_throws_attempted_per_gameFloat64The player's average free throws attempted per game played.
points_from_turnovers_per_gameFloat64The player's average points from turnovers per game played.
fast_break_points_per_gameFloat64The player's average fast-break points per game played.
second_chance_points_per_gameFloat64The player's average second-chance points per game played.
points_in_the_paint_per_gameFloat64The player's average points in the paint per game played.
steals_per_gameFloat64The player's average steals per game played.
total_games_playedInt64The player's total games played over the games played.
total_games_wonInt64The player's total games won over the games played.
total_games_lostInt64The player's total games lost over the games played.
total_reboundsInt64The player's total rebounds over the games played.
total_rebounds_offensiveInt64The player's total offensive rebounds over the games played.
total_rebounds_defensiveInt64The player's total defensive rebounds over the games played.
total_blocksInt64The player's total blocked shots over the games played.
total_turnoversInt64The player's total turnovers over the games played.
total_foulsInt64The player's total personal fouls over the games played.
total_assistsInt64The player's total assists over the games played.
total_plus_minusInt64The player's total plus/minus (point differential while on court) over the games played.
total_efficiencyInt64The player's total efficiency (FIBA EFF) over the games played.
total_play_time_in_secondsInt64The player's total playing time in seconds over the games played.
total_pointsInt64The player's total points over the games played.
total_field_goals_madeInt64The player's total field goals made over the games played.
total_field_goals_attemptedInt64The player's total field goals attempted over the games played.
field_goals_percentageFloat64Field-goal percentage, 0-100 (over the competition; full float precision in averages).
total_two_points_madeInt64The player's total two-point field goals made over the games played.
total_two_points_attemptedInt64The player's total two-point field goals attempted over the games played.
two_points_percentageFloat64Two-point field-goal percentage, 0-100 (over the competition; full float precision in averages).
total_three_points_madeInt64The player's total three-point field goals made over the games played.
total_three_points_attemptedInt64The player's total three-point field goals attempted over the games played.
three_points_percentageFloat64Three-point field-goal percentage, 0-100 (over the competition; full float precision in averages).
total_free_throws_madeInt64The player's total free throws made over the games played.
total_free_throws_attemptedInt64The player's total free throws attempted over the games played.
free_throws_percentageFloat64Free-throw percentage, 0-100 (over the competition; full float precision in averages).
total_double_doublesInt64The player's total double-doubles over the games played.
total_triple_doublesInt64The player's total triple-doubles over the games played.
total_quadruple_doublesInt64The player's total quadruple-doubles over the games played.
total_quintuple_doublesInt64The player's total quintuple-doubles over the games played.
total_points_from_turnoversInt64The player's total points from turnovers over the games played.
total_fast_break_pointsInt64The player's total fast-break points over the games played.
total_second_chance_pointsInt64The player's total second-chance points over the games played.
total_points_in_the_paintInt64The player's total points in the paint over the games played.
total_stealsInt64The player's total steals over the games played.
rank_points_per_gameFloat64Rank in the competition by points per game (1 = highest).
rank_rebounds_per_gameFloat64Rank in the competition by rebounds per game (1 = highest).
rank_assists_per_gameFloat64Rank in the competition by assists per game (1 = highest).

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

Raises​

ExceptionDescription
NoDataErrorThe 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).
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 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).
ValueErrorThe 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)