NBA API
Get the NBA schedule, live scores with the quarter and game clock on paid plans, final scores by quarter, standings with playoff seeds, and every team's roster, from the preseason through the play-in and the Finals. The free plan covers the current season's schedule, final scores, standings and rosters.
The NBA is served by the Sports API with league=nba. The same key and fields work for the other leagues.
Available endpoints:
- /v1/sportsgames - NBA schedules, live and final scores
- /v1/sportsstandings - NBA standings
- /v1/sportsteams - NBA teams
- /v1/sportsplayers - NBA rosters and players
NBA data at a glance
| Season value | season=2026 is the 2026-27 season |
|---|---|
| Season types | preseason, regular, cup_final (the NBA Cup championship, which does not count in the standings), play_in and postseason |
| Game day | date is the US Eastern date, so West Coast night games keep their US date |
| Scoring | Points by quarter in period_scores, with each overtime period |
| Live games | On paid plans: score, quarter, game clock and halftime or end_of_period breaks |
| Rosters | Current roster with position, jersey number, height, weight, birth date, college and experience |
| Former teams | The New Jersey Nets appear in past seasons with their own team id; past games show the New Orleans Hornets and Charlotte Bobcats names |
NBA standings fields
wins, losses, win_pct, games_behind (division leader), points_for, points_against, streak, last_10, home, road, division and conference records, and the playoff seed in conference_rank.
https://api.api-ninjas.com/v1/sportsgames
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 every stored season.
Full parameter and response reference: /v1/sportsgames.
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/sportsgames?league=nba" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/sportsstandings
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 every stored season.
Full parameter and response reference: /v1/sportsstandings.
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/sportsstandings?league=nba" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/sportsteams
Lists teams with their conference, division and home venue. Available on every plan.
Full parameter and response reference: /v1/sportsteams.
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/sportsteams?league=nba" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/sportsplayers
Returns current rosters and player profiles, by team or by name. Rosters refresh every day. Available on every plan.
Full parameter and response reference: /v1/sportsplayers.
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/sportsplayers?league=nba&team=BOS" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the NBA API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the NBA 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 NBA 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 NBA 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 an official NBA API?
The NBA does not publish a supported public API for developers. The API Ninjas Sports API provides NBA schedules, live and final scores, standings and rosters withleague=nba. API Ninjas is not affiliated with or endorsed by the NBA.How do I get today's NBA scores?
Call/v1/sportsgames?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.Are play-in and playoff games included?
Yes. Play-in games haveseason_type=play_inand playoff gamesseason_type=postseason, in the same season as the regular season.What is conference_rank in the standings?
The playoff seed in the conference, with the league's tiebreakers applied.games_behindis measured from the division leader.
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 team. League and team names are trademarks of their owners and are used only to identify them. If a result differs from the league's official record, the official record prevails.