NBA player search

GET https://api.api.sh/nba/v1/players/search
1 credit / call sports try it in the playground →

Every NBA player since 1946 whose name matches: id, name, active, first and last season, current team and link. Exact matches first. Pass next_page back as page; null on the last page.

Every response includes credits_used: the credits this call cost.

Part of the NBA API: 22 endpoints with prices, use cases and example responses.

Parameters

nametypedescription
qrequired string Player name or part of it. Example: lebron james
active boolean true active players only, false past players only.
page integer Page number, from 1.
limit integer Results per page (1-100, default 25).

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/nba/v1/players/search?q=lebron+james" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)

{"q": "lebron james","applied_filters": {"active": null},"total": 1,"page": 1,"count": 1,"next_page": null,"players": [{"id": 2544,"name": "LeBron James","last_first": "James, LeBron","active": true,"from_year": 2003,"to_year": 2026,"team_id": 1610612755,"team": "PHI","team_name": "Philadelphia 76ers","slug": "lebron_james","played_games": true,"url": "https://www.nba.com/player/2544/lebron_james"}],"cached": false,"credits_used": 1}
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.