MENU navbar-image

⚾ Baseball (MLB)

MLB baseball API with data from the MLB Stats API: schedules, teams, players, and per-game detail.

Team IDs come from the teams endpoint, player IDs from the players endpoint, and game IDs (gamePk) from the schedule endpoint.

General

Seasons, leagues, venues, players, free agents, and the daily schedule. Use these to look up the IDs and dates the team and game endpoints take.

GET /v1/seasons

requires authentication

Returns the key dates of one MLB season: spring training, regular season start and end, All-Star Game, postseason, and offseason, plus qualifier thresholds.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/seasons'
params = {
  'seasonId': '2023',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/seasons';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'seasonId' => '2023',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/seasons"
);

const params = {
    "seasonId": "2023",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/seasons?seasonId=2023" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
        "version": "v1.0",
        "status": 200,
        "copywrite": "https://steadyapi.com"
    },
    "body": [
        {
            "seasonId": "2023",
            "hasWildcard": true,
            "preSeasonStartDate": "2023-01-01",
            "preSeasonEndDate": "2023-02-23",
            "seasonStartDate": "2023-02-24",
            "springStartDate": "2023-02-24",
            "springEndDate": "2023-03-28",
            "regularSeasonStartDate": "2023-03-30",
            "lastDate1stHalf": "2023-07-09",
            "allStarDate": "2023-07-11",
            "firstDate2ndHalf": "2023-07-14",
            "regularSeasonEndDate": "2023-10-02",
            "postSeasonStartDate": "2023-10-03",
            "postSeasonEndDate": "2023-11-04",
            "seasonEndDate": "2023-11-04",
            "offseasonStartDate": "2023-11-05",
            "offSeasonEndDate": "2023-12-31",
            "seasonLevelGamedayType": "P",
            "gameLevelGamedayType": "P",
            "qualifierPlateAppearances": 3.1,
            "qualifierOutsPitched": 3
        }
    ]
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/seasons

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
seasonId required integer

Season as a four-digit year (YYYY). Example: 2023

GET /v1/leagues

requires authentication

Returns the MLB leagues, such as the American League and National League, with each league's season dates, number of games and teams, and wild-card settings.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/leagues'
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/leagues';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/leagues"
);

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/leagues" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": [
      {
        "id": 103,
        "name": "American League",
        "abbreviation": "AL",
        "nameShort": "American",
        "seasonState": "postseason",
        "hasWildCard": true,
        "hasSplitSeason": false,
        "numGames": 162,
        "hasPlayoffPoints": false,
        "numTeams": 15,
        "numWildcardTeams": 3,
        "seasonDateInfo": {
          "seasonId": "2023",
          "preSeasonStartDate": "2023-01-01",
          "preSeasonEndDate": "2023-02-23",
          "seasonStartDate": "2023-02-24",
          "springStartDate": "2023-02-24",
          "springEndDate": "2023-03-28",
          "regularSeasonStartDate": "2023-03-30",
          "lastDate1stHalf": "2023-07-09",
          "allStarDate": "2023-07-11",
          "firstDate2ndHalf": "2023-07-14",
          "regularSeasonEndDate": "2023-10-01",
          "postSeasonStartDate": "2023-10-03",
          "postSeasonEndDate": "2023-11-04",
          "seasonEndDate": "2023-11-04",
          "offseasonStartDate": "2023-11-05",
          "offSeasonEndDate": "2023-12-31",
          "seasonLevelGamedayType": "P",
          "gameLevelGamedayType": "P",
          "qualifierPlateAppearances": 3.1,
          "qualifierOutsPitched": 3
        },
        "season": "2023",
        "orgCode": "AL",
        "conferencesInUse": false,
        "divisionsInUse": true,
        "sport": {
          "id": 1
        },
        "sortOrder": 21,
        "active": true
      },
      { ... }
    ]
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/leagues

Headers

Authorization Bearer YOUR_API_KEY

GET /v1/venues

requires authentication

Returns MLB venues, each with its ID, name, and active flag.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/venues'
params = {
  'seasonId': '2023',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/venues';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'seasonId' => '2023',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/venues"
);

const params = {
    "seasonId": "2023",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/venues?seasonId=2023" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": [
      {
        "id": 1,
        "name": "Angel Stadium",
        "active": true,
        "season": "2023"
      },
      {
        "id": 2,
        "name": "Oriole Park at Camden Yards",
        "active": true,
        "season": "2023"
      },
      { ... }
    ]
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/venues

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
seasonId required integer

Not used by this endpoint: no season is sent upstream, so the same venue list is returned for any value. Example: 2023

GET /v1/players

requires authentication

Returns a player's biographical profile: name, birth date and place, height, weight, position, bats/throws, and MLB debut. Without personIds, returns the list of MLB players.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/players'
params = {
  'personIds': '676265',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/players';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'personIds' => '676265',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/players"
);

const params = {
    "personIds": "676265",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/players?personIds=676265" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
        "version": "v1.0",
        "status": 200,
        "copywrite": "https://steadyapi.com"
    },
    "body": [
        {
            "id": 676265,
            "fullName": "Cory Abbott",
            "firstName": "Cory",
            "lastName": "Abbott",
            "primaryNumber": "77",
            "birthDate": "1995-09-20",
            "currentAge": 28,
            "birthCity": "San Diego",
            "birthStateProvince": "CA",
            "birthCountry": "USA",
            "height": "6' 2\"",
            "weight": 217,
            "active": true,
            "primaryPosition": {
                "code": "1",
                "name": "Pitcher",
                "type": "Pitcher",
                "abbreviation": "P"
            },
            "useName": "Cory",
            "useLastName": "Abbott",
            "middleName": "James",
            "boxscoreName": "Abbott, C",
            "gender": "M",
            "isPlayer": true,
            "isVerified": true,
            "draftYear": 2017,
            "mlbDebutDate": "2021-06-05",
            "batSide": {
                "code": "R",
                "description": "Right"
            },
            "pitchHand": {
                "code": "R",
                "description": "Right"
            },
            "nameFirstLast": "Cory Abbott",
            "nameSlug": "cory-abbott-676265",
            "firstLastName": "Cory Abbott",
            "lastFirstName": "Abbott, Cory",
            "lastInitName": "Abbott, C",
            "initLastName": "C Abbott",
            "fullFMLName": "Cory James Abbott",
            "fullLFMName": "Abbott, Cory James",
            "strikeZoneTop": 3.467,
            "strikeZoneBottom": 1.589
        }
    ]
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/players

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
personIds required integer

One MLB player ID (a single integer; comma-separated lists are rejected). Optional in practice: without it, all MLB players are returned. Example: 676265

GET /v1/free-agents

requires authentication

Returns the free agents for a season: each player's original team, new team (if signed), position, date declared, and notes.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/free-agents'
params = {
  'seasonId': '2023',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/free-agents';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'seasonId' => '2023',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/free-agents"
);

const params = {
    "seasonId": "2023",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/free-agents?seasonId=2023" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": {
      "season": "2023",
      "freeAgents": [
        {
          "player": {
            "id": 501659,
            "fullName": "Abraham Almonte"
          },
          "originalTeam": {
            "id": 121,
            "name": "New York Mets"
          },
          "newTeam": [],
          "notes": "Minor League Free Agent",
          "dateDeclared": "2023-10-04",
          "position": {
            "code": "O",
            "name": "Outfield",
            "type": "Outfielder",
            "abbreviation": "OF"
          }
        },
        {
          "player": {
            "id": 605119,
            "fullName": "Brian Anderson"
          },
          "originalTeam": {
            "id": 158,
            "name": "Milwaukee Brewers"
          },
          "newTeam": [],
          "dateDeclared": "2023-10-03",
          "position": {
            "code": "5",
            "name": "Third Base",
            "type": "Infielder",
            "abbreviation": "3B"
          }
        },
        { ... }
      ]
    }
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/free-agents

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
seasonId required integer

Season as a four-digit year (YYYY). Optional in practice: without it, MLB's default season is used. Example: 2023

GET /v1/schedule

requires authentication

Returns the MLB games scheduled on one date, with teams, status, and scores. The body lists the games and adds an events key for non-game events that day; meta carries the date and the total events, games, and games in progress.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/schedule'
params = {
  'date': '2021-07-30',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/schedule';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'date' => '2021-07-30',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/schedule"
);

const params = {
    "date": "2021-07-30",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/schedule?date=2021-07-30" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com",
      "date": "2021-07-30",
      "totalEvents": 0,
      "totalGames": 15,
      "totalGamesInProgress": 0
    },
    "body": {
      "0": {
        "gamePk": 633094,
        "gameGuid": "cedf2489-1963-4910-b66a-ea0f2d0206d3",
        "gameType": "R",
        "season": "2021",
        "gameDate": "2021-07-30T23:05:00Z",
        "officialDate": "2021-07-30",
        "status": {
          "abstractGameState": "Final",
          "codedGameState": "F",
          "detailedState": "Final",
          "statusCode": "F",
          "startTimeTBD": false,
          "abstractGameCode": "F"
        },
        "teams": {
          "away": {
            "leagueRecord": {
              "wins": 50,
              "losses": 55,
              "pct": ".476"
            },
            "score": 3,
            "team": {
              "id": 112,
              "name": "Chicago Cubs"
            },
            "isWinner": false,
            "splitSquad": false,
            "seriesNumber": 34
          },
          "home": {
            "leagueRecord": {
              "wins": 48,
              "losses": 55,
              "pct": ".466"
            },
            "score": 4,
            "team": {
              "id": 120,
              "name": "Washington Nationals"
            },
            "isWinner": true,
            "splitSquad": false,
            "seriesNumber": 34
          }
        },
        "venue": {
          "id": 3309,
          "name": "Nationals Park"
        },
        "content": [],
        "isTie": false,
        "gameNumber": 1,
        "publicFacing": true,
        "doubleHeader": "N",
        "gamedayType": "P",
        "tiebreaker": "N",
        "calendarEventID": "14-633094-2021-07-30",
        "seasonDisplay": "2021",
        "dayNight": "night",
        "scheduledInnings": 9,
        "reverseHomeAwayStatus": false,
        "inningBreakLength": 120,
        "gamesInSeries": 3,
        "seriesGameNumber": 1,
        "seriesDescription": "Regular Season",
        "recordSource": "S",
        "ifNecessary": "N",
        "ifNecessaryDescription": "Normal Game"
      },
      { .. },

      "events": []
    }
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/schedule

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
date required string

Date in YYYY-MM-DD format. Optional in practice: without it, MLB's default (today's schedule) is returned. Example: 2021-07-30

Teams

Team details, history, coaching staff, affiliates, and rosters. Each endpoint takes an MLB team ID from the teams endpoint (for example, 145 for the Chicago White Sox).

GET /v1/teams

requires authentication

Returns MLB team details: name, abbreviation, venue, league, division, and first year of play. Pass teamId for one team, or leave it out to list every MLB team.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/teams'
params = {
  'teamId': '4164',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/teams';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'teamId' => '4164',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/teams"
);

const params = {
    "teamId": "4164",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/teams?teamId=4164" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": [
      {
        "springLeague": {
          "id": 114,
          "name": "Cactus League",
          "abbreviation": "CL"
        },
        "allStarStatus": "N",
        "id": 133,
        "name": "Oakland Athletics",
        "season": 2023,
        "venue": {
          "id": 10,
          "name": "Oakland Coliseum"
        },
        "springVenue": {
          "id": 2507
        },
        "teamCode": "oak",
        "fileCode": "oak",
        "abbreviation": "OAK",
        "teamName": "Athletics",
        "locationName": "Oakland",
        "firstYearOfPlay": "1901",
        "league": {
          "id": 103,
          "name": "American League"
        },
        "division": {
          "id": 200,
          "name": "American League West"
        },
        "sport": {
          "id": 1,
          "name": "Major League Baseball"
        },
        "shortName": "Oakland",
        "franchiseName": "Oakland",
        "clubName": "Athletics",
        "active": true
      },
      { ... }
    ]
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/teams

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
teamId required integer

MLB team ID. Optional in practice: without it, all MLB teams are returned. Example: 4164

GET /v1/teams-history

requires authentication

Returns a team's historical records by season: names, abbreviations, venues, leagues, and first year of play.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/teams-history'
params = {
  'teamIds': '145',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/teams-history';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'teamIds' => '145',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/teams-history"
);

const params = {
    "teamIds": "145",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/teams-history?teamIds=145" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
        "version": "v1.0",
        "status": 200,
        "copywrite": "https://steadyapi.com"
    },
    "body": [
        {
            "allStarStatus": "N",
            "id": 149,
            "name": "Middletown Mansfields",
            "season": 1872,
            "venue": {
                "id": 401,
                "name": "TBD"
            },
            "teamCode": "mid",
            "fileCode": "t149",
            "abbreviation": "MID",
            "teamName": "Mansfields",
            "firstYearOfPlay": "1872",
            "league": {
                "id": 102,
                "name": "National Association"
            },
            "sport": {
                "id": 6,
                "name": "Historical Professional League"
            },
            "shortName": "Middletown",
            "franchiseName": "Middletown",
            "clubName": "Mansfields",
            "active": false
        }
    ]
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/teams-history

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
teamIds required integer

One MLB team ID. Example: 145

GET /v1/teams-coaches

requires authentication

Returns a team's coaching staff: each coach's name, ID, jersey number, and job title (manager, bench coach, and so on).

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/teams-coaches'
params = {
  'teamIds': '145',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/teams-coaches';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'teamIds' => '145',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/teams-coaches"
);

const params = {
    "teamIds": "145",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/teams-coaches?teamIds=145" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": {
      "roster": [
        {
          "person": {
            "id": 437073,
            "fullName": "Pedro Grifol"
          },
          "jerseyNumber": "5",
          "job": "Manager",
          "jobId": "MNGR",
          "title": "Manager"
        },
        {
          "person": {
            "id": 119271,
            "fullName": "Charlie Montoyo"
          },
          "jerseyNumber": "75",
          "job": "Bench Coach",
          "jobId": "COAB",
          "title": "Bench Coach"
        },
        { ... }
      ],
      "teamId": 145,
      "rosterType": "coach"
    }
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/teams-coaches

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
teamIds required integer

One MLB team ID. Example: 145

GET /v1/teams-affiliates

requires authentication

Returns the team and its affiliated clubs, each with league, division, venue, and spring training details.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/teams-affiliates'
params = {
  'teamIds': '145',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/teams-affiliates';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'teamIds' => '145',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/teams-affiliates"
);

const params = {
    "teamIds": "145",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/teams-affiliates?teamIds=145" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": {
      "teams": [
        {
          "springLeague": {
            "id": 114,
            "name": "Cactus League",
            "abbreviation": "CL"
          },
          "allStarStatus": "N",
          "id": 145,
          "name": "Chicago White Sox",
          "season": 2023,
          "venue": {
            "id": 4,
            "name": "Guaranteed Rate Field"
          },
          "springVenue": {
            "id": 3809
          },
          "teamCode": "cha",
          "fileCode": "cws",
          "abbreviation": "CWS",
          "teamName": "White Sox",
          "locationName": "Chicago",
          "firstYearOfPlay": "1901",
          "league": {
            "id": 103,
            "name": "American League"
          },
          "division": {
            "id": 202,
            "name": "American League Central"
          },
          "sport": {
            "id": 1,
            "name": "Major League Baseball"
          },
          "shortName": "Chi White Sox",
          "franchiseName": "Chicago",
          "clubName": "White Sox",
          "active": true
        },
        { ... }
      ]
    }
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/teams-affiliates

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
teamIds required integer

One MLB team ID. Example: 145

GET /v1/teams-roster

requires authentication

Returns the team's roster as MLB serves it by default: each player's ID, name, jersey number, position, and roster status.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/teams-roster'
params = {
  'teamIds': '145',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/teams-roster';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'teamIds' => '145',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/teams-roster"
);

const params = {
    "teamIds": "145",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/teams-roster?teamIds=145" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": {
      "roster": [
        {
          "person": {
            "id": 607481,
            "fullName": "Aaron Bummer"
          },
          "jerseyNumber": "39",
          "position": {
            "code": "1",
            "name": "Pitcher",
            "type": "Pitcher",
            "abbreviation": "P"
          },
          "status": {
            "code": "A",
            "description": "Active"
          },
          "parentTeamId": 145
        },
        {
          "person": {
            "id": 656514,
            "fullName": "Adam Haseley"
          },
          "jerseyNumber": "51",
          "position": {
            "code": "9",
            "name": "Outfielder",
            "type": "Outfielder",
            "abbreviation": "RF"
          },
          "status": {
            "code": "A",
            "description": "Active"
          },
          "parentTeamId": 145
        },
        {
          "person": {
            "id": 666208,
            "fullName": "Alex Speas"
          },
          "jerseyNumber": "",
          "position": {
            "code": "1",
            "name": "Pitcher",
            "type": "Pitcher",
            "abbreviation": "P"
          },
          "status": {
            "code": "A",
            "description": "Active"
          },
          "parentTeamId": 145
        },
        { ... }
      ],
      "teamId": 145,
      "rosterType": "active"
    }
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/teams-roster

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
teamIds required integer

One MLB team ID. Example: 145

Games

Data for one game: game info, box score, play-by-play, win probability, context metrics, and feed timestamps. Each endpoint takes the game ID (gamePk) from the schedule endpoint.

GET /v1/games

requires authentication

Returns the game data section of MLB's live game feed: teams, players, venue, weather, status, probable pitchers, and officials. Meta carries the feed's timestamp and the latest game events.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/games'
params = {
  'gamePk': '633282',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/games';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'gamePk' => '633282',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/games"
);

const params = {
    "gamePk": "633282",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/games?gamePk=633282" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
  "meta": {
    "version": "v1.0",
    "status": 200,
    "copywrite": "https://steadyapi.com",
    "wait": 10,
    "timeStamp": "20210711_205415",
    "gameEvents": [
      "field_out",
      "game_finished"
    ],
    "logicalEvents": [
      "midInning",
      "countChange",
      "count10",
      "newLeftHandedHit",
      "basesEmpty",
      "gameStateChangeToGameOver"
    ]
  },
  "body": {
    "game": {
      "pk": 633282,
      "type": "R",
      "doubleHeader": "N",
      "id": "2021/07/11/chamlb-balmlb-1",
      "gamedayType": "P",
      "tiebreaker": "N",
      "gameNumber": 1,
      "calendarEventID": "14-633282-2021-07-11",
      "season": "2021",
      "seasonDisplay": "2021"
    },
    "datetime": {
      {...}
    },
    "status": {
      {...}
    },
    "teams": {
      {...}
    },
    "players": {
      {...}
    },
    "venue": {
      {...}
    },
    "officialVenue": {
      {...}
    },
    "weather": {
      {...}
    },
    "gameInfo": {
      {...}
    },
    "review": {
      {...}
    },
    "flags": {
      {...}
    },
    "alerts": [],
    "probablePitchers": {
      {...}
    },
    "officialScorer": {
      {...}
    },
    "primaryDatacaster": {
      {...}
    },
    "moundVisits": {
      {...}
    }
  }
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/games

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
gamePk required string

MLB game ID (gamePk), an integer from the schedule endpoint. Example: 633282

GET /v1/games-boxscore

requires authentication

Returns the box score for both teams, under away and home: team batting, pitching, and fielding totals, each player's game stats, and the batting order and pitchers used.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/games-boxscore'
params = {
  'gamePk': '633282',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/games-boxscore';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'gamePk' => '633282',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/games-boxscore"
);

const params = {
    "gamePk": "633282",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/games-boxscore?gamePk=633282" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": {
      "away": {
        "team": {
          "springLeague": {
            "id": 114,
            "name": "Cactus League",
            "abbreviation": "CL"
          },
          "allStarStatus": "N",
          "id": 145,
          "name": "Chicago White Sox",
          "season": 2021,
          "venue": {
            "id": 4,
            "name": "Guaranteed Rate Field"
          },
          "springVenue": {
            "id": 3809
          },
          "teamCode": "cha",
          "fileCode": "cws",
          "abbreviation": "CWS",
          "teamName": "White Sox",
          "locationName": "Chicago",
          "firstYearOfPlay": "1901",
          "league": {
            "id": 103,
            "name": "American League"
          },
          "division": {
            "id": 202,
            "name": "American League Central"
          },
          "sport": {
            "id": 1,
            "name": "Major League Baseball"
          },
          "shortName": "Chi White Sox",
          "record": {
            "gamesPlayed": 89,
            "wildCardGamesBack": "-",
            "leagueGamesBack": "-",
            "springLeagueGamesBack": "-",
            "sportGamesBack": "-",
            "divisionGamesBack": "-",
            "conferenceGamesBack": "-",
            "leagueRecord": {
              "wins": 54,
              "losses": 35,
              "ties": 0,
              "pct": ".607"
            },
            "records": [],
            "divisionLeader": false,
            "wins": 54,
            "losses": 35,
            "winningPercentage": ".607"
          },
          "franchiseName": "Chicago",
          "clubName": "White Sox",
          "active": true
        },
        "teamStats": {
          "batting": {
            "flyOuts": 4,
            "groundOuts": 7,
            "runs": 7,
            "doubles": 1,
            "triples": 0,
            "homeRuns": 3,
            "strikeOuts": 11,
            "baseOnBalls": 5,
            "intentionalWalks": 0,
            "hits": 8,
            "hitByPitch": 1,
            "avg": ".257",
            "atBats": 35,
            "obp": ".341",
            "slg": ".417",
            "ops": ".758",
            "caughtStealing": 1,
            "stolenBases": 0,
            "stolenBasePercentage": ".000",
            "groundIntoDoublePlay": 0,
            "groundIntoTriplePlay": 0,
            "plateAppearances": 42,
            "totalBases": 18,
            "rbi": 7,
            "leftOnBase": 13,
            "sacBunts": 1,
            "sacFlies": 0,
            "catchersInterference": 0,
            "pickoffs": 1,
            "atBatsPerHomeRun": "11.67"
          },
          "pitching": {
            "groundOuts": 0,
            "airOuts": 0,
            "runs": 5,
            "doubles": 0,
            "triples": 0,
            "homeRuns": 2,
            "strikeOuts": 14,
            "baseOnBalls": 4,
            "intentionalWalks": 0,
            "hits": 5,
            "hitByPitch": 1,
            "atBats": 34,
            "obp": ".250",
            "caughtStealing": 0,
            "stolenBases": 1,
            "stolenBasePercentage": "1.000",
            "numberOfPitches": 167,
            "era": "3.58",
            "inningsPitched": "10.0",
            "saveOpportunities": 0,
            "earnedRuns": 4,
            "whip": "1.21",
            "battersFaced": 40,
            "outs": 30,
            "completeGames": 0,
            "shutouts": 0,
            "pitchesThrown": 167,
            "balls": 60,
            "strikes": 107,
            "strikePercentage": ".640",
            "hitBatsmen": 1,
            "balks": 0,
            "wildPitches": 2,
            "pickoffs": 0,
            "groundOutsToAirouts": "-.--",
            "rbi": 5,
            "pitchesPerInning": "16.70",
            "runsScoredPer9": "4.50",
            "homeRunsPer9": "1.80",
            "inheritedRunners": 0,
            "inheritedRunnersScored": 0,
            "catchersInterference": 0,
            "sacBunts": 0,
            "sacFlies": 1,
            "passedBall": 0
          },
          "fielding": {
            "caughtStealing": 0,
            "stolenBases": 1,
            "stolenBasePercentage": "1.000",
            "assists": 6,
            "putOuts": 30,
            "errors": 1,
            "chances": 37,
            "passedBall": 0,
            "pickoffs": 0
          }
        },
        "players": {
          "ID621114": {
            "person": {
              "id": 621114,
              "fullName": "Ryan Burr"
            },
            "jerseyNumber": "61",
            "position": {
              "code": "1",
              "name": "Pitcher",
              "type": "Pitcher",
              "abbreviation": "P"
            },
            "status": {
              "code": "A",
              "description": "Active"
            },
            "parentTeamId": 145,
            "stats": {
              "batting": [],
              "pitching": [],
              "fielding": []
            },
            "seasonStats": {
              "batting": {
                "gamesPlayed": 2,
                "flyOuts": 0,
                "groundOuts": 0,
                "runs": 0,
                "doubles": 0,
                "triples": 0,
                "homeRuns": 0,
                "strikeOuts": 0,
                "baseOnBalls": 0,
                "intentionalWalks": 0,
                "hits": 0,
                "hitByPitch": 0,
                "avg": ".000",
                "atBats": 0,
                "obp": ".000",
                "slg": ".000",
                "ops": ".000",
                "caughtStealing": 0,
                "stolenBases": 0,
                "stolenBasePercentage": ".---",
                "groundIntoDoublePlay": 0,
                "groundIntoTriplePlay": 0,
                "plateAppearances": 0,
                "totalBases": 0,
                "rbi": 0,
                "leftOnBase": 0,
                "sacBunts": 0,
                "sacFlies": 0,
                "babip": ".---",
                "catchersInterference": 0,
                "pickoffs": 0,
                "atBatsPerHomeRun": "-.--"
              },
              "pitching": {
                "gamesPlayed": 14,
                "gamesStarted": 1,
                "groundOuts": 19,
                "airOuts": 15,
                "runs": 2,
                "doubles": 1,
                "triples": 0,
                "homeRuns": 1,
                "strikeOuts": 14,
                "baseOnBalls": 8,
                "intentionalWalks": 0,
                "hits": 5,
                "hitByPitch": 0,
                "atBats": 52,
                "obp": ".217",
                "caughtStealing": 0,
                "stolenBases": 1,
                "stolenBasePercentage": "1.000",
                "numberOfPitches": 262,
                "era": "1.08",
                "inningsPitched": "16.2",
                "wins": 1,
                "losses": 0,
                "saves": 0,
                "saveOpportunities": 0,
                "holds": 2,
                "blownSaves": 0,
                "earnedRuns": 2,
                "whip": "0.78",
                "battersFaced": 61,
                "outs": 50,
                "gamesPitched": 14,
                "completeGames": 0,
                "shutouts": 0,
                "pitchesThrown": 262,
                "balls": 104,
                "strikes": 158,
                "strikePercentage": ".600",
                "hitBatsmen": 0,
                "balks": 0,
                "wildPitches": 4,
                "pickoffs": 0,
                "groundOutsToAirouts": "1.27",
                "rbi": 0,
                "winPercentage": "1.000",
                "pitchesPerInning": "15.72",
                "gamesFinished": 3,
                "strikeoutWalkRatio": "1.75",
                "strikeoutsPer9Inn": "7.56",
                "walksPer9Inn": "4.32",
                "hitsPer9Inn": "2.70",
                "runsScoredPer9": "1.08",
                "homeRunsPer9": "0.54",
                "inheritedRunners": 6,
                "inheritedRunnersScored": 2,
                "catchersInterference": 0,
                "sacBunts": 1,
                "sacFlies": 0,
                "passedBall": 0
              },
              "fielding": {
                "caughtStealing": 0,
                "stolenBases": 0,
                "stolenBasePercentage": ".---",
                "assists": 1,
                "putOuts": 2,
                "errors": 0,
                "chances": 3,
                "fielding": "1.000",
                "passedBall": 0,
                "pickoffs": 0
              }
            },
            "gameStatus": {
              "isCurrentBatter": false,
              "isCurrentPitcher": false,
              "isOnBench": true,
              "isSubstitute": false
            }
          },
          { ... },
        },
        "batters": [
          641313,
          660162,
          547989,
          571718,
          641553,
          544725,
          683734,
          657757,
          571740,
          664874,
          656302,
          656629,
          676051,
          676979,
          521230,
          614179,
          641582
        ],
        "pitchers": [
          656302,
          656629,
          676051,
          676979,
          521230,
          614179,
          641582
        ],
        "bench": [
          669394,
          641470,
          664901
        ],
        "bullpen": [
          621114,
          605240,
          608337,
          572971,
          458681,
          607074
        ],
        "battingOrder": [
          641313,
          660162,
          547989,
          571718,
          641553,
          544725,
          683734,
          571740,
          664874
        ],
        "info": [
          {
            "title": "BATTING",
            "fieldList": [
              {
                "label": "2B",
                "value": "Zavala (2, Watkins)."
              },
              {
                "label": "HR",
                "value": "Vaughn 2 (10, 4th inning off Watkins, 0 on, 2 out, 6th inning off Sulser, 2 on, 1 out); Engel (5, 10th inning off Wells, T, 2 on, 2 out)."
              },
              {
                "label": "TB",
                "value": "Abreu, J; Anderson, Ti; Engel 5; García; Vaughn 8; Zavala 2."
              },
              {
                "label": "RBI",
                "value": "Engel 3 (11); Vaughn 4 (26)."
              },
              {
                "label": "2-out RBI",
                "value": "Engel 3; Vaughn."
              },
              {
                "label": "Runners left in scoring position, 2 out",
                "value": "Goodwin 2."
              },
              {
                "label": "SAC",
                "value": "García."
              },
              {
                "label": "Team RISP",
                "value": "2-for-7."
              },
              {
                "label": "Team LOB",
                "value": "6."
              }
            ]
          },
          {
            "title": "BASERUNNING",
            "fieldList": [
              {
                "label": "CS",
                "value": "Engel (1, 3rd base by Watkins/Severino)."
              },
              {
                "label": "PO",
                "value": "Engel (2nd base by Watkins)."
              }
            ]
          },
          {
            "title": "FIELDING",
            "fieldList": [
              {
                "label": "E",
                "value": "Zavala (1, throw)."
              }
            ]
          }
        ],
        "note": []
      },
      "home": {
        "team": {
          "springLeague": {
            "id": 115,
            "name": "Grapefruit League",
            "abbreviation": "GL"
          },
          "allStarStatus": "N",
          "id": 110,
          "name": "Baltimore Orioles",
          "season": 2021,
          "venue": {
            "id": 2,
            "name": "Oriole Park at Camden Yards"
          },
          "springVenue": {
            "id": 2508
          },
          "teamCode": "bal",
          "fileCode": "bal",
          "abbreviation": "BAL",
          "teamName": "Orioles",
          "locationName": "Baltimore",
          "firstYearOfPlay": "1901",
          "league": {
            "id": 103,
            "name": "American League"
          },
          "division": {
            "id": 201,
            "name": "American League East"
          },
          "sport": {
            "id": 1,
            "name": "Major League Baseball"
          },
          "shortName": "Baltimore",
          "record": {
            "gamesPlayed": 89,
            "wildCardGamesBack": "-",
            "leagueGamesBack": "-",
            "springLeagueGamesBack": "-",
            "sportGamesBack": "-",
            "divisionGamesBack": "-",
            "conferenceGamesBack": "-",
            "leagueRecord": {
              "wins": 28,
              "losses": 61,
              "ties": 0,
              "pct": ".315"
            },
            "records": [],
            "divisionLeader": false,
            "wins": 28,
            "losses": 61,
            "winningPercentage": ".315"
          },
          "franchiseName": "Baltimore",
          "clubName": "Orioles",
          "active": true
        },
        { ... }
      }
    }
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/games-boxscore

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
gamePk required string

MLB game ID (gamePk), an integer from the schedule endpoint. Example: 633282

GET /v1/games-playbyplay

requires authentication

Returns every play in the game in order. Each play has its result and description, inning, count, batter and pitcher matchup, runners, and the pitch-by-pitch events.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/games-playbyplay'
params = {
  'gamePk': '633282',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/games-playbyplay';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'gamePk' => '633282',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/games-playbyplay"
);

const params = {
    "gamePk": "633282",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/games-playbyplay?gamePk=633282" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": [
      {
        "result": {
          "type": "atBat",
          "event": "Flyout",
          "eventType": "field_out",
          "description": "Tim Anderson flies out to right fielder Austin Hays.",
          "rbi": 0,
          "awayScore": 0,
          "homeScore": 0,
          "isOut": true
        },
        "about": {
          "atBatIndex": 0,
          "halfInning": "top",
          "isTopInning": true,
          "inning": 1,
          "startTime": "2021-07-11T17:06:43.879Z",
          "endTime": "2021-07-11T17:07:08.386Z",
          "isComplete": true,
          "isScoringPlay": false,
          "hasReview": false,
          "hasOut": true,
          "captivatingIndex": 0
        },
        "count": {
          "balls": 1,
          "strikes": 0,
          "outs": 1
        },
        "matchup": {
          "batter": {
            "id": 641313,
            "fullName": "Tim Anderson"
          },
          "batSide": {
            "code": "R",
            "description": "Right"
          },
          "pitcher": {
            "id": 657093,
            "fullName": "Spenser Watkins"
          },
          "pitchHand": {
            "code": "R",
            "description": "Right"
          },
          "batterHotColdZones": [],
          "pitcherHotColdZones": [],
          "splits": {
            "batter": "vs_RHP",
            "pitcher": "vs_RHB",
            "menOnBase": "Empty"
          }
        },
        "pitchIndex": [
          3,
          4
        ],
        "actionIndex": [
          0,
          1,
          2
        ],
        "runnerIndex": [
          0
        ],
        "runners": [
          {
            "movement": {
              "originBase": null,
              "start": null,
              "end": null,
              "outBase": "1B",
              "isOut": true,
              "outNumber": 1
            },
            "details": {
              "event": "Flyout",
              "eventType": "field_out",
              "movementReason": null,
              "runner": {
                "id": 641313,
                "fullName": "Tim Anderson"
              },
              "responsiblePitcher": null,
              "isScoringEvent": false,
              "rbi": false,
              "earned": false,
              "teamUnearned": false,
              "playIndex": 4
            },
            "credits": [
              {
                "player": {
                  "id": 669720
                },
                "position": {
                  "code": "9",
                  "name": "Outfielder",
                  "type": "Outfielder",
                  "abbreviation": "RF"
                },
                "credit": "f_putout"
              }
            ]
          }
        ],
        "playEvents": [
          {
            "details": {
              "description": "Status Change - Pre-Game",
              "event": "Game Advisory",
              "eventType": "game_advisory",
              "awayScore": 0,
              "homeScore": 0,
              "isScoringPlay": false,
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "index": 0,
            "startTime": "2021-07-11T15:44:37.970Z",
            "endTime": "2021-07-11T16:44:02.445Z",
            "isPitch": false,
            "type": "action",
            "player": {
              "id": 641313
            }
          },
          {
            "details": {
              "description": "Status Change - Warmup",
              "event": "Game Advisory",
              "eventType": "game_advisory",
              "awayScore": 0,
              "homeScore": 0,
              "isScoringPlay": false,
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "index": 1,
            "startTime": "2021-07-11T16:44:02.445Z",
            "endTime": "2021-07-11T17:05:06.480Z",
            "isPitch": false,
            "type": "action",
            "player": {
              "id": 641313
            }
          },
          {
            "details": {
              "description": "Status Change - In Progress",
              "event": "Game Advisory",
              "eventType": "game_advisory",
              "awayScore": 0,
              "homeScore": 0,
              "isScoringPlay": false,
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "index": 2,
            "startTime": "2021-07-11T17:05:06.480Z",
            "endTime": "2021-07-11T17:06:46.187Z",
            "isPitch": false,
            "type": "action",
            "player": {
              "id": 641313
            }
          },
          {
            "details": {
              "call": {
                "code": "B",
                "description": "Ball"
              },
              "description": "Ball",
              "code": "B",
              "ballColor": "rgba(39, 161, 39, 1.0)",
              "trailColor": "rgba(188, 0, 33, 1.0)",
              "isInPlay": false,
              "isStrike": false,
              "isBall": true,
              "type": {
                "code": "FF",
                "description": "Four-Seam Fastball"
              },
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 1,
              "strikes": 0,
              "outs": 0
            },
            "pitchData": {
              "startSpeed": 91.2,
              "endSpeed": 83,
              "strikeZoneTop": 3.40999999999662,
              "strikeZoneBottom": 1.5949440880005,
              "coordinates": {
                "aY": 29.99485647835065,
                "aZ": -14.188669282525067,
                "pfxX": -0.23275926979375328,
                "pfxZ": 10.119957913784841,
                "pX": -0.8404390482023597,
                "pZ": 3.5539286414226545,
                "vX0": 0.23585784006349836,
                "vY0": -132.84404166305208,
                "vZ0": -4.391249208564353,
                "x": 149.04,
                "y": 142.82,
                "x0": -0.900379505009517,
                "y0": 50.00158299770269,
                "z0": 6.2688366315464625,
                "aX": -0.4136018115942549
              },
              "breaks": {
                "breakAngle": 1.2,
                "breakLength": 3.6,
                "breakY": 24,
                "breakVertical": -15.5,
                "breakVerticalInduced": 17.5,
                "breakHorizontal": 0.4,
                "spinRate": 2176,
                "spinDirection": 188
              },
              "zone": 11,
              "typeConfidence": 0.92,
              "plateTime": 0.4132325218665098,
              "extension": 6.385069523352935
            },
            "index": 3,
            "playId": "87340bd5-da0a-4ca0-9ece-17adb65967b8",
            "pitchNumber": 1,
            "startTime": "2021-07-11T17:06:46.187Z",
            "endTime": "2021-07-11T17:06:50.197Z",
            "isPitch": true,
            "type": "pitch"
          },
          {
            "details": {
              "call": {
                "code": "X",
                "description": "In play, out(s)"
              },
              "description": "In play, out(s)",
              "code": "X",
              "ballColor": "rgba(26, 86, 190, 1.0)",
              "trailColor": "rgba(188, 0, 33, 1.0)",
              "isInPlay": true,
              "isStrike": false,
              "isBall": false,
              "type": {
                "code": "FF",
                "description": "Four-Seam Fastball"
              },
              "isOut": true,
              "hasReview": false
            },
            "count": {
              "balls": 1,
              "strikes": 0,
              "outs": 0
            },
            "pitchData": {
              "startSpeed": 91.6,
              "endSpeed": 82.9,
              "strikeZoneTop": 3.411,
              "strikeZoneBottom": 1.565,
              "coordinates": {
                "aY": 31.674777114213374,
                "aZ": -13.747835784020623,
                "pfxX": -0.3926811158439465,
                "pfxZ": 10.38313783739772,
                "pX": -0.4738551978738176,
                "pZ": 2.535457568165602,
                "vX0": 1.211448304759197,
                "vY0": -133.1441610441423,
                "vZ0": -6.912802115526949,
                "x": 135.06,
                "y": 170.32,
                "x0": -0.8860750373551041,
                "y0": 50.00458439281981,
                "z0": 6.1829605164761166,
                "aX": -0.6971762080581045
              },
              "breaks": {
                "breakAngle": 1.2,
                "breakLength": 3.6,
                "breakY": 24,
                "breakVertical": -15.6,
                "breakVerticalInduced": 17.3,
                "breakHorizontal": 0.4,
                "spinRate": 2178,
                "spinDirection": 189
              },
              "zone": 4,
              "typeConfidence": 0.93,
              "plateTime": 0.41322251347201533,
              "extension": 6.394053303916425
            },
            "hitData": {
              "launchSpeed": 93.5,
              "launchAngle": 36,
              "totalDistance": 325,
              "trajectory": "fly_ball",
              "hardness": "medium",
              "location": "9",
              "coordinates": {
                "coordX": 181.16,
                "coordY": 80.51
              }
            },
            "index": 4,
            "playId": "445c6e78-ce7e-4a48-8b12-0aa974317530",
            "pitchNumber": 2,
            "startTime": "2021-07-11T17:07:00.736Z",
            "endTime": "2021-07-11T17:07:08.386Z",
            "isPitch": true,
            "type": "pitch"
          }
        ],
        "playEndTime": "2021-07-11T17:07:08.386Z",
        "atBatIndex": 0
      },
      { ... }

    ]
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/games-playbyplay

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
gamePk required string

MLB game ID (gamePk), an integer from the schedule endpoint. Example: 633282

GET /v1/games-matrix

requires authentication

Returns the game's context metrics: a game summary (status, teams, score) with the current home and away win probability and the sacrifice-fly probability to left, center, and right field.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/games-matrix'
params = {
  'gamePk': '633282',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/games-matrix';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'gamePk' => '633282',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/games-matrix"
);

const params = {
    "gamePk": "633282",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/games-matrix?gamePk=633282" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
        "version": "v1.0",
        "status": 200,
        "copywrite": "https://steadyapi.com"
    },
    "body": {
        "game": {
            "gamePk": 633282,
            "gameGuid": "151b2de5-9939-4305-849c-41b8a806d5a1",
            "gameType": "R",
            "season": "2021",
            "gameDate": "2021-07-11T17:05:00Z",
            "officialDate": "2021-07-11",
            "status": {
                "abstractGameState": "Final",
                "codedGameState": "F",
                "detailedState": "Final",
                "statusCode": "F",
                "startTimeTBD": false,
                "abstractGameCode": "F"
            },
            "teams": {
                "away": {
                    "leagueRecord": {
                        "wins": 54,
                        "losses": 35,
                        "pct": ".607"
                    },
                    "score": 7,
                    "team": {
                        "id": 145,
                        "name": "Chicago White Sox"
                    },
                    "isWinner": true,
                    "probablePitcher": {
                        "id": 656302,
                        "fullName": "Dylan Cease"
                    },
                    "splitSquad": false,
                    "seriesNumber": 29
                },
                "home": {
                    "leagueRecord": {
                        "wins": 28,
                        "losses": 61,
                        "pct": ".315"
                    },
                    "score": 5,
                    "team": {
                        "id": 110,
                        "name": "Baltimore Orioles"
                    },
                    "isWinner": false,
                    "probablePitcher": {
                        "id": 657093,
                        "fullName": "Spenser Watkins"
                    },
                    "splitSquad": false,
                    "seriesNumber": 29
                }
            },
            "venue": {
                "id": 2,
                "name": "Oriole Park at Camden Yards"
            },
            "content": [],
            "isTie": false,
            "gameNumber": 1,
            "publicFacing": true,
            "doubleHeader": "N",
            "gamedayType": "P",
            "tiebreaker": "N",
            "calendarEventID": "14-633282-2021-07-11",
            "seasonDisplay": "2021",
            "dayNight": "day",
            "scheduledInnings": 9,
            "reverseHomeAwayStatus": false,
            "inningBreakLength": 120,
            "gamesInSeries": 3,
            "seriesGameNumber": 3,
            "seriesDescription": "Regular Season",
            "recordSource": "S",
            "ifNecessary": "N",
            "ifNecessaryDescription": "Normal Game",
            "gameId": "2021/07/11/chamlb-balmlb-1"
        },
        "leftFieldSacFlyProbability": [],
        "centerFieldSacFlyProbability": [],
        "rightFieldSacFlyProbability": [],
        "awayWinProbability": 100,
        "homeWinProbability": 0
    }
}
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/games-matrix

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
gamePk required string

MLB game ID (gamePk), an integer from the schedule endpoint. Example: 633282

GET /v1/games-timestamps

requires authentication

Returns the list of timecodes at which MLB's live feed for the game was updated, in YYYYMMDD_HHMMSS format.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/games-timestamps'
params = {
  'gamePk': '633282',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/games-timestamps';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'gamePk' => '633282',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/games-timestamps"
);

const params = {
    "gamePk": "633282",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/games-timestamps?gamePk=633282" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": [
      "20210711_154437",
      "20210711_164402",
      "20210711_170506",
      "20210711_170643",
      "20210711_170646",
      "20210711_170700",
      "20210711_170708",
      "20210711_170713",
      "20210711_170737",
      ...
    ]
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/games-timestamps

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
gamePk required string

MLB game ID (gamePk), an integer from the schedule endpoint. Example: 633282

GET /v1/games-probability

requires authentication

Returns win probability play by play: each plate appearance with its result, inning, and count, plus the home and away win probability after the play and the probability added.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/games-probability'
params = {
  'gamePk': '633282',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/games-probability';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'gamePk' => '633282',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/games-probability"
);

const params = {
    "gamePk": "633282",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/games-probability?gamePk=633282" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com"
    },
    "body": [
      {
        "result": {
          "type": "atBat",
          "event": "Flyout",
          "eventType": "field_out",
          "description": "Tim Anderson flies out to right fielder Austin Hays.",
          "rbi": 0,
          "awayScore": 0,
          "homeScore": 0,
          "isOut": true
        },
        "about": {
          "atBatIndex": 0,
          "halfInning": "top",
          "isTopInning": true,
          "inning": 1,
          "startTime": "2021-07-11T17:06:43.879Z",
          "endTime": "2021-07-11T17:07:08.386Z",
          "isComplete": true,
          "isScoringPlay": false,
          "hasReview": false,
          "hasOut": true,
          "captivatingIndex": 0
        },
        "count": {
          "balls": 1,
          "strikes": 0,
          "outs": 1
        },
        "matchup": {
          "batter": {
            "id": 641313,
            "fullName": "Tim Anderson"
          },
          "batSide": {
            "code": "R",
            "description": "Right"
          },
          "pitcher": {
            "id": 657093,
            "fullName": "Spenser Watkins"
          },
          "pitchHand": {
            "code": "R",
            "description": "Right"
          },
          "batterHotColdZones": [],
          "pitcherHotColdZones": [],
          "splits": {
            "batter": "vs_RHP",
            "pitcher": "vs_RHB",
            "menOnBase": "Empty"
          }
        },
        "pitchIndex": [
          3,
          4
        ],
        "actionIndex": [
          0,
          1,
          2
        ],
        "runnerIndex": [
          0
        ],
        "runners": [
          {
            "movement": {
              "originBase": null,
              "start": null,
              "end": null,
              "outBase": "1B",
              "isOut": true,
              "outNumber": 1
            },
            "details": {
              "event": "Flyout",
              "eventType": "field_out",
              "movementReason": null,
              "runner": {
                "id": 641313,
                "fullName": "Tim Anderson"
              },
              "responsiblePitcher": null,
              "isScoringEvent": false,
              "rbi": false,
              "earned": false,
              "teamUnearned": false,
              "playIndex": 4
            },
            "credits": [
              {
                "player": {
                  "id": 669720
                },
                "position": {
                  "code": "9",
                  "name": "Outfielder",
                  "type": "Outfielder",
                  "abbreviation": "RF"
                },
                "credit": "f_putout"
              }
            ]
          }
        ],
        "playEvents": [
          {
            "details": {
              "description": "Status Change - Pre-Game",
              "event": "Game Advisory",
              "eventType": "game_advisory",
              "awayScore": 0,
              "homeScore": 0,
              "isScoringPlay": false,
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "preCount": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "index": 0,
            "startTime": "2021-07-11T15:44:37.970Z",
            "endTime": "2021-07-11T16:44:02.445Z",
            "isPitch": false,
            "type": "action",
            "player": {
              "id": 641313
            },
            "contextMetrics": []
          },
          {
            "details": {
              "description": "Status Change - Warmup",
              "event": "Game Advisory",
              "eventType": "game_advisory",
              "awayScore": 0,
              "homeScore": 0,
              "isScoringPlay": false,
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "preCount": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "index": 1,
            "startTime": "2021-07-11T16:44:02.445Z",
            "endTime": "2021-07-11T17:05:06.480Z",
            "isPitch": false,
            "type": "action",
            "player": {
              "id": 641313
            },
            "contextMetrics": []
          },
          {
            "details": {
              "description": "Status Change - In Progress",
              "event": "Game Advisory",
              "eventType": "game_advisory",
              "awayScore": 0,
              "homeScore": 0,
              "isScoringPlay": false,
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "preCount": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "index": 2,
            "startTime": "2021-07-11T17:05:06.480Z",
            "endTime": "2021-07-11T17:06:46.187Z",
            "isPitch": false,
            "type": "action",
            "player": {
              "id": 641313
            },
            "contextMetrics": []
          },
          {
            "details": {
              "call": {
                "code": "B",
                "description": "Ball"
              },
              "description": "Ball",
              "code": "B",
              "ballColor": "rgba(39, 161, 39, 1.0)",
              "trailColor": "rgba(188, 0, 33, 1.0)",
              "isInPlay": false,
              "isStrike": false,
              "isBall": true,
              "type": {
                "code": "FF",
                "description": "Four-Seam Fastball"
              },
              "isOut": false,
              "hasReview": false
            },
            "count": {
              "balls": 1,
              "strikes": 0,
              "outs": 0
            },
            "preCount": {
              "balls": 0,
              "strikes": 0,
              "outs": 0
            },
            "pitchData": {
              "startSpeed": 91.2,
              "endSpeed": 83,
              "strikeZoneTop": 3.40999999999662,
              "strikeZoneBottom": 1.5949440880005,
              "coordinates": {
                "aY": 29.99485647835065,
                "aZ": -14.188669282525067,
                "pfxX": -0.23275926979375328,
                "pfxZ": 10.119957913784841,
                "pX": -0.8404390482023597,
                "pZ": 3.5539286414226545,
                "vX0": 0.23585784006349836,
                "vY0": -132.84404166305208,
                "vZ0": -4.391249208564353,
                "x": 149.04,
                "y": 142.82,
                "x0": -0.900379505009517,
                "y0": 50.00158299770269,
                "z0": 6.2688366315464625,
                "aX": -0.4136018115942549
              },
              "breaks": {
                "breakAngle": 1.2,
                "breakLength": 3.6,
                "breakY": 24,
                "breakVertical": -15.5,
                "breakVerticalInduced": 17.5,
                "breakHorizontal": 0.4,
                "spinRate": 2176,
                "spinDirection": 188
              },
              "zone": 11,
              "typeConfidence": 0.92,
              "plateTime": 0.4132325218665098,
              "extension": 6.385069523352935
            },
            "index": 3,
            "playId": "87340bd5-da0a-4ca0-9ece-17adb65967b8",
            "pitchNumber": 1,
            "startTime": "2021-07-11T17:06:46.187Z",
            "endTime": "2021-07-11T17:06:50.197Z",
            "isPitch": true,
            "type": "pitch",
            "defense": {
              "pitcher": {
                "id": 657093,
                "pitchHand": {
                  "code": "R",
                  "description": "Right"
                }
              },
              "catcher": {
                "id": 600474
              },
              "first": {
                "id": 663624
              },
              "second": {
                "id": 642736
              },
              "third": {
                "id": 642721
              },
              "shortstop": {
                "id": 602104
              },
              "left": {
                "id": 663630
              },
              "center": {
                "id": 656775
              },
              "right": {
                "id": 669720
              }
            },
            "offense": {
              "batter": {
                "id": 641313,
                "batSide": {
                  "code": "R",
                  "description": "Right"
                }
              },
              "batterPosition": {
                "code": "6",
                "name": "Shortstop",
                "type": "Infielder",
                "abbreviation": "SS"
              }
            },
            "officials": [
              {
                "official": {
                  "id": 598411
                },
                "officialType": "Home Plate"
              },
              {
                "official": {
                  "id": 427235
                },
                "officialType": "First Base"
              },
              {
                "official": {
                  "id": 484499
                },
                "officialType": "Second Base"
              },
              {
                "official": {
                  "id": 483912
                },
                "officialType": "Third Base"
              }
            ],
            "contextMetrics": []
          },
          {
            "details": {
              "call": {
                "code": "X",
                "description": "In play, out(s)"
              },
              "description": "In play, out(s)",
              "code": "X",
              "ballColor": "rgba(26, 86, 190, 1.0)",
              "trailColor": "rgba(188, 0, 33, 1.0)",
              "isInPlay": true,
              "isStrike": false,
              "isBall": false,
              "type": {
                "code": "FF",
                "description": "Four-Seam Fastball"
              },
              "isOut": true,
              "hasReview": false
            },
            "count": {
              "balls": 1,
              "strikes": 0,
              "outs": 0
            },
            "preCount": {
              "balls": 1,
              "strikes": 0,
              "outs": 0
            },
            "pitchData": {
              "startSpeed": 91.6,
              "endSpeed": 82.9,
              "strikeZoneTop": 3.411,
              "strikeZoneBottom": 1.565,
              "coordinates": {
                "aY": 31.674777114213374,
                "aZ": -13.747835784020623,
                "pfxX": -0.3926811158439465,
                "pfxZ": 10.38313783739772,
                "pX": -0.4738551978738176,
                "pZ": 2.535457568165602,
                "vX0": 1.211448304759197,
                "vY0": -133.1441610441423,
                "vZ0": -6.912802115526949,
                "x": 135.06,
                "y": 170.32,
                "x0": -0.8860750373551041,
                "y0": 50.00458439281981,
                "z0": 6.1829605164761166,
                "aX": -0.6971762080581045
              },
              "breaks": {
                "breakAngle": 1.2,
                "breakLength": 3.6,
                "breakY": 24,
                "breakVertical": -15.6,
                "breakVerticalInduced": 17.3,
                "breakHorizontal": 0.4,
                "spinRate": 2178,
                "spinDirection": 189
              },
              "zone": 4,
              "typeConfidence": 0.93,
              "plateTime": 0.41322251347201533,
              "extension": 6.394053303916425
            },
            "hitData": {
              "launchSpeed": 93.5,
              "launchAngle": 36,
              "totalDistance": 325,
              "trajectory": "fly_ball",
              "hardness": "medium",
              "location": "9",
              "coordinates": {
                "coordX": 181.16,
                "coordY": 80.51
              }
            },
            "index": 4,
            "playId": "445c6e78-ce7e-4a48-8b12-0aa974317530",
            "pitchNumber": 2,
            "startTime": "2021-07-11T17:07:00.736Z",
            "endTime": "2021-07-11T17:07:08.386Z",
            "isPitch": true,
            "type": "pitch",
            "defense": {
              "pitcher": {
                "id": 657093,
                "pitchHand": {
                  "code": "R",
                  "description": "Right"
                }
              },
              "catcher": {
                "id": 600474
              },
              "first": {
                "id": 663624
              },
              "second": {
                "id": 642736
              },
              "third": {
                "id": 642721
              },
              "shortstop": {
                "id": 602104
              },
              "left": {
                "id": 663630
              },
              "center": {
                "id": 656775
              },
              "right": {
                "id": 669720
              }
            },
            "offense": {
              "batter": {
                "id": 641313,
                "batSide": {
                  "code": "R",
                  "description": "Right"
                }
              },
              "batterPosition": {
                "code": "6",
                "name": "Shortstop",
                "type": "Infielder",
                "abbreviation": "SS"
              }
            },
            "officials": [
              {
                "official": {
                  "id": 598411
                },
                "officialType": "Home Plate"
              },
              {
                "official": {
                  "id": 427235
                },
                "officialType": "First Base"
              },
              {
                "official": {
                  "id": 484499
                },
                "officialType": "Second Base"
              },
              {
                "official": {
                  "id": 483912
                },
                "officialType": "Third Base"
              }
            ],
            "contextMetrics": []
          }
        ],
        "credits": [
          {
            "player": {
              "id": 641313
            },
            "credit": "b_ab"
          },
          {
            "player": {
              "id": 657093
            },
            "credit": "p_ab"
          },
          {
            "player": {
              "id": 641313
            },
            "credit": "b_pa"
          },
          {
            "player": {
              "id": 657093
            },
            "credit": "p_pa"
          }
        ],
        "flags": [],
        "homeTeamWinProbability": 52.2,
        "awayTeamWinProbability": 47.8,
        "homeTeamWinProbabilityAdded": 2.200000000000003,
        "contextMetrics": [],
        "playEndTime": "2021-07-11T17:07:08.386Z",
        "atBatIndex": 0
      },
      { ... }
    ]
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/games-probability

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
gamePk required string

MLB game ID (gamePk), an integer from the schedule endpoint. Example: 633282

GET /v1/games-diffPatch

requires authentication

Returns the game data section of the live feed through MLB's diffPatch path. No start timecode is sent, so the body is the current game data rather than a diff, in the same shape as the games endpoint; meta carries the feed timestamp, game events, and logical events.

Example request:
import requests
import json

url = 'https://api.steadyapi.com/v1/mlb/games-diffPatch'
params = {
  'gamePk': '633282',
}
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
$client = new \GuzzleHttp\Client();
$url = 'https://api.steadyapi.com/v1/mlb/games-diffPatch';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_KEY',
        ],
        'query' => [
            'gamePk' => '633282',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://api.steadyapi.com/v1/mlb/games-diffPatch"
);

const params = {
    "gamePk": "633282",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
curl --request GET \
    --get "https://api.steadyapi.com/v1/mlb/games-diffPatch?gamePk=633282" \
    --header "Authorization: Bearer YOUR_API_KEY"

Example response (200, Success):


{
    "meta": {
      "version": "v1.0",
      "status": 200,
      "copywrite": "https://steadyapi.com",
      "wait": 10,
      "timeStamp": "20210711_205415",
      "gameEvents": [
        "field_out",
        "game_finished"
      ],
      "logicalEvents": [
        "midInning",
        "countChange",
        "count10",
        "newLeftHandedHit",
        "basesEmpty",
        "gameStateChangeToGameOver"
      ]
    },
    "body": {
      "game": {
        "pk": 633282,
        "type": "R",
        "doubleHeader": "N",
        "id": "2021/07/11/chamlb-balmlb-1",
        "gamedayType": "P",
        "tiebreaker": "N",
        "gameNumber": 1,
        "calendarEventID": "14-633282-2021-07-11",
        "season": "2021",
        "seasonDisplay": "2021"
      },
      "datetime": {
        "dateTime": "2021-07-11T17:05:00Z",
        "originalDate": "2021-07-11",
        "officialDate": "2021-07-11",
        "dayNight": "day",
        "time": "1:05",
        "ampm": "PM"
      },
      "status": {
        {...}
      },
      "teams": {
        {...}
      },
      "players": {
        {...}
      }
      "venue": {
        {...}
      },
      "officialVenue": {
        {...}
      },
      "weather": {
        {...}
      },
      "gameInfo": {
        {...}
      },
      "review": {
        {...}
      },
      "flags": {
        {...}
      },
      { ... }
    }
  }
 

Example response (401, Unauthenticated):


{
    "message": "Unauthenticated."
}
 

Example response (403, Unauthorized):


{
    "message": "This action is unauthorized."
}
 

Example response (404, Not Found):


{
    "success": false,
    "message": "Resource Not Found"
}
 

Example response (422, Error Validations):


{
    "message": "The ticker field is required.",
    "errors": {
        "ticker": [
            "The ticker field is required."
        ]
    }
}
 

Request      

GET v1/mlb/games-diffPatch

Headers

Authorization Bearer YOUR_API_KEY

Query Parameters

Parameter Type Description
gamePk required string

MLB game ID (gamePk), an integer from the schedule endpoint. Example: 633282