Balldontlie (NBA) API
Free NBA stats — players, teams and game box scores, no key.
What it does
balldontlie is a free NBA data API: teams, players, games and box-score stats going back to the 1946–47 season, plus season averages and (on higher tiers) live box scores, standings and odds. Data is sourced from official stats feeds.
Base URL
Authentication
A free account and API key are now required — send it as the Authorization header. The older key-less www.balldontlie.io/api/v1 host has been retired.
Code examples
curl -s "https://api.balldontlie.io/v1/players?search=curry&per_page=3" \ -H "Authorization: $BALLDONTLIE_KEY"
import requests
H = {"Authorization": KEY}
r = requests.get("https://api.balldontlie.io/v1/games", params={
"dates[]": "2026-01-15", "per_page": 5}, headers=H, timeout=10)
for g in r.json()["data"]:
print(g["home_team"]["abbreviation"], g["home_team_score"],
"-", g["visitor_team_score"], g["visitor_team"]["abbreviation"])Rate limits & quotas
Free tier: roughly 5 requests/minute (raised on paid tiers), returning HTTP 429 when exceeded. Lists paginate with per_page (max 100) and a meta.next_cursor value you pass back as cursor. Live data, standings and odds are paid tiers.
Key response fields
| data[] / meta.next_cursor | Results and the pagination cursor |
| (players) data[].first_name / last_name / team | Player identity and current team |
| (games) data[].date / home_team_score / visitor_team_score / status | Game result and state |
| (stats) data[].pts / reb / ast / min | Per-game box-score lines |
| (season averages) data[].pts / fg_pct / games_played | Aggregated season stats |
Common errors
| 401 | Missing or invalid Authorization key. |
| 429 | Over the per-minute limit — back off (the free limit is low). |
| 400 | Bad parameter, e.g. a malformed dates[] value (needs YYYY-MM-DD). |
When to use it (and alternatives)
The easiest free API for NBA history, player lookups and box scores — good for stats dashboards, fantasy tools and quizzes. For multi-sport coverage see TheSportsDB or API-Football (soccer); for MLB, the MLB Stats API.
FAQ
Didn't balldontlie used to work without a key?
Yes — the original www.balldontlie.io/api/v1 was open. It has been replaced by api.balldontlie.io, which requires a free API key and applies rate limits.
How do I page through a season of games?
Set per_page=100, read meta.next_cursor from the response and pass it as cursor on the next request until it is null — while respecting the ~5 req/min free limit.
Can I get live scores?
Live box scores, standings and betting odds are on the paid tiers. The free tier is historical and finalised-game data.
New to APIs?
Short guides for working with this API — and any other.