balldontlie API
Compare NBA player stats across seasons
Pull NBA player stats, game results, and season averages. Build a player comparison tool that charts stat trajectories over multiple seasons.
Free tier. 30 requests/min.
How it works with Loony
Describe it.
Deploy it.
Query it.
Managed database.
Your balldontlie data lives in its own Postgres instance. Zero config. Data accumulates over time.
Scheduled syncs.
Cron jobs run on Loony infra. Every minute on free. Your data stays fresh without you thinking about it.
REST + MCP endpoints.
Query from your agent, your dashboard, or connect BI tools directly. Full OpenAPI spec included.
$ "Pull NBA game stats for the current season from balldontlie. Build player season averages and compare year-over-year trends." ✓ Schema validated ✓ Database provisioned ✓ Scripts deployed ✓ Schedules registered Done. # Your data is now at: REST /data/v1/balldontlie/query MCP /mcp/v1/balldontlie/mcp SQL psql $DATABASE_URL
What you get
NBA stats are interesting for one game but powerful across a season. Loony stores every game's box score, so you can query 'Show me players who improved their 3PT% by more than 5% from last season' — questions the NBA app can't answer.
mv_player_season player text -- player name season integer -- year games integer -- games played ppg numeric -- points per game rpg numeric -- rebounds per game apg numeric -- assists per game fg_pct numeric -- field goal % three_pct numeric -- 3-point %
Even better together
Pair with TheSportsDB for player images and team metadata. Add NewsAPI to correlate player performance with media narratives.