GET/api/v1/people/search
Search people
Find people by name.
On this page
Try it
https://statsapi.mlb.com/api/v1/people/search?names=judgeconst res = await fetch('https://statsapi.mlb.com/api/v1/people/search?names=judge')
const data = await res.json()curl -s 'https://statsapi.mlb.com/api/v1/people/search?names=judge'
Reference
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
names | string | yes | Name query, e.g. |
sportIds | csv | no | Restrict to sport (level) ids. |
active | boolean | no | Filter by active status. |
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[]
}Build with it
Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.
Player search
A live, debounced search box that resolves names to player cards.
Searching…
Example URLs
- Search “judge”:
https://statsapi.mlb.com/api/v1/people/search?names=judge