NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

Basketball API

The Basketball API covers the NBA, the WNBA and Division I men's and women's college basketball: get schedules, live scores with the period and game clock on paid plans, final scores by period with every overtime, standings with playoff seeds or conference tables, the weekly college polls, and every team's roster. Pick the league with league=nba, league=wnba, league=ncaab (men's college) or league=ncaaw (women's college). The free plan covers the current season of each league: schedules, final scores, standings and rosters.

League guides: NBA API, WNBA API, College Basketball API and Women's College Basketball API. One API key works for every sports API.

Leagues

LeagueWhat you getLeague value
NBASchedules, live and final scores by quarter, play-in and playoffs, standings, teams and rostersnba
WNBASchedules, live and final scores by quarter, Commissioner's Cup final and playoffs, standings by conference, teams and rosterswnba
College BasketballDivision I men: schedules, live and final scores by half, conference tournaments, the NCAA tournament with seeds, conference standings, AP and Coaches polls, rostersncaab
Women's College BasketballDivision I women: schedules, live and final scores by quarter, conference tournaments, the NCAA tournament with seeds, conference standings, AP and Coaches polls, rostersncaaw
4 endpoints

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.

  • league  optional

    nba, wnba, ncaab or ncaaw.

  • date  optional

    Game day in the league's home time zone (YYYY-MM-DD). Defaults to today when no team or season is given.

  • team  optional

    Team id, abbreviation or name (e.g. BOS): that team's games in the season.

  • season  optional

    Season, 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; use offset for the next page.

  • season_type  optional

    Only games of this part of the season.

  • status  optional

    Only games with this status.

  • game_id  optional

    Return one game.

  • limit  optional Premium only

    Games per page (1-500). Default 50.

  • offset  optional

    Games to skip, for paging. Default 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/basketballgames endpoint returns a JSON array of games in start order, or an error.

  • game_id

    Unique id of the game, e.g. nba-20261022-cle-phi. It never changes, even when a game is moved to another date.

  • league

    nba, wnba, ncaab or ncaaw.

  • sport

    Always basketball.

  • season

    Season, as the year it starts: 2026 is the 2026-27 NBA and college seasons and the 2026 WNBA season.

  • season_label

    Display form of the season, e.g. 2026 or 2026-27.

  • season_type

    preseason, 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), conference_tournament (college conference tournaments) or postseason (the playoffs; the NCAA tournament, the NIT and the other college postseason tournaments).

  • event

    College only: the tournament, bowl or round, e.g. SEC Championship, Rose Bowl Game, Big East Tournament - Quarterfinal or NCAA Men's Basketball Championship - West Region - 1st Round. null for most regular-season games.

  • conference_game

    College only: true when the game counts in the conference standings.

  • date

    Game day in US Eastern time (YYYY-MM-DD), so a West Coast night game keeps its US date.

  • start_time

    Scheduled start in UTC (ISO 8601).

  • status

    scheduled, in_progress, final, postponed, canceled, suspended (including abandoned soccer matches) or delayed (e.g. a baseball rain delay).

  • status_detail Premium only

    During a game: halftime or end_of_period. Otherwise null. While a game is in progress, the free plan sees This field is for premium subscribers only.

  • period Live values: Premium

    Current quarter, or the last one played once the game is final. Quarters, except halves in men's college basketball (and in women's college basketball before 2015-16). Each overtime period continues the count (5, 6, ... after four quarters). While a game is in progress, the free plan sees This field is for premium subscribers only.

  • clock Premium only

    While a game is in progress: time left in the quarter, e.g. 5:33. The free plan sees This field is for premium subscribers only.

  • home_team, away_team

    The teams: team_id, name and abbreviation, named as they were that season (e.g. the New Orleans Hornets or the Charlotte Bobcats). College games add each team's rank (its Top 25 rank at game time: the AP poll, and in college football the College Football Playoff ranking once it is published) and seed (in NCAA tournament and College Football Playoff games); both are null otherwise. Opponents from outside Division I have a team_id and name, but the teams endpoint does not list them.

  • home_score, away_score Live values: Premium

    Current or final score (points); null before the game starts. While a game is in progress, the free plan sees This field is for premium subscribers only.

  • period_scores Live values: Premium

    Score per quarter (half in men's college basketball) for home and away, with each overtime period. While a game is in progress, the free plan sees This field is for premium subscribers only.

  • decided_in

    For final games: regulation or overtime.

  • winner

    team_id of the winner once the game is final; null before that.

  • venue

    Where the game is played: name, city, state and country (ISO 3166-1 alpha-2).

  • neutral_site

    true when neither team is at home, e.g. international games and most college tournament games.

  • original_date

    For a game moved to another date: the date it was first scheduled for. Otherwise null.

  • updated_at

    When any field of the game last changed (UTC).

Live Demo

Live demo · no API key required
Query parameters
league
date
team
season
season_type
status
game_id
limit
offset

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/basketballgames?league=nba
Sample response
[
{
"game_id": "nba-20261022-cle-phi",
"league": "nba",
"sport": "basketball",
"season": 2026,
"season_label": "2026-27",
"season_type": "regular",
"date": "2026-10-22",
"start_time": "2026-10-22T23:00:00Z",
"status": "final",
"status_detail": null,
"period": 4,
"clock": null,
"home_team": {
"team_id": "nba-phi",
"name": "Philadelphia 76ers",
"abbreviation": "PHI"
},
"away_team": {
"team_id": "nba-cle",
"name": "Cleveland Cavaliers",
"abbreviation": "CLE"
},
"home_score": 114,
"away_score": 106,
"period_scores": {
"home": [
18,
27,
37,
32
],
"away": [
35,
34,
21,
16
]
},
"decided_in": "regulation",
"winner": "nba-phi",
"venue": {
"name": "Xfinity Mobile Arena",
"city": "Philadelphia",
"state": "PA",
"country": "US"
},
"neutral_site": false,
"original_date": null,
"updated_at": "2026-10-23T03:14:02Z"
}
]

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; college tables come conference by conference. For college, poll returns a weekly poll instead: the AP Top 25 or the Coaches Poll. 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

  • league  required

    nba, wnba, ncaab or ncaaw.

  • season  optional

    Season, as the year it starts. Defaults to the current season.

  • conference  optional

    Only this conference, e.g. Eastern.

  • division  optional

    Only this division, e.g. Atlantic (NBA).

  • poll  optional

    College: return this poll instead of the table: ap or coaches.

  • week  optional

    With poll: the poll of this week of the season, or final for the final poll. Defaults to the latest.

Headers

  • X-Api-Key  required

    API 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_label

    League, sport and season of the table.

  • team

    team_id, name and abbreviation, named as they were that season.

  • conference, division

    Conference (Eastern or Western) and, in the NBA, division (e.g. Atlantic). College: the conference that season, e.g. ACC or Big East.

  • games_played, wins, losses

    Record.

  • win_pct, games_behind

    Winning percentage and games behind the leader (division leader in the NBA, conference leader in the WNBA and in college).

  • points_for, points_against, point_differential

    Points scored and allowed, and the difference.

  • streak

    Current streak, e.g. W2 or L1.

  • home_record, away_record

    Home and road records, e.g. 4-1.

  • division_record, conference_record

    Records against division (NBA) and conference opponents.

  • conference_win_pct

    College: winning percentage in conference games.

  • last_10

    Record over the last 10 games.

  • league_rank, conference_rank, division_rank

    Rank in the league, conference and division (NBA); conference_rank is the playoff seed in the NBA and the conference position in the WNBA. College tables have no league_rank: rows come conference by conference, and conference_rank is the position in the conference by conference record, then overall record (teams level on both share a position).

  • final

    true once the regular season is over and the table no longer changes.

  • poll, poll_name, week, final, date

    College, with poll: which poll (e.g. ap, AP Top 25), its week (null and final: true for the final poll after the postseason) and its release date.

  • rank, team, previous_rank, points, first_place_votes

    College, with poll: one row per ranked team, with last week's rank, voting points and first-place votes.

Live Demo

Live demo · no API key required
Query parameters
league
season
conference
division
poll
week

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/basketballstandings?league=nba
Sample response
[
{
"league": "nba",
"sport": "basketball",
"season": 2026,
"season_label": "2026-27",
"team": {
"team_id": "nba-okc",
"name": "Oklahoma City Thunder",
"abbreviation": "OKC"
},
"conference": "Western",
"division": "Northwest",
"games_played": 4,
"wins": 4,
"losses": 0,
"win_pct": 1,
"games_behind": 0,
"points_for": 445,
"points_against": 403,
"point_differential": 42,
"streak": "W4",
"home_record": "3-0",
"away_record": "1-0",
"division_record": "1-0",
"conference_record": "4-0",
"last_10": "4-0",
"league_rank": 1,
"conference_rank": 2,
"division_rank": 1,
"final": false
}
]

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

  • league  optional

    Only this league: nba, wnba, ncaab or ncaaw. Without it, every team of the sport is listed except college teams, which need league=ncaab or ncaaw.

  • team  optional

    Team id, abbreviation or name (e.g. BOS): return one team.

  • conference  optional

    Only teams in this conference (college: the short or full name, e.g. SEC or Southeastern).

  • division  optional

    Only teams in this division.

  • active  optional

    false lists former teams that appear in past seasons.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/basketballteams endpoint returns a JSON array of teams, or an error.

  • team_id

    Unique id, e.g. nba-bos, wnba-lva, ncaab-duke or ncaaw-uconn. Each league has its own ids, so a school's men's and women's teams differ (ncaab-ucla, ncaaw-ucla). Use it, the abbreviation or the name in other endpoints.

  • league

    The team's league.

  • sport

    Always basketball.

  • abbreviation, name, city

    Identity of the team.

  • nickname, conference, division

    Nickname, current conference and division.

  • school, state

    College: the school's name as used in schedules (e.g. Texas A&M) and the state of its home venue.

  • venue

    Home venue: name, city, state, country.

  • active

    false for teams that have since moved, such as the New Jersey Nets, and for schools that have left Division I, such as Hartford, which still appear in past seasons.

Live Demo

Live demo · no API key required
Query parameters
league
team
conference
division
active

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/basketballteams?league=nba
Sample response
[
{
"team_id": "nba-bos",
"league": "nba",
"sport": "basketball",
"abbreviation": "BOS",
"name": "Boston Celtics",
"nickname": "Celtics",
"city": "Boston",
"conference": "Eastern",
"division": "Atlantic",
"venue": {
"name": "TD Garden",
"city": "Boston",
"state": "MA",
"country": "US"
},
"active": true
}
]

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.

  • league  optional

    nba, wnba, ncaab or ncaaw.

  • team  optional

    Team id, abbreviation or name: that team's current roster.

  • name  optional

    Full or partial player name. Case and accents are ignored.

  • player_id  optional

    Return one player.

  • position  optional

    Only this position, e.g. G.

  • limit  optional Premium only

    Players per page (1-500). Default 50.

  • offset  optional

    Players to skip, for paging. Default 0.

Headers

  • X-Api-Key  required

    API 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_id

    Unique id, e.g. nba-p-8f12176c56. It stays the same when a player changes teams.

  • league

    League of the player's current roster.

  • team

    Current team: team_id, name and abbreviation; null for a player whose roster_status is not_on_roster.

  • name, first_name, last_name

    Player name.

  • position, jersey_number

    Position abbreviation and jersey number.

  • height_in, height_cm, weight_lb, weight_kg

    Height and weight.

  • birth_date, birth_place

    Date of birth and birthplace (city, state, country).

  • roster_status

    active, suspended or not_on_roster.

  • college, experience_years

    Professional leagues: college and years of professional experience, where they apply.

  • class_year

    College: freshman, sophomore, junior, senior or graduate (a redshirt year keeps its class).

Live Demo

Live demo · no API key required
Query parameters
league
team
name
player_id
position
limit
offset

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/basketballplayers?league=nba&team=BOS
Sample response
[
{
"player_id": "nba-p-8f12176c56",
"league": "nba",
"team": {
"team_id": "nba-bos",
"name": "Boston Celtics",
"abbreviation": "BOS"
},
"name": "Jayson Tatum",
"first_name": "Jayson",
"last_name": "Tatum",
"position": "F",
"jersey_number": "0",
"height_in": 80,
"height_cm": 203,
"weight_lb": 224,
"weight_kg": 102,
"birth_date": "1998-03-03",
"birth_place": {
"city": "Saint Louis",
"state": "MO",
"country": "US"
},
"roster_status": "active",
"college": "Duke",
"experience_years": 10
}
]

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

  • 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.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • 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.
  • 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.
  • 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.
  • The NBA (league=nba), the WNBA (league=wnba), and Division I men's and women's college basketball (league=ncaab and league=ncaaw), with the same endpoints. League guides: NBA API, WNBA API, College Basketball API and Women's College Basketball API.
  • Call /v1/basketballteams for the NBA and WNBA teams, or add league=ncaab or league=ncaaw for the college teams of one league. Each team has its league, conference, division (NBA) and home venue.
  • period_scores adds one entry per overtime period after the four quarters, period continues counting (5 for the first overtime), and final games have decided_in=overtime.
  • 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.

API Ninjas is not affiliated with or endorsed by the NFL, the NBA, the NHL, the NCAA or any other league, conference, competition, school or team. League, competition and team names are trademarks of their owners and are used only to identify them.