Major League Baseball Statistics


select a query from the list at right or ...

Get more information on parameters listed below using the meta query. This is a way to find possible values for parameters required or possible for some of the functions in the list at right.

statsapi.meta()


Get general information about statsapi endpoints for use in fashioning your own custom query using get

statsapi.notes()


Submit your own query to a statsapi endpoint. (see list)

statsapi.get()


Query Results

To get started, choose a team id from the chart then click "last_game" from the list of links at right and enter the team id in the box then click submit. This will return a game number (gamePk I belive is the parameter name). Click game_highlights at right and enter the game number. Click the links to watch highlight video. This should give you the basic idea of how this API works. Some queries may list several parameters but that doesn't mean they are all required. To research some possible parameter values, use the meta search that appears on the page (refresh if it's not there). MLB does not make the details of this API publicly available, so you have to figure out what you can. Have fun!

MLB Team Information

Complete Listing of MLB Team Information for MLB Gameday API

Team ID Code File Code Abbreviation Name Full Name Brief Name
108 ana ana LAA LA Angels Los Angeles Angels Angels
109 ari ari ARI Arizona Arizona Diamondbacks D-backs
110 bal bal BAL Baltimore Baltimore Orioles Orioles
111 bos bos BOS Boston Boston Red Sox Red Sox
112 chn chc CHC Chi Cubs Chicago Cubs Cubs
113 cin cin CIN Cincinnati Cincinnati Reds Reds
114 cle cle CLE Cleveland Cleveland Indians Indians
115 col col COL Colorado Colorado Rockies Rockies
116 det det DET Detroit Detroit Tigers Tigers
117 hou hou HOU Houston Houston Astros Astros
118 kca kc KC Kansas City Kansas City Royals Royals
119 lan la LAD LA Dodgers Los Angeles Dodgers Dodgers
120 was was WSH Washington Washington Nationals Nationals
121 nyn nym NYM NY Mets New York Mets Mets
133 oak oak OAK Oakland Oakland Athletics Athletics
134 pit pit PIT Pittsburgh Pittsburgh Pirates Pirates
135 sdn sd SD San Diego San Diego Padres Padres
136 sea sea SEA Seattle Seattle Mariners Mariners
137 sfn sf SF San Francisco San Francisco Giants Giants
138 sln stl STL St. Louis St. Louis Cardinals Cardinals
139 tba tb TB Tampa Bay Tampa Bay Rays Rays
140 tex tex TEX Texas Texas Rangers Rangers
141 tor tor TOR Toronto Toronto Blue Jays Blue Jays
142 min min MIN Minnesota Minnesota Twins Twins
143 phi phi PHI Philadelphia Philadelphia Phillies Phillies
144 atl atl ATL Atlanta Atlanta Braves Braves
145 cha cws CWS Chi White Sox Chicago White Sox White Sox
146 mia mia MIA Miami Miami Marlins Marlins
147 nya nyy NYY NY Yankees New York Yankees Yankees
158 mil mil MIL Milwaukee Milwaukee Brewers Brewers
159 aas al AL AL All-Stars American League All-Stars AL All-Stars
160 nas nl NL NL All-Stars National League All-Stars NL All-Stars

boxscore

boxscore_data

game_highlight_data

game_highlights

game_pace

game_pace_data

game_scoring_play_data

game_scoring_plays

last_game

latest_season

league_leader_data

league_leaders

line_score

lookup_player

lookup_team

next_game

player_stat_data

player_stats

roster

schedule

standings

standings_data

team_leader_data

team_leaders