---
title: "List MLB teams"
method: GET
path: "/mlb/teams"
tags: ["MLB"]
---

# List MLB teams

`GET /mlb/teams`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/mlb/teams`
- Auth: API key in header `x-api-key`

Lists the 30 MLB clubs for a `season` (four-digit year, default the current year). Each team has its id, name, club name, location, abbreviation, league, division, venue, first year of play and active flag.

## Query parameters

- `season` integer

## Headers

- `x-api-key` string, required

## Response `200`

OK

- MlbTeamsResponseDoc
  - `code` integer
  - `data` MlbTeamsResponse
    - `count` integer
    - `fetched_at` string
    - `season` integer
    - `source_url` string
    - `teams` MlbTeam[]
      - `abbreviation` string: Short team abbreviation, for example `NYY`. Omitted when not available.
      - `active` boolean
      - `club_name` string
      - `division` MlbNamedRef
        - `id` integer: MLB id of the player or league.
        - `name` string: Name of the player or league.
      - `first_year_of_play` string
      - `id` integer: MLB team id.
      - `league` MlbNamedRef
        - `id` integer: MLB id of the player or league.
        - `name` string: Name of the player or league.
      - `location_name` string
      - `name` string: Full team name.
      - `season` integer
      - `venue` MlbVenueRef
        - `id` integer
        - `name` string
  - `msg` string

## Other responses

- `400`: Bad Request
- `429`: Too Many Requests
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/afac9b012a27?raw)
