GET/api/v1/teams/{teamId}/history
Team history
A franchise across its seasons (name/location changes).
On this page
Try it
https://statsapi.mlb.com/api/v1/teams/119/historyconst 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
| Name | Type | Required | Description |
|---|---|---|---|
teamId | number | yes | Team id, e.g. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
startSeason | number | no | First year, four digits. |
endSeason | number | no | 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