MLB Stats API Docs

Type to search endpoints by name, path, or keyword.

GET/api/v1/people/search

Search people

Find people by name.

On this page

Try it

Query
https://statsapi.mlb.com/api/v1/people/search?names=judge
const 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

NameTypeRequiredDescription
namesstringyes

Name query, e.g. judge.

sportIdscsvno

Restrict to sport (level) ids.

activebooleanno

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