VOOZH about

URL: https://apify.com/gentle_cloud/mlb-stats-api

⇱ MLB Stats API Β· Apify


Pricing

from $0.50 / 1,000 results

Go to Apify Store

Extract baseball data from MLB official free API. Get teams, standings, game schedules/scores, and detailed player statistics for any season.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

πŸ‘ Monkey Coder

Monkey Coder

Maintained by Community

Actor stats

1

Bookmarked

70

Total users

5

Monthly active users

21 days ago

Last modified

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.

Why use this Actor

Use this Actor when you need structured MLB data without wrestling with unofficial scrapers or brittle HTML parsing. It’s useful for research, dashboards, sports monitoring, and quick season comparisons.

πŸ”§ 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

ModeDescriptionKey Fields
teamsAll 30 MLB teamsname, abbreviation, league, division, venue
standingsDivision standingsteam, wins, losses, pct, games_back, streak
scheduleGame schedule & scoresaway_team, home_team, scores, winner, venue
player_statsPlayer statisticsname, position, avg/hr/rbi (hitting) or era/wins/k (pitching)

πŸš€ How to Use

  1. Select a Mode from the dropdown
  2. Set the Season year (defaults to current year)
  3. For schedule mode: optionally enter a Date (YYYY-MM-DD)
  4. For player_stats mode: optionally enter a Team ID
  5. Click Start to run

Common Team IDs

TeamIDTeamID
New York Yankees147Los Angeles Dodgers119
Boston Red Sox111Chicago Cubs112
Houston Astros117Atlanta Braves144
Philadelphia Phillies143San Diego Padres135
New York Mets121San Francisco Giants137

πŸ“¦ 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"
}

πŸš€ Quick Start

  1. Choose a mode: teams, standings, schedule, or player_stats.
  2. For schedules, use a date like 2025-07-15.
  3. For player stats, optionally provide a team ID (e.g. 147 for the Yankees).
  4. Run the Actor and verify that each item includes index, mode, and fetched_at.

πŸ” Verification Steps

  • Test teams mode first to confirm the API is reachable.
  • Run standings mode and check that division rows appear in the dataset.
  • For schedule, verify the date filter returns games for the requested day.
  • For player_stats, start with a small roster and confirm stats fields are populated.

πŸ§ͺ Example Inputs

Teams

{"mode":"teams","season":"2025"}

Schedule

{"mode":"schedule","season":"2025","date":"2025-07-15"}

Player stats

{"mode":"player_stats","season":"2025","team_id":147,"stat_type":"hitting"}

πŸ“ 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.com API

πŸ’‘ Troubleshooting

  • Use YYYY-MM-DD for the schedule date field.
  • If you get no results, check that the season is valid and the mode is set correctly.
  • For roster stats, try a known team ID first (like 147 for the Yankees).
  • If player_stats feels slow, start with a single team to confirm the pipeline before larger runs.

You might also like

MLB Stats API - Baseball Data

alizarin_refrigerator-owner/mlb-stats-api

Comprehensive MLB baseball statistics including player stats, game logs, standings & historical data. Perfect for fantasy sports, betting & analytics.

MLB Stats Scraper

parseforge/mlb-stats-scraper

Scrape Major League Baseball data from the official MLB Stats API - schedules, teams, rosters, player stats, and live game feeds. No API key required.

MLB Team Roster

burbn/mlb-team-roster-scraper

Extract complete MLB rosters with deep player insights! 🏟️ Get real-time stats, injury tracking, cross-platform IDs (ESPN, Yahoo, MLB), and fantasy points. πŸš€ High-speed, multi-team support, and 6+ organized views for perfect data analysis. Perfect for analytics and betting apps!

ESPN Sports Scores & Schedules - NBA, NFL, MLB, NHL, MLS, EPL..

hgservices/apify-actor-espn

Get live scores, schedules, and game results from ESPN β€” covering NBA, NFL, MLB, NHL, MLS, EPL, NCAA, and more. No API key needed. Filter by team, date, or status. Output includes scores, venues, broadcasts, and team details.

49

5.0

Sports Betting Intelligence - Odds & Arbitrage AI

viralanalyzer/sports-betting-intelligence

Real-time odds comparison across 20+ bookmakers. Arbitrage detection.

88

5.0

Sports Odds Live Feed: DraftKings, Pinnacle, FanDuel, BetMGM

scrapemint/sports-odds-scraper

Pull live sports betting odds across DraftKings, Pinnacle, FanDuel, BetMGM, Caesars, Bet365 and more. H2H, spreads, totals, props. Normalized schema, best price per outcome, arbitrage detection. No third party API key. Pay per row.

Forebet Bet Prediction Scraper

rikunk/forebet-scraper

Forebet Bet Prediction Scraper is a specialized tool designed to fetch betting predictions exclusively from Forebet, one of the reputable betting prediction websites. This scraper's aim is to provide accurate and current betting predictions, focusing on the insights from Forebet's platform.

Sports Odds Movement and Arbitrage Tracker

scrapemint/sports-odds-movement-tracker

Track live sports betting odds across 40+ sportsbooks (DraftKings, FanDuel, Pinnacle, Bet365). Filter by sport, region, market. Detect arbitrage and best price edges. Returns deduped JSON with moneyline, spread, and total lines.

Sports Intelligence Autopilot

actor_researcher.48/sports-intelligence-autopilot

Professional sports intelligence across 38 leagues ( NBA, NFL, Cricket, Soccer, F1, Horse Racing and many others). Real-time scores, stats, odds analysis. FREE mode with ESPN data. Premium: value bets, arbitrage, DFS, AI predictions. 20 modes, 6 MCPs, 58 tools with beautiful HTML reports.

Pinnacle Odds Scraper β€” h2h, spreads, totals + 5K specials

zhorex/sports-odds-aggregator

Pre-match + live Pinnacle odds. 11 sports, h2h / spreads / totals + 5,000+ specials per sport (futures, yes-no, exact totals, first-to-score, team props). PPE $0.01-0.04 per snapshot. Datacenter proxy. The Odds API + OddsJam alternative for sharp bettors and EV teams.