MLB Stats API (statsapi.mlb.com)
MLB Advanced Media's public Stats API: teams, schedules, live game feeds, standings and deep player/team stats, with no API key at all.
statsapi.mlb.com is MLB Advanced Media's public JSON API and the same backend that feeds MLB's own products. It is keyless and richly featured: teams, rosters, schedules, standings, live game feeds (pitch-by-pitch via the GUMBO feed), box scores, and extensive player/team statistics across seasons. It is widely used by the community (the popular MLB-StatsAPI Python wrapper wraps it) and there are community endpoint catalogues. The trade-off is licensing: data is free to access but governed by MLB's copyright/terms, so it is intended for personal and non-commercial use.
Free tier
Free, no account or key required.Rate limits
Not published. Public endpoint; cache and throttle to avoid being blocked.Auth
No keyBase URL
https://statsapi.mlb.com/api/v1What you'd build with it
- Live MLB score and pitch-by-pitch tracking automations
- Standings and schedule assistant
- Player and team season-stats lookup skills
- Historical baseball analytics and research
Key endpoints
- GET
/teams?sportId=1List all MLB teams - GET
/schedule?sportId=1&date={YYYY-MM-DD}Games scheduled for a date - GET
/standings?leagueId=103,104&season={year}Standings for AL/NL by season - GET
/people/{playerId}/stats?stats=seasonSeason stats for a player - GET
/game/{gamePk}/feed/liveLive GUMBO game feed (pitch-by-pitch)
Members get the runnable recipe
Sign in free to copy the example request, see a sample response, and read the gotchas.