This endpoint retrieves all players from all seasons.
GET /api/v1/players
{
"data":[
{
"id":237,
"first_name":"LeBron",
"last_name":"James",
"position":"F",
"team":{
"id":14,
"abbreviation":"LAL",
"city":"Los Angeles",
"conference":"West",
"division":"Pacific",
"full_name":"Los Angeles Lakers",
"name":"Lakers"
}
}
...
],
"meta": {
"total_pages": 50,
"current_page": 1,
"next_page": 2,
"per_page": 25,
"total_count": 9999
}
}
This endpoint retrieves a specific player.
GET /players/<ID>
curl /players/237
The above command returns JSON structured like this:
{
{
"id":237,
"first_name":"LeBron",
"last_name":"James",
"position":"F",
"team":{
"id":14,
"abbreviation":"LAL",
"city":"Los Angeles",
"conference":"West",
"division":"Pacific",
"full_name":"Los Angeles Lakers",
"name":"Lakers"
}
}
}
'curl “/teams”'
The above command returns JSON structured like this:
{
"data": [
{
"id":14,
"abbreviation":"LAL",
"city":"Los Angeles",
"conference":"West",
"division":"Pacific",
"full_name":"Los Angeles Lakers",
"name":"Lakers"
},
...
],
"meta": {
"total_pages": 1,
"current_page": 1,
"next_page": null,
"per_page": 30,
"total_count": 30
}
}
This endpoint retrieves all teams for the current season.
GET teams
curl "/teams/14"
The above command returns JSON structured like this:
{
"id":14,
"abbreviation":"LAL",
"city":"Los Angeles",
"conference":"West",
"division":"Pacific",
"full_name":"Los Angeles Lakers",
"name":"Lakers"
}
This endpoint retrieves a specific team.
GET /teams/<ID>
curl "/games"
The above command returns JSON structured like this:
{
"data": [
{
"id":1,
"date":"2018-10-16T00:00:00.000Z",
"home_team_score":105,
"visitor_team_score":87,
"season":2018,
"home_team":{
"id":2,
"abbreviation":"BOS",
"city":"Boston",
"conference":"East",
"division":"Atlantic",
"full_name":"Boston Celtics",
"name":"Celtics"
},
"visitor_team":{
"id":23,
"abbreviation":"PHI",
"city":"Philadelphia",
"conference":"East",
"division":"Atlantic",
"full_name":"Philadelphia 76ers",
"name":"76ers"
},
},
...
],
"meta": {
"total_pages": 1877,
"current_page": 1,
"next_page": 2,
"per_page": 25,
"total_count": 46911
}
}
This endpoint retrieves all games.
Seasons are represented by the year they began. For example, 2018 represents season 2018-2019.
GET /games
You can combine query parameters. For example: ?seasons[]=2018&team_ids[]=1 will returns games for team_id 1 for the 2018-2019 season.
curl "/games/1"
The above command returns JSON structured like this:
{
{
"id":1,
"date":"2018-10-16T00:00:00.000Z",
"home_team_score":105,
"visitor_team_score":87,
"season":2018,
"home_team":{
"id":2,
"abbreviation":"BOS",
"city":"Boston",
"conference":"East",
"division":"Atlantic",
"full_name":"Boston Celtics",
"name":"Celtics"
},
"visitor_team":{
"id":23,
"abbreviation":"PHI",
"city":"Philadelphia",
"conference":"East",
"division":"Atlantic",
"full_name":"Philadelphia 76ers",
"name":"76ers"
},
}
}
This endpoint retrieves a specific game.
GET /games/<ID>
curl "/stats"
The above command returns JSON structured like this:
{
"data": [
{
"id":29,
"ast":2,
"blk":2,
"dreb":8,
"fg3_pct":0.25,
"fg3a":4,
"fg3m":1,
"fg_pct":0.429,
"fga":21,
"fgm":9,
"ft_pct":0.8,
"fta":5,
"ftm":4,
"game":{
"id":1,
"date":"2018-10-16T00:00:00.000Z",
"home_team_id":2,
"home_team_score":105,
"season":2018,
"visitor_team_id":23,
"visitor_team_score":87
},
"min":"36:49",
"oreb":2,
"pf":3,
"player":{
"id":145,
"first_name":"Joel",
"last_name":"Embiid",
"position":"F-C",
"team_id":23
},
"pts":23,
"reb":10,
"stl":1,
"team":{
"id":23,
"abbreviation":"PHI",
"city":"Philadelphia",
"conference":"East",
"division":"Atlantic",
"full_name":"Philadelphia 76ers",
"name":"76ers"
},
"turnover":5
},
...
],
"meta": {
"total_pages": 2042,
"current_page": 1,
"next_page": 2,
"per_page": 25,
"total_count": 51045
}
}
This endpoint retrieves all stats.
GET /stats
You can combine query parameters. For example: ?seasons[]=2018&seasons[]=2015&player_ids[]=1&player_ids[]=2 will returns stats for player_ids 1 and 2 for the 2015-2016 and 2018-2019 season.