Free / open data
nba_api (NBA Stats)
MIT-licensed Python package wrapping many unofficial NBA.com stats endpoints, returning data for games, players and teams; not an official or hosted API.
Facts verified against the provider's site on
Tone of public discussions, liked vs criticised points, reliability complaints; based on 25+ public discussions.
Computed from public data only; uptime and latency are not measured yet. Enterprise feeds that sell by contract score lower on transparency by design. How the score works
- Starting price
- Not public
- Free access
- Free tier
- Sports
- 1 (Basketball)
- Live data
- Yes
- Delivery
- SDK only
- Discussions
- 80 threads
- GitHub adoption
- 6.3k repos
Best for
Python developers who want a free wrapper around NBA.com stats endpoints for games, players, teams and play-by-play.
Not ideal for
Production services needing guarantees or clear data rights; it is an unofficial client with no hosted service and no stated rights to the NBA data.
Limitations to check
- − Python client only, no hosted API
- − Wraps undocumented NBA.com endpoints
- − MIT licence covers code only, not the data
- − Basketball (NBA) only
Written from the provider's own pages (source).
Last checked 2026-11-03
nba_api (NBA Stats) at a glance
- What is nba_api (NBA Stats) best for?
- Python developers who want a free wrapper around NBA.com stats endpoints for games, players, teams and play-by-play. Not ideal for: Production services needing guarantees or clear data rights; it is an unofficial client with no hosted service and no stated rights to the NBA data.
- How much does nba_api (NBA Stats) cost?
- nba_api (NBA Stats) does not publish prices on the pages we checked.
- Does nba_api (NBA Stats) have a free tier?
- Yes. nba_api (NBA Stats) lists a free plan called "Free (MIT)".
- What does nba_api (NBA Stats) cover?
- nba_api (NBA Stats) is a free / open data. Its sports: Basketball; data: Historical data, Play-by-play, Player stats, Live scores, Standings, Team stats. Live / in-play data is offered.
- Does nba_api (NBA Stats) have a WebSocket or streaming API?
- No streaming is listed. nba_api (NBA Stats) delivers data by SDK only, so you poll for updates.
- What do developers say about nba_api (NBA Stats)?
- Unofficial Python wrapper around NBA.com stats endpoints, widely used in Reddit data-viz posts, tutorials and many GitHub projects. Users like the clear docs and easy start, but report that NBA header changes break endpoints, timeouts occur, and 2025-26 pulls stopped working for some. Alternatives mentioned: balldontlie, API-Sports; commercial use raises legal questions.
- What are the alternatives to nba_api (NBA Stats)?
- Close alternatives in the SportDex catalog: DunkAPI, NBA Stats (stats.nba.com), Sportradar, FastballAPI, NHL Web API (unofficial docs).
Commercial decision
Pricing & plan limits
| Plan | Price | Requests | What's included |
|---|---|---|---|
| Free (MIT) | Free | — | Open-source client; depends on NBA.com availability and termssource |
Client library for undocumented NBA.com endpoints; no hosted service. The 130+ endpoint count from batch hint not verified.
Before choosing a paid plan, confirm
• What counts as one request (per call, per market, per region?)
• What happens when you exceed the quota: blocked or billed
• Whether live and historical data are on your plan
• Whether your use (public app, betting, resale) is licensed
The critical question
Data coverage
- Sports
- Basketball
- Data types
- Historical dataPlay-by-playPlayer statsLive scoresStandingsTeam stats
- Key competitions
- NBAsource
- Competitions
- Not disclosed
- Live / in-play
- Yes
- Women's competitions
- Not disclosed
- Betting markets
- Not disclosed
- Bookmaker regions
- Not disclosed
- Bookmakers
- Not disclosed
- History depth
- Not disclosed
- Update frequency
- Not disclosed
- Name languages
- Not disclosed
- ID mapping
- Not disclosed
Coverage often depends on the plan; confirm the exact league and season on your plan.
Before you build
Usage rights & access
- Commercial use
- Not disclosed
- Betting products
- Not disclosed
- Redistribution
- Not disclosed
- Storing data
- Not disclosed
- Attribution
- Not disclosed
- Logos & photos
- Not disclosed
- Who can buy
- Individuals, Companiessource
- Verification (KYC)
- Not required
- Not available in
- Not disclosed
- Only available in
- Not disclosed
Open-source Python client for NBA.com endpoints; no account needed
Read the termsDeveloper-ready evaluation
Integration & documentation
- Protocols
- SDK only
- Formats
- JSON
- Authentication
- none
- SDKs
- python
- OpenAPI spec
- Not disclosed
- Claimed latency
- Not disclosed
- Status page
- Not disclosed
- Sandbox / test keys
- Not disclosed
- Support
- Not disclosed
- SLA uptime
- Not disclosed
Preview brief
# Integration brief: nba_api (NBA Stats) Goal: build a feature on nba_api (NBA Stats) data. Use only the official documentation below as the source of truth. ## Known facts (from SportDex, verify before relying on them) - Website: https://github.com/swar/nba_api - Docs: https://github.com/swar/nba_api - Sports: Basketball - Data: Historical data, Play-by-play, Player stats, Live scores, Standings, Team stats - Protocols: SDK only; formats: json - Auth: none - Free plan: Free (MIT) - Note: Client library for undocumented NBA.com endpoints; no hosted service. The 130+ endpoint count from batch hint not verified. ## Verify before writing code - live update frequency - whether commercial use is allowed on the plan you pick - exact endpoint paths, parameters and response fields (read the official docs, do not guess) ## Implementation rules - Keep the API key on the server (environment variable, backend route or edge function); never ship it to the browser. - Cache responses and respect rate limits; count how many requests each screen triggers. - Handle errors explicitly: invalid key, quota exceeded (429), missing fields, empty fixtures, timeouts. - Start with one demo request and log the raw response before building UI on assumed field names.
Data quality signals
Data source & company
- Official partners
- Not disclosed
- How data is collected
- scraped
- Certifications
- Not disclosed
- Payment methods
- Not disclosed
- Minimum contract
- Not disclosed
- Country
- Not disclosed
- Founded
- Not disclosed
Reddit · Hacker News · Stack Overflow · GitHub · YouTube
What developers say
Unofficial Python wrapper around NBA.com stats endpoints, widely used in Reddit data-viz posts, tutorials and many GitHub projects. Users like the clear docs and easy start, but report that NBA header changes break endpoints, timeouts occur, and 2025-26 pulls stopped working for some. Alternatives mentioned: balldontlie, API-Sports; commercial use raises legal questions.
Praised for
- Easy to use with good docs
- Large community and many projects built on it
- Free
Complaints
- Breaks when NBA changes headers or blocks requests
- Bulk pulls are slow or time out
- Unofficial, so legal/commercial use is unclear
Our summary of public discussions, not a rating. Vendor posts are not counted as user opinion.
Discussions
- Forthcoming changes to NBA API, according to @NBACouchside: "so the @NBA is going to basically destroy public facing analytics with the restrictions they are working to implement on their data. PBPstats, probably going to break. RAPM based metrics, done. My own SPI? Done-zo."r/nba · 2023-09
- nba_api: An NBA API Client for Pythonr/nba · 2018-09
- [OC] I made a free NBA API with data from 1979-currentr/nba · 2019-01
- nba_api: An NBA API Client for Pythonr/Python · 2018-09
- nba_api: An NBA API Client for Pythonr/nba · 2019-04
- nba_api: An NBA API Client for Pythonr/fantasybball · 2019-04
- nba_api: An NBA API Client for Pythonr/sportsbook · 2019-04
- nba_api: Helping Deliver OC Material and NBA Stats Data Analysis with Pythonr/fantasybball · 2019-11
- Trae Young's Stats with some Context to Previous All-Star Selectionsr/nba · 2020-02
- nba_api: Helping Deliver OC Material and NBA Stats Data Analysis with Pythonr/sportsbook · 2019-11
- Stat Changes from Regular Season to Playoffs: 2022 - 2023 Seasonr/nba · 2023-06
- [OC] Distribution of Average Lottery Pick Age in the Lottery Era (1985 - 2020)r/nba · 2020-11
Open-source projects using it
- Hiflylabs/awesome-dbt★ 1.7k
- bttmly/nba★ 735
- bradleyfay/py-Goldsberry★ 269
- machina-sports/sports-skills★ 262
- shufinskiy/nba_data★ 248
- ynnadkrap/balldontlie★ 223
Videos
- How to Use nba_api for Analyzing Player Steals in NBA Seasonsvlogize · 2025-04
- 🏀 Learn How to Build an NBA Statistics Tracker in Python!DarkCodeYT · 2024-11
- How to Access NBA Stats Play-by-Play Data with the "Unofficial" NBA APILearn With Jabe · 2021-08
- SIMPLE NBA API DASHBOARD USING PYTHON | Pandas | Plotly Dash | Jupyter Dash | nba_apiAlex Visbal · 2021-07
- How to Scrape NBA Data Using the nba_api Python ModuleKen Jee · 2019-12
Shortlist next steps
Alternatives worth comparing

Basketball API with 19 endpoints for NBA games, play-by-play, shot charts, standings, injuries, sportsbook odds and player props, over REST or MCP with credit-based quotas.
Free tierBasketballCollege sportsfrom $19/mo0 discussions · 3 repos
Undocumented public JSON endpoints behind the NBA's stats website, giving current and historical team and player statistics. Unofficial use, no key and no stability guarantee.
Free tierBasketballFree tier60 discussions · 152 repos
Global supplier of live data, odds feeds, streaming and trading services to sportsbooks, media and leagues; developer portal offers sport-specific APIs with trial keys, commercial pricing by request volume via sales.
⚡ StreamingMulti-sport (40+)Price not public33 discussions · 237 repos
Baseball API for MLB since 2015 and college baseball: pitches, plate appearances, spray charts, box scores, standings, injuries, sportsbook odds, player props and line movement via REST and MCP.
Free tierBaseballCollege sportsfrom $19/mo0 discussions · 2 reposOfficial NHL web endpoints at api-web.nhle.com serving schedules, standings, rosters, box scores, play-by-play and player stats as JSON. No key or official docs; community-maintained reference.
Free tierIce hockeyFree tier3 discussions · 650 repos
Evidence & transparency
Official sources
Facts were extracted from the provider's own pages on 2026-11-03. Empty fields mean the provider does not say, not that the feature is missing. How we know