MLB Stats API Docs

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

GET/api/v1/teams/{teamId}/history

Team history

A franchise across its seasons (name/location changes).

On this page

Try it

Path
Query
https://statsapi.mlb.com/api/v1/teams/119/history
const res = await fetch('https://statsapi.mlb.com/api/v1/teams/119/history')
const data = await res.json()
curl -s 'https://statsapi.mlb.com/api/v1/teams/119/history'

Reference

Path parameters

NameTypeRequiredDescription
teamIdnumberyes

Team id, e.g. 119 (Los Angeles Dodgers).

Query parameters

NameTypeRequiredDescription
startSeasonnumberno

First year, four digits.

endSeasonnumberno

Last year, four digits.

Response

Type: TeamsResponse

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

Build with it

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

Franchise timeline

A club’s name and location eras folded into a vertical timeline.

Loading live data…

Example URLs

  • Dodgers franchise history: https://statsapi.mlb.com/api/v1/teams/119/history