Major League Baseball Teams API

Operations pertaining to teams

GitHub OpenAPI
Business capability
Sports, Betting & Fantasy AE-180.80

Operations 16

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

2 of 16 operations are conformant: apis.io called them with no credentials and the responses matched this contract; 6 more answered but could not be checked against a schema. Checked 2026-11-12. how this works · status file

GET /api/v1/teams/{teamId}/alumni List a team's alumni · View all team alumni #
Ask an LLM
“Who played for a team in a given season?”
“Can I group a team's alumni by stat category?”
Tell an agent
List the alumni of team {teamId} in season {season}.
Show team {teamId} alumni for season {season} grouped by {group}.
POST /api/v1/teams/{teamId}/alumni Update a team's alumni roster · Update alumni #
Ask an LLM
“How do I add or remove players from a team's alumni list?”
“Can I update a team's alumni for a season?”
Tell an agent
Update the alumni roster of team {teamId} for season {season}.
Replace team {teamId} alumni in season {season} with these players.
GET /api/v1/teams/{teamId}/stats Get a team's stats for a season · View stats for an individual team #
Ask an LLM
“What are a team's batting and pitching stats for a season?”
“Can I see a team's stats against a specific opponent?”
Tell an agent
Get team {teamId} stats for season {season}.
Show team {teamId} stats against team {opposingTeamId} in season {season}.
GET /api/v1/teams/{teamId}/roster View a team's roster for a date · View a teams info observed #
Ask an LLM
“Who was on a team's roster on a particular game date?”
“Can I get a team's roster for a specific game type?”
Tell an agent
Show the {rosterType} roster of team {teamId} on {date}.
Get team {teamId} {rosterType} roster for game type {gameType}.
GET /api/v1/teams/{teamId}/roster/{rosterType} View a team's roster by roster type · View a teams info #
Ask an LLM
“Can I pull a team's roster for a single roster type?”
“What does a team's roster look like for a specific roster type?”
Tell an agent
Show the {rosterType} roster of team {teamId}.
Get team {teamId} roster for roster type {rosterType} in season {season}.
GET /api/v1/teams/{teamId}/personnel List a team's coaches · View all coaches for a team observed #
Ask an LLM
“Who are the coaches on a team?”
“Can I see a team's coaching staff for a season?”
Tell an agent
List the coaches of team {teamId}.
Show team {teamId} coaches for season {season}.
GET /api/v1/teams/{teamId}/leaders Get a team's stat leaders · View team stat leaders #
Ask an LLM
“Who are a team's top hitters and pitchers this season?”
“Can I limit stat leaders to certain categories or game types?”
Tell an agent
Get the stat leaders for team {teamId}.
Show team {teamId} stat leaders for categories {leaderCategories} in season {season}.
GET /api/v1/teams/{teamId}/history Get historical records for a team · View historical records for a list of teams observed #
Ask an LLM
“What are a team's historical records over several seasons?”
“Can I get a team's history from a start season to an end season?”
Tell an agent
Get the historical records for team {teamId}.
Show team {teamId} history from season {startSeason} to {endSeason}.
GET /api/v1/teams/history List a team's historical records · View historical records for a list of teams #
Ask an LLM
“Which teams played in a given season?”
“Can I list several teams' histories at once?”
Tell an agent
Show the history of team {teamId}.
List history for teams {teamIds} between {startSeason} and {endSeason}.
GET /api/v1/teams/{teamId}/coaches List a team's coaches · View all coaches for a team observed #
Ask an LLM
“Who were a team's coaches in a particular season?”
“Can I see who the manager and pitching coach were on a given date?”
Tell an agent
List the coaches for team {teamId} in {season}.
Find who coached team {teamId} on {date}.
GET /api/v1/teams/{teamId}/affiliates View a team and its affiliates · View team and affiliate teams observed #
Ask an LLM
“Which minor league affiliates does a team have?”
“Can I see a team's affiliates for a season?”
Tell an agent
Show the affiliates of team {teamId}.
List team {teamId} and its affiliates for season {season}.
GET /api/v1/teams/affiliates List a team's affiliate clubs · View team and affiliate teams #
Ask an LLM
“Which minor league clubs are tied to a major league team?”
“Can I see a team's affiliate clubs for one sport level?”
Tell an agent
Pull the affiliate clubs for team {teamId} in sport {sportId}.
Get affiliate clubs of team {teamId} for game type {gameType} in season {season}.
GET /api/v1/teams/stats Get stats for all teams · View a teams stats #
Ask an LLM
“What are the overall stats for every team in a league?”
“Can I get combined team stats for a stat group?”
Tell an agent
Get {group} stats for all teams in {sportId}.
Show team stats for stat group {group} over the last {daysBack} days.
GET /api/v1/teams/stats/leaders Get stat leaders for all teams · View leaders for team stats observed #
Ask an LLM
“Who are the top hitters and pitchers across the league?”
“Can I get league-wide stat leaders for a stat group?”
Tell an agent
Get stat leaders for all teams in {sportId}.
Show league leaders for stat group {statGroup} over the last {daysBack} days.
GET /api/v1/teams Look up teams with filters · View info for all teams conformant #
Ask an LLM
“Which baseball teams are currently active in a given league?”
“Can I filter teams by division or by active, inactive or pending status?”
Tell an agent
List the teams in league {leagueIds} for sport {sportId}, including team {teamId}.
Show teams in division {divisionId} with active status {activeStatus}, starting with team {teamId}.
GET /api/v1/teams/{teamId} Get a team's info · View info for all teams conformant #
Ask an LLM
“What are the details of one team?”
“Can I look up a team by its ID?”
Tell an agent
Get the info for team {teamId}.
Show team {teamId} details for season {season}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/major-league-baseball:major-league-baseball-teams-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

major-league-baseball-teams-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Stats API Documentation Teams API
  description: Official API for Major League Baseball.
  version: 2.0.0
servers:
- url: https://statsapi.mlb.com
  description: Production
- url: https://beta-statsapi.mlb.com
  description: Beta
- url: https://qa-statsapi.mlb.com
  description: QA
- url: http://localhost:8080
  description: Local
tags:


# --- truncated at 32 KB (264 KB total) ---
# Full source: https://artifacts.apis.io/major-league-baseball/openapi/major-league-baseball-teams-api-openapi.yml