Leaders
Retrieve NBA player leaders for specific stat categories.
Get Leaders
Use this endpoint to retrieve regular season per game leaders for specific stat categories.
import { Time4BoostAPI } from "@time4boost/sdk";
const api = new Time4BoostAPI({ apiKey: "YOUR_API_KEY" });
const leaders = await api.nba.getLeaders({
stat_type: "pts",
season: 2023,
});
The above command returns JSON structured like this:
{
"data": [
{
"player": {
"id": 19,
"first_name": "Stephen",
"last_name": "Curry",
"position": "G",
"height": "6-2",
"weight": 185,
"jersey_number": "30",
"college": "Davidson",
"country": "USA",
"draft_year": 2009,
"draft_round": 1,
"draft_number": 7,
"team_id": 10
},
"value": 32.3,
"stat_type": "pts",
"rank": 1,
"season": 2023,
"games_played": 34
},
// ... more leaders
],
"meta": {
"next_cursor": "2",
"per_page": 25
}
}
HTTP Request
GET https://api.time4boost.com/v1/nba/leaders
Query Parameters
Parameter | Required | Description |
---|---|---|
stat_type | true | Returns leaders for the specified stat_type. Valid stat_types are reb, dreb, tov, ast, oreb, min, pts, stl, blk. For example, ?stat_type=pts will return the current points per game leaders. |
season | true | Returns leaders for the specified season. |
cursor | false | Cursor for pagination, use the value from meta.next_cursor |
per_page | false | Number of results per page (default: 25, max: 100) |