MLB Stats API Docs

Type to search endpoints by name, path, or keyword.

GET/api/v1/teams

List teams

All teams for a sport and (optionally) a season.

Returns every team for the given sportId. Pass season to get the roster of teams as they existed that year (relocations, name changes, expansion).

On this page

Try it

Query
https://statsapi.mlb.com/api/v1/teams?sportId=1&season=2026
const res = await fetch('https://statsapi.mlb.com/api/v1/teams?sportId=1&season=2026')
const data = await res.json()
curl -s 'https://statsapi.mlb.com/api/v1/teams?sportId=1&season=2026'

Reference

Query parameters

NameTypeRequiredDescription
sportIdnumberno

Sport id. 1 is MLB. Omit to get all sports.

seasonnumberno

Four-digit year. Defaults to the current season.

activeStatusYNBno

Filter by active status (Yes / No / Both).

hydratecsvno

Comma-separated hydrations, e.g. venue,league,division.

fieldscsvno

Comma-separated field paths to keep (trims the response), e.g. teams,id,name.

Response

Type: TeamsResponse

/** `GET /api/v1/teams` */
export interface TeamsResponse extends WithCopyright {
	teams: Team[]
}

Notes

  • sportId=1 is MLB; minor-league and other sports have their own ids (see /api/v1/sports).

Build with it

Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.

League team grid

All 30 clubs by logo, grouped by division.

Loading teams…

Example URLs

  • All MLB teams (2026): https://statsapi.mlb.com/api/v1/teams?sportId=1&season=2026
  • All MLB teams with venue hydrated: https://statsapi.mlb.com/api/v1/teams?sportId=1&hydrate=venue