Documentation / Start here
Quick start
From no key to your first answer in a few minutes.
1. Get a key
Sign up at basketballapi.net/signup with your Google account. Your key, which starts bba_live_, is shown straight away and only once: copy it somewhere safe.
2. Make your first call
Every call is a GET to https://api.basketballapi.net/v1 with your key in the Authorization header.
curl https://api.basketballapi.net/v1/results/yesterday \
-H "Authorization: Bearer bba_live_your_key"
The same in Python:
import requests
r = requests.get("https://api.basketballapi.net/v1/results/yesterday",
headers={"Authorization": "Bearer bba_live_your_key"})
for g in r.json()["data"]:
print(g["home"]["name"], g["home_score"], g["away_score"], g["away"]["name"])
3. Read the answer
Every answer has the same two parts: data, the records you asked for, and meta, which says where you are in a list and which plan answered.
{
"data": [ { "id": "gm_7q3m1abc", "date": "2026-10-01", "status": "final", ... } ],
"meta": { "count": 25, "next_cursor": "eyJvIjoyNX0", "page": 1, "per_page": 50, "plan": "Free key" }
}
4. Follow the ids
Every record has an id with a short prefix that says what it is: cp_ a competition, ss_ a season, tm_ a team, gm_ a game, pl_ a player. Take a game id from a list and ask for its box score, play by play or shots:
curl https://api.basketballapi.net/v1/games/gm_7q3m1abc/boxscore \
-H "Authorization: Bearer bba_live_your_key"
Next
- Authentication: the two headers a key can go in.
- Limits and quotas: what your plan allows and how to read what is left.
- Paging: walking through long lists.
- Errors: every error code and what to do about it.