MLB API endpoint
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.
/mlb/team-rosterteam_id is required. season defaults to the current year. roster_type defaults to active and accepts: 40Man, fullSeason, fullRoster, nonRosterInvitees, active, allTime, depthChart, gameday, coach. See /mlb/discovery for current MLB metadata.
| Field | Filled in, of 40 checked | Values in the sample |
|---|---|---|
| person | 40 | |
| jersey_number | 40 | 11 to 99, median 40 |
| position | 40 | Pitcher (20), Outfielder (7), Catcher (3) and 5 more |
| position_code | 40 | |
| status | 40 | Active in all 40 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| team_id | string | Yes | Numeric MLB team id | 147 | |
| season | integer | No | current year | Four-digit season; defaults to current year | 2026 |
| roster_type | string | No | Roster type Allowed values: 40Man, fullSeason, fullRoster, nonRosterInvitees, active, allTime, depthChart, gameday, coach. | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/mlb/team-roster?team_id=147&roster_type=40Man" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"team_id": 147,
"season": 2026,
"roster_type": "active",
"count": 26,
"players": [
{
"person": {
"id": 592450,
"name": "Aaron Judge"
},
"jersey_number": "99",
"position": "Right Field"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/mlb.rosterResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | mlb.RosterResponse | No | ||||
| data.count | integer | No | ||||
| data.fetched_at | string | No | ||||
| data.players | array | No | ||||
| data.players[].jersey_number | string | No | ||||
| data.players[].person | mlb.NamedRef | No | ||||
| data.players[].person.id | integer | No | MLB id of the player or league. | |||
| data.players[].person.name | string | No | Name of the player or league. | |||
| data.players[].position | string | No | ||||
| data.players[].position_code | string | No | ||||
| data.players[].status | string | No | ||||
| data.roster_type | string | No | ||||
| data.season | integer | No | ||||
| data.source_url | string | No | ||||
| data.team_id | integer | No | ||||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/mlb/team-roster?team_id=147&roster_type=40Man" \
-H "x-api-key: $CRAWLORA_API_KEY"