Player Stats
Retrieve detailed player statistics for NBA games.
Get Player Stats
Use this endpoint to retrieve detailed player statistics for NBA games.
import { Time4BoostAPI } from "@time4boost/sdk";
const api = new Time4BoostAPI({ apiKey: "YOUR_API_KEY" });
const playerStats = await api.nba.getPlayerStats({
player_ids: [15],
seasons: [2023],
postseason: false
});
The above command returns JSON structured like this:
{
"data": [
{
"id": 14325883,
"min": "38",
"fgm": 10,
"fga": 16,
"fg_pct": 0.625,
"fg3m": 0,
"fg3a": 1,
"fg3_pct": 0,
"ftm": 11,
"fta": 22,
"ft_pct": 0.5,
"oreb": 3,
"dreb": 7,
"reb": 10,
"ast": 9,
"stl": 2,
"blk": 1,
"turnover": 5,
"pf": 1,
"pts": 31,
"player": {
"id": 15,
"first_name": "Giannis",
"last_name": "Antetokounmpo",
"position": "F"
},
"team": {
"id": 17,
"full_name": "Milwaukee Bucks"
},
"game": {
"id": 1038184,
"date": "2024-01-20",
"season": 2023,
"status": "Final",
"home_team_score": 135,
"visitor_team_score": 141
}
},
// ... more player stats
],
"meta": {
"next_cursor": 14325888,
"per_page": 25
}
}
HTTP Request
GET https://api.time4boost.com/v1/nba/playerstats
Query Parameters
Parameter | Required | Description |
---|---|---|
cursor | false | Cursor for pagination, use the value from meta.next_cursor |
per_page | false | Number of results per page (default: 25, max: 100) |
player_ids[] | false | Array of player IDs to filter stats |
game_ids[] | false | Array of game IDs to filter stats |
dates[] | false | Array of dates (YYYY-MM-DD) to filter stats |
seasons[] | false | Array of seasons to filter stats |
postseason | false | Filter for playoff games (true) or regular season games (false) |
start_date | false | Filter stats on or after this date (YYYY-MM-DD) |
end_date | false | Filter stats on or before this date (YYYY-MM-DD) |