NBA API - Basketball Statistics avatar

NBA API - Basketball Statistics

Pricing

from $0.01 / 1,000 results

Go to Apify Store
NBA API - Basketball Statistics

NBA API - Basketball Statistics

Fetch comprehensive NBA basketball data including teams, players, standings, schedules, game statistics, fantasy projections, & betting odds. 30 NBA Teams, Rosters, Team Statistics, League Standings, Player Statistics, Game Statistics, Schedule, League Leaders, Fantasy Projections, Betting Odds

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

The Howlers

The Howlers

Maintained by Community

Actor stats

0

Bookmarked

31

Total users

0

Monthly active users

8 days ago

Last modified

Security

Limited permissions

Share

NBA API

Live NBA basketball data from ESPN's public data feeds: teams, rosters, team and player stats, conference standings, box scores, schedules and scores, league leaders, fantasy projections, betting odds and the injury report. No API key needed.

Each run executes one task and returns one dataset item with the result in data.


Quick start

{
"task": "teams"
}

More examples:

{ "task": "standings" }
{ "task": "team_roster", "team": "LAL" }
{ "task": "team_stats", "team": "BOS", "season": 2025 }
{ "task": "player_stats", "playerName": "Stephen Curry" }
{ "task": "player_stats", "playerId": 1966 }
{ "task": "schedule", "date": "2026-10-21" }
{ "task": "game_stats", "gameId": 401909834 }
{ "task": "leaders", "leaderCategory": "assists" }
{ "task": "fantasy_projections", "limit": 25 }
{ "task": "betting_odds" }
{ "task": "injury_report", "team": "LAL" }

Tasks

TaskWhat you get
teamsAll 30 teams with conference, division, colors and logo
team_rosterCurrent roster: name, position, jersey, height, weight, age, college, experience, injury status, head coach
team_statsRecord (overall, home, road), conference seed, per-game averages and shooting percentages, full ESPN stat categories
standingsEastern and Western Conference standings: seed, W-L, win %, games behind, home, road, last 10, streak, point differential
player_statsPlayer bio plus season averages, season totals and career averages
game_statsBox score for one game: line score, team stats, every player's line, top performers, odds
scheduleGames for a date (default today) with status and scores, or a team's full season schedule
leadersTop 10 in points, rebounds, assists, steals, blocks, FG %, FT % or 3P %
fantasy_projectionsESPN Fantasy season projections per player, with fantasy points per game in ESPN standard points scoring
betting_oddsMoneyline, spread and total (open and current) for a date's games
injury_reportLeague-wide or one team's injury list with status, injury, expected return date and latest note

Input parameters

ParameterTypeDefaultDescription
taskstring"teams"Which data to fetch (see Tasks)
teamIdinteger-Team number 1-30, alphabetical by city: 1=Hawks, 2=Celtics, 7=Mavericks, 10=Warriors, 14=Lakers, 17=Bucks, 20=Knicks, 21=Thunder. team_roster and team_stats default to 14 (Lakers)
teamstring-Team abbreviation (LAL, BOS, GSW, NYK, MIL, OKC). Takes priority over teamId. Also filters schedule, betting_odds, injury_report and fantasy_projections
playerIdinteger-ESPN athlete id for player_stats. 1966=LeBron James, 3975=Stephen Curry, 3945274=Luka Doncic, 3112335=Nikola Jokic. Ids also appear in roster and leaders output
playerNamestring-Player name lookup for player_stats when you do not know the id
gameIdinteger-ESPN game id for game_stats (required for that task). Get it from schedule
seasonintegercurrentSeason START year: 2026 = 2026-27, 2025 = 2025-26
datestringtodayYYYY-MM-DD for schedule and betting_odds
leaderCategorystring"points"points, rebounds, assists, steals, blocks, fg_pct, ft_pct, three_pct
limitinteger50Players returned by fantasy_projections (1-200, sorted by fantasy ownership)
demoModebooleanfalseReturn a small fixed SAMPLE dataset instead of live data (free, labelled source: "sample")
webhookUrlstring-POST the result to this URL (Zapier, Make, n8n or your own endpoint)

Output

Every run pushes one item:

{
"task": "standings",
"success": true,
"source": "espn",
"timestamp": "2026-10-22T19:45:38.667Z",
"season": 2026,
"seasonLabel": "2026-27",
"count": 30,
"data": { "eastern": [ ... ], "western": [ ... ] }
}

If live data cannot be fetched, or the input is invalid (for example game_stats without gameId), the item has "success": false and an error message, and no task event is charged. Live runs never fall back to sample data.


Pricing

Pay per event. You pay only for what a run delivers.

EventWhen it is chargedPrice
Actor startOnce when the run starts, one event per GB of memory (minimum one). At the default 1 GB of memory that is $0.10 per run$0.10 per GB
NBA Teams ListFetch all 30 NBA teams with basic info$0.001
NBA Team RosterGet full roster with player details for a team$0.002
NBA Team StatsFetch team season statistics$0.002
NBA StandingsGet conference standings with W/L records$0.001
NBA Player StatsFetch player season averages and stats$0.002
NBA Game StatsGet box score for a specific game$0.003
NBA ScheduleFetch games for a date range$0.002
NBA League LeadersGet stat leaders (points, assists, rebounds)$0.002
NBA Fantasy ProjectionsGet fantasy projections for players$0.005
NBA Betting OddsFetch betting lines and odds$0.005
NBA Injury ReportGet the current injury report for all teams or one team$0.002
ResultEach item written to the default dataset$0.00001

An injury_report with no listed injuries carries no task charge. Demo mode and failed tasks carry no task charge. This actor needs very little memory, so you can lower the run memory (for example to 1 GB) to cut the start fee.


Notes

  • Data comes from ESPN's public endpoints and updates as ESPN updates (scores live during games, injuries several times a day).
  • playerId is an ESPN athlete id. Ids from older versions of this actor (BALLDONTLIE ids such as 237) now point to different, often retired players; the output adds a warning when the player is inactive. Use playerName if unsure.
  • Betting odds are the consensus line ESPN shows (currently DraftKings). Odds appear only for games that have a posted line.

Troubleshooting

success: false with "ESPN has no data for that request": the id, season or date does not exist on ESPN. Check gameId/playerId, or run schedule/team_roster to find valid ids.

Empty data for schedule or odds: there are no games on that date (offseason, All-Star break).

"Live NBA data is unavailable right now": ESPN did not respond after three tries. Run again in a minute.


Built by John Rippy | Actor Arsenal