Advanced Stats
Retrieve advanced statistics for NBA players.
Get Advanced Stats
Use this endpoint to retrieve advanced statistics for NBA players.
import { Time4BoostAPI } from "@time4boost/sdk";
const api = new Time4BoostAPI({ apiKey: "YOUR_API_KEY" });
const advancedStats = await api.nba.getAdvancedStats({
season: 2023,
player_ids: [246]
});
The above command returns JSON structured like this:
{
"data": [
{
"id": 12345,
"player_id": 246,
"team_id": 16,
"game_id": 54321,
"season": 2023,
"pie": 0.185,
"pace": 99.8,
"assist_percentage": 32.5,
"assist_ratio": 18.2,
"assist_to_turnover": 2.5,
"defensive_rating": 105.3,
"defensive_rebound_percentage": 28.7,
"effective_field_goal_percentage": 0.589,
"net_rating": 9.8,
"offensive_rating": 115.1,
"offensive_rebound_percentage": 6.4,
"rebound_percentage": 17.5,
"true_shooting_percentage": 0.608,
"turnover_ratio": 7.3,
"usage_percentage": 38.2,
"player": {
"id": 246,
"first_name": "Giannis",
"last_name": "Antetokounmpo"
},
"team": {
"id": 16,
"full_name": "Milwaukee Bucks",
"abbreviation": "MIL"
}
}
],
"meta": {
"next_cursor": 12346,
"per_page": 25
}
}
HTTP Request
GET https://api.time4boost.com/v1/advanced-stats
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) |
season | false | Filter by season (e.g., 2023 for the 2023-2024 season) |
player_ids | false | Comma-separated list of player IDs to filter the results |
Error Responses
The API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The requested resource is hidden for administrators only. |
404 | Not Found -- The specified resource could not be found. |
429 | Too Many Requests -- You're requesting too many resources! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
Rate Limiting
The API is rate limited to prevent abuse and ensure a fair usage for all users. The rate limits depend on your account tier:
- Free tier: 30 requests per minute
- ALL-STAR tier: 60 requests per minute
- GOAT tier: 120 requests per minute
If you exceed the rate limit, you'll receive a 429 Too Many Requests response. The response will include headers indicating your current rate limit status:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1623423149
The X-RateLimit-Reset header contains a Unix timestamp indicating when your rate limit will reset.