Basketball API
The Basketball API covers the NBA and the WNBA: get both leagues' schedules, live scores with the quarter and game clock on paid plans, final scores by quarter with every overtime period, standings with playoff seeds, and every team's roster. Pick the league with league=nba or league=wnba. The free plan covers the current season of each league: schedules, final scores, standings and rosters.
Available endpoints:
- /v1/basketballgames - Schedules, live and final scores
- /v1/basketballstandings - Standings
- /v1/basketballteams - Teams, divisions and venues
- /v1/basketballplayers - Rosters and player profiles
League guides: NBA API and WNBA API. One API key works for every sports API.
Basketball data at a glance
| Seasons | NBA seasons span two years (season=2026 is 2026-27, October to June); WNBA seasons are calendar years (season=2026 runs May to October) |
|---|---|
| Season types | preseason, regular, cup_final (the NBA Cup championship and the WNBA Commissioner's Cup final), play_in (NBA) and postseason |
| Scoring | Points by quarter in period_scores, with each overtime period; decided_in is regulation or overtime |
| Live games | On paid plans: score, quarter, game clock and halftime or end_of_period breaks |
| Team ids | Each league has its own ids, e.g. nba-lal and wnba-las for the two Los Angeles teams; /v1/basketballteams lists both leagues |
| Standings | win_pct, games_behind, streaks, last_10, home, road and conference records, and conference_rank; the NBA adds divisions |
| Rosters | Position, jersey number, height, weight, birth date, college and experience |
Leagues
https://api.api-ninjas.com/v1/basketballgames
Returns schedules, live scores and final scores. Ask for one day, a team's season or one game; with only league you get today's games. Paid plans see games in progress with the score, period and clock updated throughout the game; the free plan sees their status and the final score once they end. The free plan covers the current season. Developer plans add the three previous seasons, and the Business tier and above gets the full season archive.
Parameters
Provide league, unless you pass game_id or a team id such as nba-bos.
leagueoptionalnbaorwnba.dateoptionalGame day in the league's home time zone (YYYY-MM-DD). Defaults to today when no team or season is given.
teamoptionalTeam id, abbreviation or name (e.g.
BOS): that team's games in the season.seasonoptionalSeason, as the year it starts (
2026= the 2026-27 NBA season). Defaults to the current season. On its own, returns the season's games 50 per page; useoffsetfor the next page.season_typeoptionalOnly games of this part of the season.
statusoptionalOnly games with this status.
game_idoptionalReturn one game.
limitoptional Premium onlyGames per page (1-500). Default
50.offsetoptionalGames to skip, for paging. Default
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/basketballgames endpoint returns a JSON array of games in start order, or an error.
game_idUnique id of the game, e.g.
nba-20261022-cle-phi. It never changes, even when a game is moved to another date.leaguenbaorwnba.sportAlways
basketball.seasonSeason, as the year it starts:
2026is the 2026-27 NBA season and the 2026 WNBA season.season_labelDisplay form of the season, e.g.
2026or2026-27.season_typepreseason,regular,cup_final(the NBA Cup championship game and the WNBA Commissioner's Cup final, which do not count in the standings),play_in(NBA) orpostseason.dateGame day in US Eastern time (YYYY-MM-DD), so a West Coast night game keeps its US date.
start_timeScheduled start in UTC (ISO 8601).
statusscheduled,in_progress,final,postponed,canceled,suspended(including abandoned soccer matches) ordelayed(e.g. a baseball rain delay).status_detailPremium onlyDuring a game:
halftimeorend_of_period. Otherwisenull. While a game is in progress, the free plan seesThis field is for premium subscribers only.periodLive values: PremiumCurrent quarter, or the last one played once the game is final. Each overtime period continues the count (
5,6, ...). While a game is in progress, the free plan seesThis field is for premium subscribers only.clockPremium onlyWhile a game is in progress: time left in the quarter, e.g.
5:33. The free plan seesThis field is for premium subscribers only.home_team, away_teamThe teams:
team_id,nameandabbreviation, named as they were that season (e.g. the New Orleans Hornets or the Charlotte Bobcats).home_score, away_scoreLive values: PremiumCurrent or final score (points);
nullbefore the game starts. While a game is in progress, the free plan seesThis field is for premium subscribers only.period_scoresLive values: PremiumScore per quarter for
homeandaway, with each overtime period. While a game is in progress, the free plan seesThis field is for premium subscribers only.decided_inFor final games:
regulationorovertime.winnerteam_idof the winner once the game is final;nullbefore that.venueWhere the game is played:
name,city,stateandcountry(ISO 3166-1 alpha-2).neutral_sitetruewhen neither team is at home, e.g. international games.original_dateFor a game moved to another date: the date it was first scheduled for. Otherwise
null.updated_atWhen any field of the game last changed (UTC).
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/basketballgames?league=nba" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/basketballstandings
Returns the league table for a season, ordered by league rank, or by conference or division rank when you filter. Tables update throughout the season, shortly after each game ends. The free plan covers the current season. Developer plans add the three previous seasons, and the Business tier and above gets the full season archive.
Parameters
leaguerequirednbaorwnba.seasonoptionalSeason, as the year it starts. Defaults to the current season.
conferenceoptionalOnly this conference, e.g.
Eastern.divisionoptionalOnly this division, e.g.
Atlantic(NBA).
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/basketballstandings endpoint returns a JSON array of team rows, or an error. Fields that do not apply to a league are left out.
league, sport, season, season_labelLeague, sport and season of the table.
teamteam_id,nameandabbreviation, named as they were that season.conference, divisionConference (
EasternorWestern) and, in the NBA, division (e.g.Atlantic).games_played, wins, lossesRecord.
win_pct, games_behindWinning percentage and games behind the leader (division leader in the NBA, conference leader in the WNBA).
points_for, points_against, point_differentialPoints scored and allowed, and the difference.
streakCurrent streak, e.g.
W2orL1.home_record, away_recordHome and road records, e.g.
4-1.division_record, conference_recordRecords against division (NBA) and conference opponents.
last_10Record over the last 10 games.
league_rank, conference_rank, division_rankRank in the league, conference and division (NBA);
conference_rankis the playoff seed in the NBA and the conference position in the WNBA.finaltrueonce the regular season is over and the table no longer changes.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/basketballstandings?league=nba" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/basketballteams
Lists teams with their league, conference, division and home venue. Available on every plan.
Parameters
leagueoptionalOnly this league:
nbaorwnba. Without it, every team of the sport is listed.teamoptionalTeam id, abbreviation or name (e.g.
BOS): return one team.conferenceoptionalOnly teams in this conference.
divisionoptionalOnly teams in this division.
activeoptionalfalselists former teams that appear in past seasons.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/basketballteams endpoint returns a JSON array of teams, or an error.
team_idUnique id, e.g.
nba-bosorwnba-lva. Use it, the abbreviation or the name in other endpoints.leagueThe team's league.
sportAlways
basketball.abbreviation, name, cityIdentity of the team.
nickname, conference, divisionNickname, current conference and division.
venueHome venue:
name,city,state,country.activefalsefor teams that have since moved, such as the New Jersey Nets, which still appear in past seasons.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/basketballteams?league=nba" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/basketballplayers
Returns current rosters and player profiles, by team or by name. Rosters refresh every day. Available on every plan.
Parameters
Provide league with team or name, or a player_id.
leagueoptionalnbaorwnba.teamoptionalTeam id, abbreviation or name: that team's current roster.
nameoptionalFull or partial player name. Case and accents are ignored.
player_idoptionalReturn one player.
positionoptionalOnly this position, e.g.
G.limitoptional Premium onlyPlayers per page (1-500). Default
50.offsetoptionalPlayers to skip, for paging. Default
0.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
The /v1/basketballplayers endpoint returns a JSON array of players, or an error. League-specific fields are left out where they do not apply.
player_idUnique id, e.g.
nba-p-8f12176c56. It stays the same when a player changes teams.leagueLeague of the player's current roster.
teamCurrent team:
team_id,nameandabbreviation;nullfor a player whoseroster_statusisnot_on_roster.name, first_name, last_namePlayer name.
position, jersey_numberPosition abbreviation and jersey number.
height_in, height_cm, weight_lb, weight_kgHeight and weight.
birth_date, birth_placeDate of birth and birthplace (
city,state,country).roster_statusactive,suspendedornot_on_roster.college, experience_yearsCollege and years of professional experience, where they apply.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/basketballplayers?league=nba&team=BOS" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the Basketball API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Basketball API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Basketball API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Basketball API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.Is there a free basketball API?
Yes. The free plan covers the current NBA and WNBA seasons: full schedules, final scores by quarter, standings, teams and rosters. Paid plans add live scores with the quarter and game clock, and past seasons.Which basketball leagues does the API cover?
How do I list every basketball team?
Call/v1/basketballteamsfor the teams of both leagues, or addleague=wnbafor one. Each team has itsleague, conference, division (NBA) and home venue.How are overtime periods shown?
period_scoresadds one entry per overtime period after the four quarters,periodcontinues counting (5 for the first overtime), and final games havedecided_in=overtime.How do I get today's NBA scores?
Call/v1/basketballgames?league=nba. Without a date it returns today's games in US Eastern time; on paid plans games in progress include the score, quarter and game clock.
Explore API integration use cases for recommended APIs and workflow examples.
API Ninjas is not affiliated with or endorsed by the NFL, the NBA, the NHL or any other league, competition or team. League, competition and team names are trademarks of their owners and are used only to identify them.