Quickstart
From zero to first response in under 5 minutes.
Every request authenticates with an API key. Grab yours from the dashboard — no password, the key is the login.
Pass the key in the X-API-Key header. The samples on the right fetch one player by slug. For players who exist on multiple teams (like Michael Jordan), add ?teamType=class&team='95-'96 Bulls to pick the version you want.
Every response follows the same envelope: success plus data. A player object carries name, slug, team, overall, positions, and 40+ individual attributes. The full response is shown on the right.
GET /api/players lists everyone with filtering, GET /api/teams serves rosters, and GET /api/players/search finds players by name. Read up on authentication and rate limits, or skip the code entirely and explore in the playground.
ALL SAMPLES USE THE LIVE API AT API.NBA2KAPI.COM.
curl 'https://api.nba2kapi.com/api/players/slug/lebron-james' \ -H 'X-API-Key: your_api_key_here' # Players on multiple teams (like Michael Jordan): # add ?teamType=class&team='95-'96 Bulls
{
"success": true,
"data": {
"_id": "abc123",
"name": "LeBron James",
"slug": "lebron-james",
"team": "Los Angeles Lakers",
"teamType": "curr",
"overall": 97,
"positions": ["SF", "PF"],
"height": "6'9\"",
"weight": "250 lbs",
"playerImage": "https://…",
"teamImg": "https://…",
"closeShot": 92,
"midRangeShot": 88,
"threePointShot": 44,
… 40+ more attributes,
"lastUpdated": "2025-01-15T00:00:00.000Z"
}
}