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

20

Total users

4

Monthly active users

7 days ago

Last modified

Share

NBA API

Fetch NBA basketball data including teams, players, standings, schedules, and game statistics from BALLDONTLIE API.


Quick Start

Test with Demo Mode (free, no API key needed)

{
"demoMode": true
}

Run with real data

{
"demoMode": false,
"task": "teams",
"leaderCategory": "points"
}

Input Parameters

ParameterTypeDefaultRequiredDescription
taskstring"teams"Yes*What type of NBA data to fetch
teamIdinteger-NoNBA team ID (1-30). Examples: 14=Lakers, 2=Celtics, 10=Warriors, 17=Bucks, 7=Mavericks
playerIdinteger-NoNBA player ID from BALLDONTLIE API. Examples: 237=LeBron James, 115=Anthony Davis
gameIdinteger-NoGame ID for fetching specific game stats
seasoninteger-NoNBA season year (e.g., 2024 for the 2024-25 season). Defaults to current season.
datestring-NoFilter games by date (YYYY-MM-DD format)
leaderCategorystring"points"NoStatistical category for league leaders
demoModebooleantrueNoUse demo data instead of live API calls. Useful for testing without API rate limits.
webhookUrlstring-NoURL to receive results via POST request (Zapier, Make, n8n, or custom endpoint)

Pricing

This actor uses pay-per-event billing:

EventDescriptionPrice
Teams ListAll 30 NBA teams with basic info (name, city, conference, division)$0.01
Team RosterCurrent roster for a team with player details (name, position, height, weight)$0.01
Team StatsSeason statistics for a team (wins, losses, points per game, shooting percentages)$0.01
League StandingsCurrent Eastern and Western Conference standings with records and streaks$0.01
Player StatsSeason averages for a player (points, rebounds, assists, shooting percentages)$0.02
Game StatsDetailed game statistics including box score, top performers, and play-by-play$0.02
ScheduleUpcoming and past games with dates, times, teams, and venues$0.01
League LeadersTop players in various statistical categories (points, rebounds, assists, etc.)$0.01
Fantasy ProjectionsDraftKings and FanDuel player projections with salaries and ownership percentages$0.03
Betting OddsGame lines (moneyline, spread, totals) and player props from multiple sportsbooks$0.05

Demo mode is free -- no charges for sample data.


Troubleshooting

"API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

No results or empty dataset

Check the run log for error messages. Common causes:

  • Invalid input format (check the examples above)
  • The target data doesn't exist or is too small to track

How do I test without an API key?

Enable Demo Mode in the input. This returns realistic sample data so you can verify the output format works for your workflow.


Built by John Rippy | Actor Arsenal