MLB Stats API
Pricing
Pay per usage
Go to Apify Store

MLB Stats API
Extract baseball data from MLB official free API. Get teams, standings, game schedules/scores, and detailed player statistics for any season.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Monkey Coder
Maintained by Community
Actor stats
1
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
⚾ MLB Stats API
Extract comprehensive baseball data from MLB's official free API. Get teams, standings, game schedules with scores, and detailed player statistics for any season.
🔧 Features
- Teams — List all 30 MLB teams with venue, league, division info
- Standings — Division standings with W/L record, winning percentage, games back, run differential
- Schedule / Scores — Game schedules and final scores for any date or full season
- Player Stats — Detailed hitting and pitching statistics for any team's roster
📊 Modes
| Mode | Description | Key Fields |
|---|---|---|
teams | All 30 MLB teams | name, abbreviation, league, division, venue |
standings | Division standings | team, wins, losses, pct, games_back, streak |
schedule | Game schedule & scores | away_team, home_team, scores, winner, venue |
player_stats | Player statistics | name, position, avg/hr/rbi (hitting) or era/wins/k (pitching) |
🚀 How to Use
- Select a Mode from the dropdown
- Set the Season year (defaults to current year)
- For
schedulemode: optionally enter a Date (YYYY-MM-DD) - For
player_statsmode: optionally enter a Team ID - Click Start to run
Common Team IDs
| Team | ID | Team | ID |
|---|---|---|---|
| New York Yankees | 147 | Los Angeles Dodgers | 119 |
| Boston Red Sox | 111 | Chicago Cubs | 112 |
| Houston Astros | 117 | Atlanta Braves | 144 |
| Philadelphia Phillies | 143 | San Diego Padres | 135 |
| New York Mets | 121 | San Francisco Giants | 137 |
📦 Sample Output (Standings)
{"division": "American League East","team": "New York Yankees","wins": 82,"losses": 55,"pct": ".599","games_back": "-","division_rank": "1","runs_scored": 580,"runs_allowed": 478,"run_diff": 102,"streak": "W3","season": "2025","mode": "standings","index": 1,"fetched_at": "2025-07-15T12:00:00+00:00"}
📦 Sample Output (Player Stats — Hitting)
{"player_id": 660271,"name": "Shohei Ohtani","number": "17","position": "DH","stat_group": "hitting","team": "Los Angeles Dodgers","games": 120,"at_bats": 450,"hits": 130,"avg": ".289","home_runs": 40,"rbi": 95,"ops": "1.012","season": "2025","mode": "player_stats","index": 1,"fetched_at": "2025-07-15T12:00:00+00:00"}
📝 Notes
- No API key required — MLB Stats API is completely free and public
- Player stats mode makes individual API calls per player (may take 30-60 seconds for a full roster)
- Schedule without a date returns the full season schedule (can be large)
- All data comes directly from MLB's official
statsapi.mlb.comAPI