MLB Stats API - Baseball Data
Pricing
from $0.01 / 1,000 results
MLB Stats API - Baseball Data
Comprehensive MLB baseball statistics including player stats, game logs, standings & historical data. Perfect for fantasy sports, betting & analytics.
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer
The Howlers
Actor stats
0
Bookmarked
7
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
MLB Stats API
Fetch MLB baseball data including teams, players, schedules, standings, and game statistics from the official MLB Stats API.
Quick Start
Test with Demo Mode (free, no API key needed)
{"demoMode": true}
Run with real data
{"demoMode": false,"task": "standings","leaderCategory": "homeRuns"}
Input Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
task | string | "standings" | Yes* | What data to fetch |
teamId | integer | - | No | MLB team ID (e.g., 147 for New York Yankees, 111 for Boston Red Sox). Required for team_roster and team_schedule. |
playerId | integer | - | No | MLB player ID for player_stats task |
gameId | integer | - | No | MLB game ID (gamePk) for game_boxscore task |
season | integer | - | No | Season year (e.g., 2024). Defaults to current season. |
date | string | - | No | Date for schedule (YYYY-MM-DD format). Defaults to today. |
leaderCategory | string | "homeRuns" | No | Category for leaders (homeRuns, battingAverage, rbi, wins, era, strikeouts) |
demoMode | boolean | true | No | Return sample data without making API calls |
webhookUrl | string | - | No | URL to receive results via POST request (Zapier, Make, n8n, or custom endpoint) |
Pricing
This actor uses pay-per-event billing:
| Event | Description | Price |
|---|---|---|
| MLB Teams List | Fetch all MLB teams with basic info (name, abbreviation, division, league) | $0.01 |
| Team Roster | Get complete roster for a team including player positions, numbers, and status | $0.01 |
| Team Schedule | Fetch team's upcoming and past games with scores and opponents | $0.01 |
| League Standings | Current MLB standings by division with wins, losses, PCT, GB | $0.01 |
| Player Statistics | Detailed player stats - batting (AVG, HR, RBI, OPS) or pitching (ERA, WHIP, K) | $0.02 |
| Game Boxscore | Complete game boxscore with batting/pitching lines, play-by-play summary | $0.02 |
| League Schedule | Full MLB schedule for a date range with game times and broadcasts | $0.01 |
| Stat Leaders | League leaders in batting average, home runs, RBI, ERA, strikeouts, saves | $0.02 |
| Fantasy Projections | Player fantasy projections for DraftKings/FanDuel with projected points | $0.03 |
| Betting Odds | Game betting lines including moneyline, run line, totals 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