Skip to content
sportdex.

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

Commercial use: not disclosedBetting use: not disclosedMixed
63

SportDex Score

#12 of 233 sports APIs

See the full ranking →
62

Brand demand, developer discussions, GitHub repos and videos

49

Tone of public discussions, liked vs criticised points, reliability complaints; based on 25+ public discussions.

75

Public prices, docs, terms and coverage you can check before calling sales

70

Free access, docs, SDKs, OpenAPI, sandbox, realtime delivery, ecosystem

Reliability reports from developers: Bulk pulls are slow or time out.

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.

NBA stats analysis in PythonPlayer and team dashboardsHistorical NBA research

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

PlanPriceRequestsWhat'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 terms

Developer-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

Mixeddocsreliabilityfree tierlegalalternatives

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.

Shortlist next steps

Alternatives worth comparing

  • DunkAPI logo
    DunkAPISports data API49

    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 sports
    from $19/mo0 discussions · 3 repos
  • NBA Stats (stats.nba.com) logo
    NBA Stats (stats.nba.com)Free / open data45

    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 tierBasketball
    Free tier60 discussions · 152 repos
  • Sportradar logo
    SportradarB2B data feed51

    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
  • FastballAPI logo
    FastballAPISports data API48

    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 sports
    from $19/mo0 discussions · 2 repos
  • Official 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 hockey
    Free 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