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 Name | Python Parameter Variable | Description | Required | Nullable |
---|---|---|---|---|
LeagueID | league_id | League ID | Required | Defaults to NBA |
TopX | topx_nullable | No Info available | Optional | Yes |
TeamID | team_id_nullable | Team ID | Optional | Yes |
Season | season_year_nullable | Options include current season, current datetime, current year of season. | Optional | Defaults to current season |
RoundPick | round_pick_nullable | No Info available | Optional | Yes |
RoundNum | round_num_nullable | No Info available | Optional | Yes |
OverallPick | overall_pick_nullable | No Info available | Optional | Yes |
College | college_nullable | No Info available | Optional | Yes |
#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], ...