+NBA API
NBA scores, box scores, play-by-play, player and team stats, shot charts and the draft as clean JSON.
The API.SH NBA API returns the data behind NBA.com and its stats pages as structured JSON: the scoreboard for any day, game results, box scores of every type (traditional, advanced, hustle, player tracking, four factors), play-by-play, standings, rosters, player profiles with career stats, game logs and awards, league leaders, the league-wide player, team and lineup stats tables with their filters, shot charts with court coordinates, the draft and the Draft Combine. Every route takes plain parameters such as a team abbreviation, a player id and a season like 2025-26, and the column names come back in snake_case.
- 22 endpoints
- from $1 / 1,000 calls
- 1,000 free credits / month
- failed calls free
GET https://api.api.sh/nba/v1/ players/ search
{"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} What you can build with the NBA API
Live scores and game tracking
Poll the scoreboard for today's games, then pull the full box score and play-by-play for each game as it finishes.
Player analysis and fantasy tools
Combine a player's career stats, season game log and shot chart, or rank the league with the advanced player table filtered by position, last N games or home and road.
Betting and prediction models
Feed models with game results over a date range, team four factors and advanced ratings, lineup net ratings and opponent splits.
Team and roster dashboards
Show standings, a team's season record and league ranks, its roster and coaching staff, and its game log.
Draft and scouting research
Look up every pick of a draft year and the Draft Combine measurements and athletic testing of each prospect.
Sports chatbots and AI agents
Let an agent find a player by name, read his awards and league leader ranks, and answer questions about any season.
NBA data you get
Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.
NBA API endpoints and prices
Every NBA endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing
| NBA player search /nba/ | $1 · $2 PAYG 1 credit |
| NBA shot chart /nba/ | $1 · $2 PAYG 1 credit |
| NBA player profile and career stats /nba/ | $1 · $2 PAYG 1 credit |
| NBA draft history /nba/ | $1 · $2 PAYG 1 credit |
| NBA Draft Combine results /nba/ | $1 · $2 PAYG 1 credit |
| NBA box score /nba/ | $1 · $2 PAYG 1 credit |
| NBA game summary /nba/ | $1 · $2 PAYG 1 credit |
| NBA game results /nba/ | $1 · $2 PAYG 1 credit |
| NBA league leaders /nba/ | $1 · $2 PAYG 1 credit |
| NBA play-by-play /nba/ | $1 · $2 PAYG 1 credit |
| NBA player awards /nba/ | $1 · $2 PAYG 1 credit |
| NBA player game log /nba/ | $1 · $2 PAYG 1 credit |
| NBA player index /nba/ | $1 · $2 PAYG 1 credit |
| NBA team roster /nba/ | $1 · $2 PAYG 1 credit |
| NBA scoreboard for a day /nba/ | $1 · $2 PAYG 1 credit |
| NBA standings /nba/ | $1 · $2 PAYG 1 credit |
| NBA lineup stats /nba/ | $1 · $2 PAYG 1 credit |
| NBA player stats tables /nba/ | $1 · $2 PAYG 1 credit |
| NBA team stats tables /nba/ | $1 · $2 PAYG 1 credit |
| NBA team details /nba/ | $1 · $2 PAYG 1 credit |
| NBA team game log /nba/ | $1 · $2 PAYG 1 credit |
| NBA teams /nba/ | $1 · $2 PAYG 1 credit |
Call the NBA API
NBA player search: GET https://api.api.sh/nba/
curl "https://api.api.sh/nba/v1/players/search?q=lebron+james" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/nba/v1/players/search",
params={"q": "lebron james"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/nba/v1/players/search");
url.searchParams.set("q", "lebron james");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); # Google Sheets (API.SH add-on)
=APISH("/nba/v1/players/search", "q", "lebron james")
# Zapier, Make, n8n (verified node): pick the API.SH app,
# choose "NBA" and "NBA player search".
# AI agents (Claude, ChatGPT, Cursor): add the
# API.SH MCP server https://api.sh/mcp - Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
- Create an API keyOne key works for all 921 platforms.
- Send the requestJSON back in one call. Add
output=csvoroutput=ndjsonfor files.
Why API.SH for NBA data
- Public data only: no NBA login, cookies or account needed
- One key and one response shape for NBA and 920 other platforms
- Built and maintained by API.SH, not third-party publishers
- Pay per call; errors on our side cost nothing
- No rate limits: run as many calls in parallel as you need
- Live status for every endpoint
API.SH vs the official NBA API
The NBA does not offer a documented public developer API. NBA.com's stats pages run on undocumented JSON that community libraries such as nba_api wrap, and licensed real-time feeds are sold through official data partners such as Sportradar. API.SH gives you that public NBA.com data with one key, documented parameters and a stable JSON shape, so there are no undocumented endpoints or headers to work out yourself.
Instead of maintaining Python scripts against undocumented endpoints or paying for a licensed sports data feed, API.SH charges per call with one key that also covers MLB, NHL, NFL, soccer and cricket data.
NBA API questions
What NBA data can I get?+
The scoreboard (/nba/v1/scoreboard), game results (/nba/v1/games), box scores of every type (/nba/v1/game), game summaries (/nba/v1/game/summary), play-by-play (/nba/v1/play-by-play), standings (/nba/v1/standings), teams, team details, rosters and team game logs, player profiles with career stats (/nba/v1/player), player game logs and awards, the player index and player search, league leaders (/nba/v1/leaders), player, team and lineup stats tables (/nba/v1/stats/players, /nba/v1/stats/teams, /nba/v1/stats/lineups), shot charts (/nba/v1/shots), the draft and the Draft Combine.
How much does the NBA API cost?+
Every NBA endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.
Is there a free trial?+
Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /nba/v1/draft at 1 credit each.
Is there an official NBA API?+
Not a documented public one. The NBA licenses official real-time data to partners, and NBA.com's own stats pages use undocumented JSON. API.SH returns that public NBA.com data through documented endpoints.
Is the NBA API free?+
Each account gets 1,000 free credits every month, enough to test every route. After that you pay per call; failed calls are free.
Do I need an NBA.com account or login?+
No. Every route reads public NBA.com data. No login, cookies or NBA account are used.
Can I use it from Python?+
Yes. Any HTTP client works: send your key in the x-api-key header and read JSON, or use the API.SH Python SDK. Seasons are written like 2025-26 and teams by abbreviation, such as LAL.
How do I get started?+
1. Sign up at api.sh. 2. Copy your API key. 3. Call /nba/v1/scoreboard for today's games or /nba/v1/player?id=2544 for a player. Every parameter is in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.
Does the NBA API have a rate limit?+
No. API.SH puts no rate limit on your key: send as many NBA calls in parallel as you need and pay only for the calls that run. If NBA itself slows down, the call returns 503 with a retry-after header and is not charged.