DraftHistory

DraftHistory

#Description

This endpoint returns the entire history of the NBA Draft.

from nba_api.stats.endpoints import drafthistory

drafthistory.DraftHistory()

#Query Parameters

API Parameter NamePython Parameter VariableDescriptionRequiredNullable
LeagueIDleague_idLeague IDRequiredDefaults to NBA
TopXtopx_nullableNo Info availableOptionalYes
TeamIDteam_id_nullableTeam IDOptionalYes
Seasonseason_year_nullableOptions include current season, current datetime, current year of season.OptionalDefaults to current season
RoundPickround_pick_nullableNo Info availableOptionalYes
RoundNumround_num_nullableNo Info availableOptionalYes
OverallPickoverall_pick_nullableNo Info availableOptionalYes
Collegecollege_nullableNo Info availableOptionalYes

#Arguments Taken

This endpoint Only returns draft history with no other features.

#Response

{'DraftHistory': ['PERSON_ID',
  'PLAYER_NAME',
  'SEASON',
  'ROUND_NUMBER',
  'ROUND_PICK',
  'OVERALL_PICK',
  'DRAFT_TYPE',
  'TEAM_ID',
  'TEAM_CITY',
  'TEAM_NAME',
  'TEAM_ABBREVIATION',
  'ORGANIZATION',
  'ORGANIZATION_TYPE']}

#Response fields

#example

from nba_api.stats.endpoints import drafthistory
draft_df = drafthistory.DraftHistory()
draft_df.get_json()

Result:

'{"resource": "drafthistory", "parameters": {"LeagueID": "00", "Season": null, "TeamID": null, "RoundNum": null, "RoundPick": null, "OverallPick": null, "TopX": null, "College": null}, "resultSets": [{"name": "DraftHistory", "headers": ["PERSON_ID", "PLAYER_NAME", "SEASON", "ROUND_NUMBER", "ROUND_PICK", "OVERALL_PICK", "DRAFT_TYPE", "TEAM_ID", "TEAM_CITY", "TEAM_NAME", "TEAM_ABBREVIATION", "ORGANIZATION", "ORGANIZATION_TYPE", "PLAYER_PROFILE_FLAG"], "rowSet": [[1631094, "Paolo Banchero", "2022", 1, 1, 1, "Draft", 1610612753, "Orlando", "Magic", "ORL", "Duke", "College/University", 1], [1631096, "Chet Holmgren", "2022", 1, 2, 2, "Draft", 1610612760, "Oklahoma City", "Thunder", "OKC", "Gonzaga", "College/University", 1], [1631095, "Jabari Smith Jr.", "2022", 1, 3, 3, "Draft", 1610612745, "Houston", "Rockets", "HOU", "Auburn", "College/University", 1], ...