---
title: "Get an MLB team roster"
method: GET
path: "/mlb/team-roster"
tags: ["MLB"]
---

# Get an MLB team roster

`GET /mlb/team-roster`

## Request

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

Returns a team's players, jersey numbers, positions, and roster status. The roster_type parameter accepts every value in the live MLB value set returned by mlb_discovery.

## Query parameters

- `team_id` string, required
- `season` integer
- `roster_type` '40Man' | 'fullSeason' | 'fullRoster' | 'nonRosterInvitees' | 'active' | 'allTime' | 'depthChart' | 'gameday' | 'coach'

## Headers

- `x-api-key` string, required

## Response `200`

OK

- MlbRosterResponseDoc
  - `code` integer
  - `data` MlbRosterResponse
    - `count` integer
    - `fetched_at` string
    - `players` MlbRosterPlayer[]
      - `jersey_number` string
      - `person` MlbNamedRef
        - `id` integer: MLB id of the player or league.
        - `name` string: Name of the player or league.
      - `position` string
      - `position_code` string
      - `status` string
    - `roster_type` string
    - `season` integer
    - `source_url` string
    - `team_id` integer
  - `msg` string

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `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/0497899e2016?raw)
