This document lists all available endpoints in the mlb-stats-api library.
- Total Endpoints: 72
- Tested Endpoints: 57
- Resource Categories: 22
getAttendance()- Get attendance records
getAwards()- Get awards information
getBroadcasts()- Get broadcast information for games
getConferences()- Get conference information
getDivisions()- Get division information
getDraft()- Get draft information
getGameFeed()- Get live game feed datagetGameDiffPatch()- Get game feed diff patchgetGameTimestamps()- Get game feed timestampsgetGameChanges()- Get recently changed gamesgetGameContent()- Get game content and mediagetGameColor()- Get game color feedgetGameColorDiff()- Get game color diff patchgetGameColorTimestamps()- Get game color timestampsgetGameBoxscore()- Get game boxscoregetGameWinProbability()- Get win probability datagetGameContextMetrics()- Get game context metricsgetGameLinescore()- Get game linescoregetGamePlayByPlay()- Get play-by-play datagetGamePace()- Get game pace information
getGameTypes()- Get list of game types
getHighLow()- Get statistical highs and lows
getHomeRunDerby()- Get home run derby information
getJobs()- Get jobs/officials informationgetJobsUmpires()- Get umpire informationgetJobsUmpiresGames()- Get games for specific umpiregetJobsDatacasters()- Get datacaster informationgetJobsOfficialScorers()- Get official scorer information
getLeague()- Get league informationgetLeagueAllStarBallot()- Get all-star ballotgetLeagueAllStarWriteIns()- Get all-star write-insgetLeagueAllStarFinalVote()- Get all-star final vote
getPeople()- Get people/playersgetPeopleChanges()- Get recent people changesgetPeopleFreeAgents()- Get free agentsgetPerson()- Get specific persongetPersonStats()- Get person stats for specific game
getRosterTypes()- Get list of roster types
getSchedule()- Get game schedulegetScheduleTied()- Get tied gamesgetSchedulePostseason()- Get postseason schedulegetSchedulePostseasonSeries()- Get postseason seriesgetSchedulePostseasonTuneIn()- Get postseason tune-in info
getSeasons()- Get seasons listgetSeason()- Get specific season
getSports()- Get sports listgetSportsPlayers()- Get players for specific sport
getStandings()- Get standings
getStats()- Get statisticsgetStatsLeaders()- Get statistical leadersgetStatsStreaks()- Get statistical streaks
getTeams()- Get all teamsgetTeamsHistory()- Get teams historygetTeamsStats()- Get teams statisticsgetTeamsAffiliates()- Get team affiliatesgetTeam()- Get specific teamgetTeamAlumni()- Get team alumnigetTeamCoaches()- Get team coachesgetTeamPersonnel()- Get team personnelgetTeamLeaders()- Get team leadersgetTeamRoster()- Get team roster
getTransactions()- Get player transactions
getVenues()- Get all venuesgetVenue()- Get specific venue
const response = await mlbStats.getTeams();const response = await mlbStats.getTeams({
params: { sportId: 1, season: 2024 }
});const response = await mlbStats.getTeam({
pathParams: { teamId: 111 }
});const response = await mlbStats.getPersonStats({
pathParams: { personId: 660271, gamePk: 634197 },
params: { fields: 'hitting,pitching' }
});- Some endpoints may require specific parameters to function correctly
- Endpoints marked as "skipped" in tests may be deprecated or require special conditions
- All endpoints return a Promise with the response object containing status, data, headers, etc.