Baseball Data API Documentation
Build on the baseball recordOne key, one JSON shape, 11 endpoints. Every game since 1897, the leagues abroad, and the people and parks around them. Every page here is built from the API's own list of endpoints, so it always matches what the API does.
Your first call
$ curl \
https://api.baseballapi.net/v1/results/yesterday \
-H "X-API-Key: YOUR_KEY"{ "data": [ { "id": "gm_9tw9rna6", "league": "kbo", "status": "final", "away": { "name": "Away club", "runs": 5 }, "home": { "name": "Home club", "runs": 3 } }, ... ], "meta": { "count": 7 } }
200 OKExample answer, the shape only
- Base URL
https://api.baseballapi.net/v1- Endpoints
- 11
- MCP tools
- 11
- Format
- JSON, UTC
The reference
Every endpoint, by subject
11 endpoints in 5 subjects. Each page has Try it with your key, every parameter and field, and a real answer.
On the free key
Games5
Find games on a day or a range, open one in full, its box score and its plays.
- GET/v1/{league}/gamesGames in a league on a day or across a range of days, with final scores.
- GET/v1/{league}/games/{id}One game with its line score, the weather at the ground and the umpires, where held.
- GET/v1/results/yesterdayEvery finished game from yesterday in every league, newest league first.
- GET/v1/{league}/games/{id}/boxscoreBatting and pitching lines for both sides of one game, where held.
- GET/v1/{league}/games/{id}/playsEvery plate appearance of one game in order, with the pitches where they were recorded.
Leagues1
Every league we hold, its seasons and how much of each game is there.
Read the guide: Leagues and coverageParks2
Every ground, its dates, runs per game and park factor by season.
- GET/v1/parksEvery major-league ground held, with its first and last game; or the grounds used in one season.
- GET/v1/parks/{id}One ground, and season by season its games, runs per game and park factor.
Players2
Players, managers, coaches and umpires, with their careers.
- GET/v1/playersFind people in the US majors and Negro Leagues by name: players, managers, coaches and umpires.
- GET/v1/players/{id}One person: names, birth and death, bats and throws, height and weight, and each role with its dates.