MLB Data
FREE
By theapiguy
Updated 6 months ago

MLB Data API Documentation

Baseball MLB Data about players, teams, reports, and other stats.

Learn more about this API
Reports
GETBroadcast Info
GETInjuries
GETGet Transactions Over Period
GETPitching Leaders
GETHitting Leaders
Stats Data
GETProjected Hitting Stats
GETSeason Pitching Stats
GETCareer Hitting Stats
GETLeague Hitting Stats
GETLeague Pitching Stats
GETCareer Pitching Stats
GETProjected Pitching Stats
GETSeason Hitting Stats
Player Data
GETPlayer Teams
GETPlayer Search
GETPlayer Info
Game Data
GETGame Type Info
Team Data
GETGet Roster by Seasons
GETGet Teams by Season
GETGet 40-Man Roster
GETGet Teams by Season

Retrieve a list of major league teams that were active during a given season. If allstarsw is set to 'Y', you will instead receive data on the all star teams for that season. You can sort using the sortorder paramater. Ex: Sort in ascending order by the name field using sortby='name_asc'

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
seasonSTRING
REQUIREDExample: '2017'
Optional Parameters
all_star_swSTRING
OPTIONALExample: 'N' Set to ‘Y’ for all star data, and ‘N’ for regular season.
sort_orderSTRING
OPTIONALExample: name_asc Field to sort results by.
Code Snippet
Install SDK
Response ExampleSchema

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication