API-Basketball

App · Sports · 18 actions

Follow basketball with API-Basketball: games and live scores by quarter, standings, team season statistics, rosters, team and player box scores, head-to-head records and bookmakers' pre-match odds, for the NBA, its G League and more than 400 leagues and cups. Needs an API-SPORTS key; the free plan allows 100 requests a day.

Actions

ActionWhat it does
Find leagues and cupsFind basketball competitions by name, country, season or type, each with its ID, logo, country and every season on file: its name, dates, and whether box scores, standings, rosters and odds are available.
Find playersFind players by name or ID, or list a team's roster for a season, each with their jersey number, position, country and age.
Find teamsFind teams by name, by league and season, by country or by ID, each with its logo and country.
Get a gameGet one game by ID: its venue, status, the clock, and both sides' points by quarter and in overtime, live while it is being played.
Get account statusSee the connected key's API-Basketball plan, when it renews, and how many of today's requests are used and left.
Get player box scoresGet every player's box score for a game, or one player's for every game of a season: starter or bench, minutes, field goals, three-pointers and free throws, rebounds, assists and points.
Get pre-match oddsGet bookmakers' pre-match odds for a game, or for a league's games in a season, optionally from one bookmaker or for one bet type.
Get standingsGet a season's tables, such as the NBA's two conferences and six divisions: each team's place, games played, won and lost with its win percentage, and points scored and allowed.
Get team box scoresGet each side's box score for a game: field goals, three-pointers and free throws made and attempted, rebounds, assists, steals, blocks, turnovers and fouls.
Get team statisticsGet a team's season in one competition: games played, won, drawn and lost at home, away and in all, with win percentages, and points scored and allowed in total and per game.
List bet typesList the kinds of bet API-Basketball has odds for, such as Home/Away or Over/Under, with the IDs the odds filter takes.
List bookmakersList the bookmakers API-Basketball has odds from, with the IDs the odds filter takes.
List countriesList the countries and regions that have basketball competitions in API-Basketball, each with its ID, code and flag.
List gamesList games and results by day, by league and season, or by team, live ones included, each with its venue, status, the clock, and both sides' points by quarter and in overtime.
List head-to-head gamesList the games two teams have played each other, in every season or only one league, season or day, with a count of each side's wins and points across the finished ones.
List seasonsList the seasons API-Basketball has data for, as the Season fields take them: years such as 2024 for leagues played within one, and spans such as 2023-2024 for leagues like the NBA.
List standings groupsList the tables a competition's season has, such as the NBA's conferences and divisions, by the names Get standings takes as its Group.
List standings stagesList the stages of a competition's season, such as the NBA's regular season, by the names Get standings takes as its Stage.

Find leagues and cups

Find basketball competitions by name, country, season or type, each with its ID, logo, country and every season on file: its name, dates, and whether box scores, standings, rosters and odds are available. With no filter it lists all of them.

Inputs

Leagueleague_idtext
Optional. Only this competition. Pick one from the list, or pass a league ID such as 12 for the NBA.
Searchsearchtext
Optional. Only names containing this, at least 3 characters.
Countrycountrytext
Optional. Only this country, by name as the list gives it, such as USA or Spain.
Seasonseasontext
Optional. Only this season, as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024. The free plan reads seasons starting in 2022 to 2024.
Typeleague_typetext
Optional. Only leagues, or only cups.One of: league, cup.

Outputs

countnumber
How many came back.
leagueslist
The competitions.
Example output
{
  "count": 1,
  "leagues": [
    {
      "country": {
        "code": "US",
        "flag": "https://media.api-sports.io/flags/us.svg",
        "id": 5,
        "name": "USA"
      },
      "id": 12,
      "logo": "https://media.api-sports.io/basketball/leagues/12.png",
      "name": "NBA",
      "seasons": [
        {
          "coverage": {
            "odds": false,
            "player_statistics": true,
            "players": true,
            "standings": true,
            "team_statistics": true
          },
          "end": "2026-06-14",
          "season": "2025-2026",
          "start": "2025-10-02"
        },
        {
          "coverage": {
            "odds": false,
            "player_statistics": false,
            "players": false,
            "standings": true,
            "team_statistics": false
          },
          "end": "2027-04-04",
          "season": "2026-2027",
          "start": "2026-10-03"
        }
      ],
      "type": "League"
    }
  ]
}

Find players

Find players by name or ID, or list a team's roster for a season, each with their jersey number, position, country and age.

Inputs

Player IDplayer_idtext
Optional. Only this player, by ID, such as 526.
Team IDteam_idtext
Optional. Only this team, by ID, such as 133 for the Boston Celtics.
Seasonseasontext
Optional. Only this season, as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024. The free plan reads seasons starting in 2022 to 2024.
Searchsearchtext
Optional. Only names containing this, at least 3 characters.

Outputs

countnumber
How many came back.
playerslist
The players.
Example output
{
  "count": 1,
  "players": [
    {
      "age": 24,
      "country": "Canada",
      "id": 948,
      "name": "Banton Dalano",
      "number": 5,
      "position": "Guard"
    }
  ]
}

Find teams

Find teams by name, by league and season, by country or by ID, each with its logo and country. A league's teams can include its All-Star sides, such as the NBA's East and West.

Inputs

Team IDteam_idtext
Optional. Only this team, by ID, such as 133 for the Boston Celtics.
Searchsearchtext
Optional. Only names containing this, at least 3 characters.
Leagueleague_idtext
Optional. Only this competition. Pick one from the list, or pass a league ID such as 12 for the NBA.
Seasonseasontext
Optional. Only this season, as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024. The free plan reads seasons starting in 2022 to 2024.
Countrycountrytext
Optional. Only this country, by name as the list gives it, such as USA or Spain.

Outputs

countnumber
How many came back.
teamslist
The teams.
Example output
{
  "count": 1,
  "teams": [
    {
      "country": {
        "code": "US",
        "flag": "https://media.api-sports.io/flags/us.svg",
        "id": 5,
        "name": "USA"
      },
      "id": 133,
      "logo": "https://media.api-sports.io/basketball/teams/133.png",
      "name": "Boston Celtics",
      "national": false
    }
  ]
}

Get a game

Get one game by ID: its venue, status, the clock, and both sides' points by quarter and in overtime, live while it is being played.

Inputs

Game IDgame_idtextRequired
The game's ID, such as 372191. List games returns them.
Time zonetimezonetext
Optional. Give dates and times in this time zone, such as America/New_York or Europe/Madrid. UTC when left empty.

Outputs

countryobject
A country, or a region such as World or Europe.
datetext
When it starts, with the time zone's offset (ISO 8601).
idnumber
The game's ID.
leagueobject
The competition, and the season this is from.
scoresobject
Both sides' scores.
stagetext
The stage, when the API names one.
statusobject
Where the game stands.
teamsobject
Both sides.
timetext
Its start time, HH:MM, in that time zone.
timestampnumber
When it starts, as a Unix timestamp.
timezonetext
The time zone date and time are given in.
venuetext
Where it is played.
weektext
The week or round, when the API names one.
Example output
{
  "country": {
    "code": "US",
    "flag": "https://media.api-sports.io/flags/us.svg",
    "id": 5,
    "name": "USA"
  },
  "date": "2023-10-08T22:00:00+00:00",
  "id": 372191,
  "league": {
    "id": 12,
    "logo": "https://media.api-sports.io/basketball/leagues/12.png",
    "name": "NBA",
    "season": "2023-2024",
    "type": "League"
  },
  "scores": {
    "away": {
      "over_time": null,
      "quarters": [
        29,
        28,
        23,
        26
      ],
      "total": 106
    },
    "home": {
      "over_time": null,
      "quarters": [
        20,
        39,
        22,
        33
      ],
      "total": 114
    }
  },
  "stage": null,
  "status": {
    "long": "Game Finished",
    "short": "FT",
    "timer": null
  },
  "teams": {
    "away": {
      "id": 154,
      "logo": "https://media.api-sports.io/basketball/teams/154.png",
      "name": "Philadelphia 76ers"
    },
    "home": {
      "id": 133,
      "logo": "https://media.api-sports.io/basketball/teams/133.png",
      "name": "Boston Celtics"
    }
  },
  "time": "22:00",
  "timestamp": 1696802400,
  "timezone": "UTC",
  "venue": "TD Garden",
  "week": null
}

Get account status

See the connected key's API-Basketball plan, when it renews, and how many of today's requests are used and left. It is free: it never counts against the day.

Inputs

None.

Outputs

activetrue/false
True while the subscription is active.
daily_limitnumber
Requests allowed a day.
plantext
The plan, such as Free.
requests_remainingnumber
Requests left today; the day starts at midnight UTC.
requests_todaynumber
Requests used today.
subscription_endtext
When the plan renews or ends.
Example output
{
  "active": true,
  "daily_limit": 100,
  "plan": "Free",
  "requests_remaining": 88,
  "requests_today": 12,
  "subscription_end": "2027-10-01T00:00:00+00:00"
}

Get player box scores

Get every player's box score for a game, or one player's for every game of a season: starter or bench, minutes, field goals, three-pointers and free throws, rebounds, assists and points.

Inputs

Game IDgame_idtext
Optional. Every player's box score for this game. Set this, or a player and a season.
Player IDplayer_idtext
Optional. This player's box score for every game of the season below. Find players gives player IDs.
Seasonseasontext
Optional. Only this season, as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024. The free plan reads seasons starting in 2022 to 2024.

Outputs

countnumber
How many came back.
playerslist
Each box score, a player in a game.
Example output
{
  "count": 2,
  "players": [
    {
      "assists": 5,
      "field_goals": {
        "attempts": 0,
        "percentage": null,
        "total": 0
      },
      "freethrows_goals": {
        "attempts": 9,
        "percentage": null,
        "total": 7
      },
      "game_id": 372191,
      "minutes": "26:44",
      "player": {
        "id": 526,
        "name": "Tatum Jayson"
      },
      "points": 13,
      "rebounds": {
        "total": 10
      },
      "team": {
        "id": 133
      },
      "threepoint_goals": {
        "attempts": 4,
        "percentage": null,
        "total": 0
      },
      "type": "starters"
    },
    {
      "assists": 1,
      "field_goals": {
        "attempts": 0,
        "percentage": null,
        "total": 0
      },
      "freethrows_goals": {
        "attempts": 8,
        "percentage": null,
        "total": 5
      },
      "game_id": 372191,
      "minutes": "24:35",
      "player": {
        "id": 525,
        "name": "Porzingis Kristaps"
      },
      "points": 17,
      "rebounds": {
        "total": 5
      },
      "team": {
        "id": 133
      },
      "threepoint_goals": {
        "attempts": 3,
        "percentage": null,
        "total": 2
      },
      "type": "starters"
    }
  ]
}

Get pre-match odds

Get bookmakers' pre-match odds for a game, or for a league's games in a season, optionally from one bookmaker or for one bet type. Odds appear 1 to 7 days before a game, are updated once a day and are kept for 7 days after it.

Inputs

Game IDgame_idtext
Optional. Only this game's odds. Set this, or a league and a season.
Leagueleague_idtext
Optional. Only this competition. Pick one from the list, or pass a league ID such as 12 for the NBA.
Seasonseasontext
Optional. Only this season, as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024. The free plan reads seasons starting in 2022 to 2024.
Bookmakerbookmaker_idtext
Optional. Only this bookmaker's odds. Pick one from the list.
Bet typebet_idtext
Optional. Only this kind of bet, such as Home/Away. Pick one from the list.

Outputs

countnumber
How many came back.
oddslist
Each game's odds.
Example output
{
  "count": 1,
  "odds": [
    {
      "bookmakers": [
        {
          "bets": [
            {
              "id": 2,
              "name": "Home/Away",
              "values": [
                {
                  "odd": 2.75,
                  "value": "Home"
                },
                {
                  "odd": 1.45,
                  "value": "Away"
                }
              ]
            }
          ],
          "id": 4,
          "name": "Bet365"
        }
      ],
      "country": {
        "code": "AU",
        "flag": "https://media.api-sports.io/flags/au.svg",
        "id": 1,
        "name": "Australia"
      },
      "game": {
        "country": {
          "code": "AU",
          "flag": "https://media.api-sports.io/flags/au.svg",
          "id": 1,
          "name": "Australia"
        },
        "date": "2026-10-02T09:30:00+00:00",
        "id": 501192,
        "league": {
          "id": 1,
          "logo": "https://media.api-sports.io/basketball/leagues/1.png",
          "name": "NBL",
          "season": "2026-2027",
          "type": "League"
        },
        "scores": {
          "away": {
            "over_time": null,
            "quarters": [
              null,
              null,
              null,
              null
            ],
            "total": null
          },
          "home": {
            "over_time": null,
            "quarters": [
              null,
              null,
              null,
              null
            ],
            "total": null
          }
        },
        "stage": null,
        "status": {
          "long": "Not Started",
          "short": "NS",
          "timer": null
        },
        "teams": {
          "away": {
            "id": 8,
            "logo": "https://media.api-sports.io/basketball/teams/8.png",
            "name": "Adelaide"
          },
          "home": {
            "id": 6,
            "logo": "https://media.api-sports.io/basketball/teams/6.png",
            "name": "Illawarra Hawks"
          }
        },
        "time": "09:30",
        "timestamp": 1790933400,
        "timezone": "UTC",
        "venue": "WIN Entertainment Centre",
        "week": "3"
      },
      "league": {
        "id": 1,
        "logo": "https://media.api-sports.io/basketball/leagues/1.png",
        "name": "NBL",
        "season": "2026-2027",
        "type": "League"
      }
    }
  ]
}

Get standings

Get a season's tables, such as the NBA's two conferences and six divisions: each team's place, games played, won and lost with its win percentage, and points scored and allowed. Narrow to one team, stage or group.

Inputs

Leagueleague_idtextRequired
The competition, such as 12 for the NBA. Pick one from the list, or pass a league ID from an earlier step.
SeasonseasontextRequired
The season as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024 for a league played within one. Find leagues lists each league's seasons. The free plan reads seasons starting in 2022 to 2024.
Team IDteam_idtext
Optional. Only this team's line in each table it is in.
Stagestagetext
Optional. Only this stage, by name. List standings stages gives a season's stages.
Groupgrouptext
Optional. Only this table, by name, such as Eastern Conference. List standings groups gives a season's groups.

Outputs

countnumber
How many came back.
standingslist
The tables, in order.
Example output
{
  "count": 1,
  "standings": [
    {
      "country": {
        "code": "US",
        "flag": "https://media.api-sports.io/flags/us.svg",
        "id": 5,
        "name": "USA"
      },
      "group": "Atlantic",
      "league": {
        "id": 12,
        "logo": "https://media.api-sports.io/basketball/leagues/12.png",
        "name": "NBA",
        "season": "2023-2024",
        "type": "League"
      },
      "stage": "NBA - Regular Season",
      "table": [
        {
          "description": "Promotion - NBA (Play Offs: 1/8-finals)",
          "form": null,
          "games": {
            "losses": {
              "percentage": 0.22,
              "total": 18
            },
            "played": 82,
            "wins": {
              "percentage": 0.78,
              "total": 64
            }
          },
          "points": {
            "against": 8957,
            "for": 9887
          },
          "position": 1,
          "team": {
            "id": 133,
            "logo": "https://media.api-sports.io/basketball/teams/133.png",
            "name": "Boston Celtics"
          }
        },
        {
          "description": "Promotion - NBA (Play Offs: 1/8-finals)",
          "form": null,
          "games": {
            "losses": {
              "percentage": 0.39,
              "total": 32
            },
            "played": 82,
            "wins": {
              "percentage": 0.61,
              "total": 50
            }
          },
          "points": {
            "against": 8873,
            "for": 9249
          },
          "position": 2,
          "team": {
            "id": 151,
            "logo": "https://media.api-sports.io/basketball/teams/151.png",
            "name": "New York Knicks"
          }
        }
      ]
    }
  ]
}

Get team box scores

Get each side's box score for a game: field goals, three-pointers and free throws made and attempted, rebounds, assists, steals, blocks, turnovers and fouls. Updated every 30 to 120 seconds during a game.

Inputs

Game IDgame_idtextRequired
The game's ID, such as 372191. List games returns them.

Outputs

countnumber
How many came back.
game_idnumber
The game asked about.
teamslist
Each side's box score.
Example output
{
  "count": 2,
  "game_id": 372191,
  "teams": [
    {
      "assists": 19,
      "blocks": 6,
      "field_goals": {
        "attempts": 85,
        "percentage": 43,
        "total": 37
      },
      "freethrows_goals": {
        "attempts": 34,
        "percentage": 76,
        "total": 26
      },
      "game_id": 372191,
      "personal_fouls": 21,
      "rebounds": {
        "defense": 37,
        "offence": 12,
        "total": 49
      },
      "steals": 8,
      "team": {
        "id": 133
      },
      "threepoint_goals": {
        "attempts": 38,
        "percentage": 36,
        "total": 14
      },
      "turnovers": 16
    },
    {
      "assists": 19,
      "blocks": 6,
      "field_goals": {
        "attempts": 95,
        "percentage": 41,
        "total": 38
      },
      "freethrows_goals": {
        "attempts": 19,
        "percentage": 78,
        "total": 15
      },
      "game_id": 372191,
      "personal_fouls": 24,
      "rebounds": {
        "defense": 34,
        "offence": 14,
        "total": 48
      },
      "steals": 10,
      "team": {
        "id": 154
      },
      "threepoint_goals": {
        "attempts": 38,
        "percentage": 34,
        "total": 13
      },
      "turnovers": 14
    }
  ]
}

Get team statistics

Get a team's season in one competition: games played, won, drawn and lost at home, away and in all, with win percentages, and points scored and allowed in total and per game.

Inputs

Leagueleague_idtextRequired
The competition, such as 12 for the NBA. Pick one from the list, or pass a league ID from an earlier step.
SeasonseasontextRequired
The season as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024 for a league played within one. Find leagues lists each league's seasons. The free plan reads seasons starting in 2022 to 2024.
Team IDteam_idtextRequired
The team's ID, such as 133 for the Boston Celtics. Find teams looks one up. A team's ID is the same in every competition.
Up to dateon_datedate
Optional. Count only games up to this day. The free plan takes only yesterday, today or tomorrow.

Outputs

countryobject
A country, or a region such as World or Europe.
gamesobject
The team's record.
leagueobject
The competition, and the season this is from.
pointsobject
Points scored and allowed.
teamobject
A team.
Example output
{
  "country": {
    "code": "US",
    "flag": "https://media.api-sports.io/flags/us.svg",
    "id": 5,
    "name": "USA"
  },
  "games": {
    "draws": {
      "all": {
        "percentage": 0.0,
        "total": 0
      },
      "away": {
        "percentage": 0.0,
        "total": 0
      },
      "home": {
        "percentage": 0.0,
        "total": 0
      }
    },
    "losses": {
      "all": {
        "percentage": 0.2,
        "total": 21
      },
      "away": {
        "percentage": 0.294,
        "total": 15
      },
      "home": {
        "percentage": 0.111,
        "total": 6
      }
    },
    "played": {
      "all": 105,
      "away": 51,
      "home": 54
    },
    "wins": {
      "all": {
        "percentage": 0.8,
        "total": 84
      },
      "away": {
        "percentage": 0.706,
        "total": 36
      },
      "home": {
        "percentage": 0.889,
        "total": 48
      }
    }
  },
  "league": {
    "id": 12,
    "logo": "https://media.api-sports.io/basketball/leagues/12.png",
    "name": "NBA",
    "season": "2023-2024",
    "type": "League"
  },
  "points": {
    "against": {
      "average": {
        "all": 107.4,
        "away": 108.3,
        "home": 106.6
      },
      "total": {
        "all": 11279,
        "away": 5525,
        "home": 5754
      }
    },
    "for": {
      "average": {
        "all": 118.3,
        "away": 115.7,
        "home": 120.8
      },
      "total": {
        "all": 12425,
        "away": 5902,
        "home": 6523
      }
    }
  },
  "team": {
    "id": 133,
    "logo": "https://media.api-sports.io/basketball/teams/133.png",
    "name": "Boston Celtics"
  }
}

List bet types

List the kinds of bet API-Basketball has odds for, such as Home/Away or Over/Under, with the IDs the odds filter takes.

Inputs

Searchsearchtext
Optional. Only names containing this, at least 3 characters.

Outputs

betslist
The bet types.
countnumber
How many came back.
Example output
{
  "bets": [
    {
      "id": 1,
      "name": "3Way Result"
    },
    {
      "id": 2,
      "name": "Home/Away"
    }
  ],
  "count": 2
}

List bookmakers

List the bookmakers API-Basketball has odds from, with the IDs the odds filter takes. These IDs are API-Basketball's own: the same bookmaker can have another ID in another API-SPORTS API.

Inputs

Searchsearchtext
Optional. Only names containing this, at least 3 characters.

Outputs

bookmakerslist
The bookmakers.
countnumber
How many came back.
Example output
{
  "bookmakers": [
    {
      "id": 1,
      "name": "Bwin"
    },
    {
      "id": 2,
      "name": "Marathon Bet"
    }
  ],
  "count": 2
}

List countries

List the countries and regions that have basketball competitions in API-Basketball, each with its ID, code and flag. The names are what the Country filters take.

Inputs

Searchsearchtext
Optional. Only names containing this, at least 3 characters.
Country codecodetext
Optional. Only the country with this two-letter code, such as US, ES or AU.

Outputs

countnumber
How many came back.
countrieslist
The countries.
Example output
{
  "count": 1,
  "countries": [
    {
      "code": "US",
      "flag": "https://media.api-sports.io/flags/us.svg",
      "id": 5,
      "name": "USA"
    }
  ]
}

List games

List games and results by day, by league and season, or by team, live ones included, each with its venue, status, the clock, and both sides' points by quarter and in overtime. Scores update every 15 seconds during a game.

Inputs

Dateon_datedate
Optional. Only games on this day, in the time zone chosen below. The free plan takes only yesterday, today or tomorrow.
Leagueleague_idtext
Optional. Only this competition. Pick one from the list, or pass a league ID such as 12 for the NBA.
Seasonseasontext
Optional. Only this season, as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024. The free plan reads seasons starting in 2022 to 2024.
Team IDteam_idtext
Optional. Only this team, by ID, such as 133 for the Boston Celtics.
Time zonetimezonetext
Optional. Give dates and times in this time zone, such as America/New_York or Europe/Madrid. UTC when left empty.

Outputs

countnumber
How many came back.
gameslist
The games, in the order given.
Example output
{
  "count": 1,
  "games": [
    {
      "country": {
        "code": "US",
        "flag": "https://media.api-sports.io/flags/us.svg",
        "id": 5,
        "name": "USA"
      },
      "date": "2023-10-08T22:00:00+00:00",
      "id": 372191,
      "league": {
        "id": 12,
        "logo": "https://media.api-sports.io/basketball/leagues/12.png",
        "name": "NBA",
        "season": "2023-2024",
        "type": "League"
      },
      "scores": {
        "away": {
          "over_time": null,
          "quarters": [
            29,
            28,
            23,
            26
          ],
          "total": 106
        },
        "home": {
          "over_time": null,
          "quarters": [
            20,
            39,
            22,
            33
          ],
          "total": 114
        }
      },
      "stage": null,
      "status": {
        "long": "Game Finished",
        "short": "FT",
        "timer": null
      },
      "teams": {
        "away": {
          "id": 154,
          "logo": "https://media.api-sports.io/basketball/teams/154.png",
          "name": "Philadelphia 76ers"
        },
        "home": {
          "id": 133,
          "logo": "https://media.api-sports.io/basketball/teams/133.png",
          "name": "Boston Celtics"
        }
      },
      "time": "22:00",
      "timestamp": 1696802400,
      "timezone": "UTC",
      "venue": "TD Garden",
      "week": null
    }
  ]
}

List head-to-head games

List the games two teams have played each other, in every season or only one league, season or day, with a count of each side's wins and points across the finished ones.

Inputs

First team IDfirst_team_idtextRequired
One of the two teams, by ID, such as 133 for the Boston Celtics. The summary counts its wins first.
Second team IDsecond_team_idtextRequired
The other team, by ID, such as 151 for the New York Knicks.
Leagueleague_idtext
Optional. Only this competition. Pick one from the list, or pass a league ID such as 12 for the NBA.
Seasonseasontext
Optional. Only this season, as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024. The free plan reads seasons starting in 2022 to 2024.
Dateon_datedate
Optional. Only games on this day, in the time zone chosen below. The free plan takes only yesterday, today or tomorrow.
Time zonetimezonetext
Optional. Give dates and times in this time zone, such as America/New_York or Europe/Madrid. UTC when left empty.

Outputs

countnumber
How many came back.
gameslist
Their games.
summaryobject
A count of the finished games among them.
Example output
{
  "count": 2,
  "games": [
    {
      "country": {
        "code": "US",
        "flag": "https://media.api-sports.io/flags/us.svg",
        "id": 5,
        "name": "USA"
      },
      "date": "2023-10-09T23:30:00+00:00",
      "id": 372195,
      "league": {
        "id": 12,
        "logo": "https://media.api-sports.io/basketball/leagues/12.png",
        "name": "NBA",
        "season": "2023-2024",
        "type": "League"
      },
      "scores": {
        "away": {
          "over_time": null,
          "quarters": [
            29,
            22,
            34,
            22
          ],
          "total": 107
        },
        "home": {
          "over_time": null,
          "quarters": [
            28,
            29,
            34,
            23
          ],
          "total": 114
        }
      },
      "stage": null,
      "status": {
        "long": "Game Finished",
        "short": "FT",
        "timer": null
      },
      "teams": {
        "away": {
          "id": 133,
          "logo": "https://media.api-sports.io/basketball/teams/133.png",
          "name": "Boston Celtics"
        },
        "home": {
          "id": 151,
          "logo": "https://media.api-sports.io/basketball/teams/151.png",
          "name": "New York Knicks"
        }
      },
      "time": "23:30",
      "timestamp": 1696894200,
      "timezone": "UTC",
      "venue": "Madison Square Garden",
      "week": null
    },
    {
      "country": {
        "code": "US",
        "flag": "https://media.api-sports.io/flags/us.svg",
        "id": 5,
        "name": "USA"
      },
      "date": "2023-10-17T23:30:00+00:00",
      "id": 372229,
      "league": {
        "id": 12,
        "logo": "https://media.api-sports.io/basketball/leagues/12.png",
        "name": "NBA",
        "season": "2023-2024",
        "type": "League"
      },
      "scores": {
        "away": {
          "over_time": null,
          "quarters": [
            30,
            30,
            28,
            22
          ],
          "total": 110
        },
        "home": {
          "over_time": null,
          "quarters": [
            41,
            37,
            22,
            23
          ],
          "total": 123
        }
      },
      "stage": null,
      "status": {
        "long": "Game Finished",
        "short": "FT",
        "timer": null
      },
      "teams": {
        "away": {
          "id": 151,
          "logo": "https://media.api-sports.io/basketball/teams/151.png",
          "name": "New York Knicks"
        },
        "home": {
          "id": 133,
          "logo": "https://media.api-sports.io/basketball/teams/133.png",
          "name": "Boston Celtics"
        }
      },
      "time": "23:30",
      "timestamp": 1697585400,
      "timezone": "UTC",
      "venue": "TD Garden",
      "week": null
    }
  ],
  "summary": {
    "draws": 0,
    "first_team_points": 230,
    "first_team_wins": 1,
    "played": 2,
    "second_team_points": 224,
    "second_team_wins": 1
  }
}

List seasons

List the seasons API-Basketball has data for, as the Season fields take them: years such as 2024 for leagues played within one, and spans such as 2023-2024 for leagues like the NBA.

Inputs

None.

Outputs

countnumber
How many came back.
seasonslist
The seasons, in order.
Example output
{
  "count": 6,
  "seasons": [
    "2025-2026",
    "2026",
    "2026-2027",
    "2027",
    "2028",
    "2029"
  ]
}

List standings groups

List the tables a competition's season has, such as the NBA's conferences and divisions, by the names Get standings takes as its Group.

Inputs

Leagueleague_idtextRequired
The competition, such as 12 for the NBA. Pick one from the list, or pass a league ID from an earlier step.
SeasonseasontextRequired
The season as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024 for a league played within one. Find leagues lists each league's seasons. The free plan reads seasons starting in 2022 to 2024.

Outputs

countnumber
How many came back.
groupslist
The groups, by name.
Example output
{
  "count": 8,
  "groups": [
    "Western Conference",
    "Eastern Conference",
    "Atlantic",
    "Southeast",
    "Central",
    "Northwest",
    "Pacific",
    "Southwest"
  ]
}

List standings stages

List the stages of a competition's season, such as the NBA's regular season, by the names Get standings takes as its Stage.

Inputs

Leagueleague_idtextRequired
The competition, such as 12 for the NBA. Pick one from the list, or pass a league ID from an earlier step.
SeasonseasontextRequired
The season as the league names it: a span such as 2023-2024 for the NBA, or a year such as 2024 for a league played within one. Find leagues lists each league's seasons. The free plan reads seasons starting in 2022 to 2024.

Outputs

countnumber
How many came back.
stageslist
The stages, by name.
Example output
{
  "count": 1,
  "stages": [
    "NBA - Regular Season"
  ]
}

On this page