Documentation/Leagues
GET /v1/leagues | Baseball Data API
Every league we hold, with its seasons and how many of its games carry each part of the record.Free keyMCP tool: list_leagues
GEThttps://api.baseballapi.net/v1/leagues
Try it
Returns
| Field | What it holds |
|---|---|
league | string: the league's slug, used in every league address (/v1/{league}/...) |
name | string: the league's name |
full_name | string: a longer description |
country | string: the country's name |
country_code | string: ISO 3166 alpha-2, or INT for international tournaments |
first_season | integer or null: the first season held |
last_season | integer or null: the latest season held |
seasons | integer: seasons held |
games | integer or null: games held one by one (null where the league is held as team seasons) |
team_seasons | integer or null: team seasons held, where the league is held that way |
with_line_score | integer or null: games with runs by inning |
with_box_score | integer or null: games with batting and pitching lines |
with_play_by_play | integer or null: games with every plate appearance |
with_pitch_data | integer or null: games with each pitch recorded |
with_weather | integer or null: games with the weather at or near first pitch |
resting | boolean: true while the league is between seasons |
checked_at | string or null: when we last checked for new games, ISO 8601 UTC |
Example answer
A real answer, taken 2026-11-03.
{
"data": [
{
"league": "mlb",
"name": "MLB",
"full_name": "American and National Leagues, and the majors before them",
"country": "United States",
"country_code": "US",
"first_season": 1897,
"last_season": 2026,
"seasons": 130,
"games": 220475,
"team_seasons": null,
"with_line_score": 218046,
"with_box_score": 217997,
"with_play_by_play": 206492,
"with_pitch_data": null,
"with_weather": 210839,
"resting": true,
"checked_at": "2026-11-03T06:36:29Z"
},
{
"league": "minors",
"name": "Minor leagues",
"full_name": "Affiliated and independent leagues, team seasons",
"country": "United States",
"country_code": "US",
"first_season": 1877,
"last_season": 2026,
"seasons": 150,
"games": null,
"team_seasons": 30026,
"with_line_score": null,
"with_box_score": null,
"with_play_by_play": null,
"with_pitch_data": null,
"with_weather": null,
"resting": false,
"checked_at": null
}
],
"meta": {
"counted_at": "2026-11-03T06:37:04Z",
"count": 11
}
}Errors
Every endpoint can answer unauthorized, unknown_parameter, rate_limited, quota_exceeded and server_error. See Errors.