GET/api/players/search

Search players

Find players by name with fuzzy matching — the endpoint behind autocomplete boxes, type-to-search UIs, and Discord bot commands.

REQUIRES X-API-KEY HEADER · 500 REQ/HR FREE
QUERY PARAMETERS
q
string · required
The search query. Partial names work — lebron, leb, and james lebron all find LeBron James.
teamType
string
Narrow to one era: curr, class, or allt. E.g. q=kobe&teamType=class.
limit
number
Maximum results to return. Max 50, default 50.
MATCHING BEHAVIOR

Search is case-insensitive — ?q=LEBRON and ?q=lebronreturn the same results — and word order doesn't matter. meta.truncated tells you whether more matches exist beyond limit.

RETURNS SUMMARY PLAYER OBJECTS · FETCH /API/PLAYERS/SLUG/:SLUG FOR FULL DETAIL.

curl 'https://api.nba2kapi.com/api/players/search?\
q=lebron' \
  -H 'X-API-Key: YOUR_KEY'
RESPONSE200 OK
{
  "success": true,
  "data": [
    {
      "_id": "abc123",
      "name": "LeBron James",
      "slug": "lebron-james",
      "team": "Los Angeles Lakers",
      "teamType": "curr",
      "overall": 97,
      "positions": ["SF", "PF"],
      "playerImage": "https://…",
      "teamImg": "https://…"
    }
  ],
  "meta": {
    "count": 1,
    "total": 1,
    "truncated": false,
    "timestamp": "2025-01-15T00:00:00.000Z"
  }
}
nba2kapiData from 2kratings.com · Not affiliated with 2K Sports or the NBAAPI Docs →