mlb_leagues
Retrieve MLB league IDs and names for American and National Leagues. Filter by season or specific league IDs to obtain season state and wild card details.
Instructions
League catalogue — e.g. American League (103) and National League (104). Pass sportId=1 for MLB.
Returns: {leagues:[{id, name, abbreviation, sport, seasonState, hasWildCard}]}
Auth: none needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seasons | No | Season year(s). | |
| sportId | No | Sport id (1 = MLB). | |
| leagueIds | No | Filter to specific league ids (e.g. 103, 104). |