GET/api/v1/people/{personId}
Get person
A player, coach, or umpire by id.
On this page
Try it
https://statsapi.mlb.com/api/v1/people/660271const res = await fetch('https://statsapi.mlb.com/api/v1/people/660271')
const data = await res.json()curl -s 'https://statsapi.mlb.com/api/v1/people/660271'
Reference
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
personId | number | yes | Person id, e.g. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
hydrate | csv | no | e.g. |
fields | csv | no | Comma-separated field paths to keep (trims the response), e.g. |
Response
Type: PeopleResponse
/**
* `GET /api/v1/people/{personId}`, `/people/search`, and `/people/changes` all
* return a `people` array.
*/
export interface PeopleResponse extends WithCopyright {
people: Person[]
}Notes
Response is wrapped in a
peoplearray of length 1.
Build with it
Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.
Player card
Headshot, bio, and current team — a profile header from one call.
Loading live data…
Example URLs
- Shohei Ohtani:
https://statsapi.mlb.com/api/v1/people/660271