MLB API endpoint
Returns an MLB game summary by numeric `id`. The response has the status, both teams with records and score, inning-by-inning runs, probable pitchers, winning, losing and save pitchers, and team box-score totals. It does not include the full play-by-play. Use the play-by-play endpoint for that.
/mlb/gameThe required id is a numeric MLB game ID. The compact response includes status, teams, score, inning-by-inning linescore, probable pitchers, decisions, and team box-score totals without mirroring the full upstream play feed.
| Field | In the sample | Value in the sample |
|---|---|---|
| game.id | Has a value | |
| game.official_date | Has a value | 2026-08-01 |
| game.game_date | Has a value | 2026-08-01 |
| game.season | Has a value | 2,026 |
| game.game_type | Has a value | “R” |
| game.status | Has a value | |
| game.venue | Has a value | |
| game.away | Has a value | |
| game.home | Has a value | |
| linescore.current_inning | Has a value | 9 |
| linescore.inning_state | Has a value | “Top” |
| linescore.scheduled_innings | Has a value | 9 |
| linescore.away_runs | Has a value | 1 |
| linescore.away_hits | Has a value | 11 |
| linescore.away_errors | Has a value | 0 |
| linescore.home_runs | Has a value | 5 |
| linescore.home_hits | Has a value | 9 |
| linescore.home_errors | Has a value | 0 |
| linescore.innings | Has a value | 9 entries |
| decisions.winner | Has a value | |
| decisions.loser | Has a value | |
| away_boxscore.team | Has a value | |
| away_boxscore.players_used | Has a value | 26 |
| away_boxscore.batters | Has a value | 14 entries |
| away_boxscore.pitchers | Has a value | 3 entries |
| away_boxscore.team_stats | Has a value | |
| home_boxscore.team | Has a value | |
| home_boxscore.players_used | Has a value | 26 |
| home_boxscore.batters | Has a value | 16 entries |
| home_boxscore.pitchers | Has a value | 5 entries |
| home_boxscore.team_stats | Has a value |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| id | string | Yes | Numeric MLB game id | 822781 | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/mlb/game?id=822781" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"game": {
"id": 822781,
"status": {
"detailed": "Final"
}
},
"linescore": {
"away_runs": 2,
"home_runs": 4,
"innings": [
{
"number": 1,
"away_runs": 0,
"home_runs": 1
}
]
}
}
}Request schema
No body schema
Response schema
#/definitions/mlb.gameResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | mlb.GameResponse | No | ||||
| data.away_boxscore | mlb.TeamBoxscore | No | ||||
| data.away_boxscore.batters | array | No | ||||
| data.away_boxscore.pitchers | array | No | ||||
| data.away_boxscore.players_used | integer | No | ||||
| data.away_boxscore.team | mlb.TeamRef | No | ||||
| data.away_boxscore.team.abbreviation | string | No | Short team abbreviation, for example `NYY`. Omitted when not available. | |||
| data.away_boxscore.team.id | integer | No | MLB team id. | |||
| data.away_boxscore.team.name | string | No | Full team name. | |||
| data.away_boxscore.team_stats | object | No | ||||
| data.decisions | mlb.Decision | No | ||||
| data.decisions.loser | mlb.NamedRef | No | ||||
| data.decisions.loser.id | integer | No | MLB id of the player or league. | |||
| data.decisions.loser.name | string | No | Name of the player or league. | |||
| data.decisions.save | mlb.NamedRef | No | ||||
| data.decisions.save.id | integer | No | MLB id of the player or league. | |||
| data.decisions.save.name | string | No | Name of the player or league. | |||
| data.decisions.winner | mlb.NamedRef | No | ||||
| data.decisions.winner.id | integer | No | MLB id of the player or league. | |||
| data.decisions.winner.name | string | No | Name of the player or league. | |||
| data.fetched_at | string | No | ||||
| data.game | mlb.GameSummary | No | ||||
| data.game.away | mlb.GameSide | No | ||||
| data.game.away.losses | integer | No | ||||
| data.game.away.probable_pitcher | mlb.NamedRef | No | ||||
| data.game.away.probable_pitcher.id | integer | No | MLB id of the player or league. | |||
| data.game.away.probable_pitcher.name | string | No | Name of the player or league. | |||
| data.game.away.score | integer | No | ||||
| data.game.away.team | mlb.TeamRef | No | ||||
| data.game.away.team.abbreviation | string | No | Short team abbreviation, for example `NYY`. Omitted when not available. | |||
| data.game.away.team.id | integer | No | MLB team id. | |||
| data.game.away.team.name | string | No | Full team name. | |||
| data.game.away.wins | integer | No | ||||
| data.game.day_night | string | No | ||||
| data.game.double_header | string | No | ||||
| data.game.game_date | string | No | ||||
| data.game.game_number | integer | No | ||||
| data.game.game_type | string | No | ||||
| data.game.home | mlb.GameSide | No | ||||
| data.game.home.losses | integer | No | ||||
| data.game.home.probable_pitcher | mlb.NamedRef | No | ||||
| data.game.home.probable_pitcher.id | integer | No | MLB id of the player or league. | |||
| data.game.home.probable_pitcher.name | string | No | Name of the player or league. | |||
| data.game.home.score | integer | No | ||||
| data.game.home.team | mlb.TeamRef | No | ||||
| data.game.home.team.abbreviation | string | No | Short team abbreviation, for example `NYY`. Omitted when not available. | |||
| data.game.home.team.id | integer | No | MLB team id. | |||
| data.game.home.team.name | string | No | Full team name. | |||
| data.game.home.wins | integer | No | ||||
| data.game.id | integer | No | ||||
| data.game.official_date | string | No | ||||
| data.game.scheduled_innings | integer | No | ||||
| data.game.season | string | No | ||||
| data.game.series_description | string | No | ||||
| data.game.status | mlb.GameStatus | No | ||||
| data.game.status.abstract | string | No | ||||
| data.game.status.code | string | No | ||||
| data.game.status.detailed | string | No | ||||
| data.game.status.reason | string | No | ||||
| data.game.venue | mlb.VenueRef | No | ||||
| data.game.venue.id | integer | No | ||||
| data.game.venue.name | string | No | ||||
| data.home_boxscore | mlb.TeamBoxscore | No | ||||
| data.home_boxscore.batters | array | No | ||||
| data.home_boxscore.pitchers | array | No | ||||
| data.home_boxscore.players_used | integer | No | ||||
| data.home_boxscore.team | mlb.TeamRef | No | ||||
| data.home_boxscore.team.abbreviation | string | No | Short team abbreviation, for example `NYY`. Omitted when not available. | |||
| data.home_boxscore.team.id | integer | No | MLB team id. | |||
| data.home_boxscore.team.name | string | No | Full team name. | |||
| data.home_boxscore.team_stats | object | No | ||||
| data.linescore | mlb.Linescore | No | ||||
| data.linescore.away_errors | integer | No | ||||
| data.linescore.away_hits | integer | No | ||||
| data.linescore.away_runs | integer | No | ||||
| data.linescore.current_inning | integer | No | ||||
| data.linescore.home_errors | integer | No | ||||
| data.linescore.home_hits | integer | No | ||||
| data.linescore.home_runs | integer | No | ||||
| data.linescore.inning_state | string | No | ||||
| data.linescore.innings | array | No | ||||
| data.linescore.innings[].away_errors | integer | No | ||||
| data.linescore.innings[].away_hits | integer | No | ||||
| data.linescore.innings[].away_runs | integer | No | ||||
| data.linescore.innings[].home_errors | integer | No | ||||
| data.linescore.innings[].home_hits | integer | No | ||||
| data.linescore.innings[].home_runs | integer | No | ||||
| data.linescore.innings[].number | integer | No | ||||
| data.linescore.scheduled_innings | integer | No | ||||
| data.source_url | string | 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/game?id=822781" \
-H "x-api-key: $CRAWLORA_API_KEY"