VOOZH about

URL: https://apify.com/crawlergang/mlb-stats-scraper

โ‡ฑ MLB Stats Scraper ยท Apify


Pricing

from $3.00 / 1,000 results

Go to Apify Store

Scrape the official MLB Stats API, comprehensive baseball data including teams, players, schedules, standings, and detailed statistics. Official MLB data source, no authentication required.

Pricing

from $3.00 / 1,000 results

Rating

5.0

(11)

Developer

๐Ÿ‘ Crawler Gang

Crawler Gang

Maintained by Community

Actor stats

11

Bookmarked

2

Total users

0

Monthly active users

25 days ago

Last modified

Share

Access comprehensive baseball data from the official MLB Stats API โ€” teams, players, schedules, standings, and detailed statistics. No authentication required. Official MLB data source updated in real-time during the season.

Features

  • Teams โ€” list all 30 MLB teams with league, division, venue, and location info
  • Players โ€” get full rosters for any team, or all active players in the league
  • Schedule โ€” fetch game schedules by date, date range, or team
  • Standings โ€” current division standings with win/loss records, GB, and streak info
  • Player Stats โ€” hitting, pitching, or fielding statistics for any player by season
  • Game Details โ€” detailed linescore, run/hit/error totals, and inning-by-inning data for any game

Input Parameters

ParameterTypeDescription
modeSelectteams, players, schedule, standings, playerStats, gameDetails
seasonIntegerMLB season year (default: current year)
teamIdIntegerMLB team ID (e.g. 147 = Yankees, 111 = Red Sox)
playerIdIntegerMLB player ID (e.g. 660271 = Juan Soto)
gamePkIntegerGame primary key (required for mode=gameDetails)
dateTextGame date as YYYY-MM-DD (mode=schedule)
fromDateTextStart date for schedule range
toDateTextEnd date for schedule range
leagueIdSelectAL, NL, or both (mode=standings)
statGroupSelecthitting, pitching, or fielding (mode=playerStats)
gameTypeSelectR (Regular), S (Spring), P (Playoffs), W (World Series), etc.
maxItemsIntegerMaximum records to return (1โ€“10,000, default 100)

Output Fields

Teams mode

FieldDescription
teamIdMLB team identifier
nameFull team name
abbreviation2โ€“3 letter abbreviation (e.g. NYY)
teamNameShort team name (e.g. Yankees)
locationNameCity/location name
leagueNameAmerican League or National League
divisionNameDivision name (e.g. AL East)
venueNameHome stadium name
activeWhether the team is active
mlbUrlOfficial MLB team page URL

Players mode

FieldDescription
playerIdMLB player identifier
fullNamePlayer's full name
primaryNumberJersey number
birthDateDate of birth
birthCityCity of birth
birthCountryCountry of birth
heightPlayer height
weightPlayer weight (lbs)
primaryPositionPrimary fielding position
currentTeamCurrent team name
batSideBatting side (Left/Right/Switch)
pitchHandThrowing hand
mlbUrlOfficial MLB player page URL

Schedule mode

FieldDescription
gamePkGame primary key
gameDateFull game date/time (ISO 8601)
homeTeamHome team name
awayTeamAway team name
homeScoreHome team runs scored
awayScoreAway team runs scored
statusGame status (Final, In Progress, Postponed, etc.)
venueStadium name

Standings mode

FieldDescription
teamNameTeam name
divisionNameDivision name
winsTotal wins
lossesTotal losses
pctWinning percentage
divisionRankRank within division
gamesBackGames behind division leader
streakCodeCurrent streak (e.g. W5, L2)

Player Stats mode

FieldDescription
playerIdMLB player identifier
seasonSeason year
gamesPlayedGames played
homeRunsHome runs
rbiRuns batted in
avgBatting average
obpOn-base percentage
slgSlugging percentage
opsOn-base plus slugging
eraEarned run average (pitchers)
whipWalks plus hits per inning pitched
winsPitcher wins

Example Use Cases

Get all 30 MLB teams for 2024:

{
"mode":"teams",
"season":2024,
"maxItems":30
}

Get New York Yankees roster:

{
"mode":"players",
"teamId":147,
"season":2024
}

Get July 4th 2024 schedule:

{
"mode":"schedule",
"date":"2024-07-04",
"gameType":"R"
}

Get 2024 AL East standings:

{
"mode":"standings",
"season":2024,
"leagueId":"AL"
}

Get Juan Soto 2024 hitting stats:

{
"mode":"playerStats",
"playerId":660271,
"season":2024,
"statGroup":"hitting"
}

Common Team IDs

TeamIDTeamID
New York Yankees147New York Mets121
Boston Red Sox111Los Angeles Dodgers119
Chicago Cubs112San Francisco Giants137
Houston Astros117Atlanta Braves144
Los Angeles Angels108Philadelphia Phillies143

Data Source

All data is sourced from the official MLB Stats API โ€” the same data feed used by MLB.com, the Statcast system, and major sports analytics platforms. The API is completely free and requires no authentication.

FAQs

Q: How current is the data? A: Schedule, scores, and standings update in real-time during games. Player stats may have slight delays.

Q: What seasons are available? A: Historical data goes back to 1876. Not all stats are available for very old seasons.

Q: How do I find a player's ID? A: Use mode=players to list all players. Player IDs are also visible in MLB.com profile URLs (e.g. mlb.com/player/660271).

Q: What game types are available? A: Regular Season (R), Spring Training (S), Playoffs (P), World Series (W), League Championship (L), and All-Star (A).

Q: Is there a cost to use this scraper? A: No. The official MLB Stats API is free and public. This scraper uses only standard Apify datacenter proxies (included in the free tier).

Q: Can I get historical standings? A: Yes โ€” provide the season parameter (e.g. season: 2020) for any past season.

You might also like

MLB Stats Scraper

crawlerbros/mlb-stats-scraper

Scrape the official MLB Stats API, comprehensive baseball data including teams, players, schedules, standings, and detailed statistics. Official MLB data source, no authentication required.

79

MLB Baseball Stats Scraper

crawlerbros/mlb-baseball-stats-scraper

Scrape the official MLB Stats API - comprehensive baseball data including teams, player batting/pitching stats, schedules, and standings. Official MLB data source, no authentication required.

15

MLB Stats API

gentle_cloud/mlb-stats-api

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

77

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 Player & Game Stats Scraper

scrapers_lat/mlb-stats-scraper

Extract MLB teams, rosters, player season stats, schedules, scores and standings from the public MLB Stats API.

2

5.0

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 Search Results Scraper ๐ŸŽฏโšพ

easyapi/mlb-search-results-scraper

A powerful scraper for MLB.com video search results. Extract comprehensive video metadata including titles, descriptions, and statistics. Perfect for sports analysts, content creators, and baseball enthusiasts looking to gather MLB video content programmatically. ๐ŸŽฏโšพ

Baseball Reference Scraper | MLB Stats and History

parseforge/baseball-reference-scraper

Extract MLB player, team, and game data from Baseball Reference including box scores, season stats, advanced metrics, standings, and historical records dating back over a century. Built for sabermetrics, fantasy baseball, betting models, and deep sports research.

MLB StatsAPI Baseball Data Scraper

parseforge/mlb-statsapi-scraper

Tap the official MLB StatsAPI for teams, players, schedules, venues, leagues, divisions, and seasons. Filter by sport id and season year to build rosters, standings, or game calendars. Useful for fantasy tools, baseball analytics, and historical season research.