MLB Box Scores — Every Game Since 1871 avatar

MLB Box Scores — Every Game Since 1871

Pricing

$0.20 / 1,000 games

Go to Apify Store
MLB Box Scores — Every Game Since 1871

MLB Box Scores — Every Game Since 1871

235,611 Major League Baseball games, 1871 to the last completed season — score by inning, full team box score, umpires, starting lineups and park, one table, same columns everywhere.

Pricing

$0.20 / 1,000 games

Rating

0.0

(0)

Developer

SourceRow

SourceRow

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Categories

Share

235,611 Major League Baseball games, from the first professional season in 1871 through the last completed season, in one flat table where every row has the same 173 columns. Score by inning, full team box score, umpires, starting lineups, park, attendance and time of game.

What it does

Retrosheet publishes game logs as fixed-width text with 161 positional fields and no header. This Actor parses that into typed columns with names, and ships the historical archive inside the image: seasons already published are served from disk with no network request at all.

Seasons newer than the archive are fetched from Retrosheet at run time, so the Actor stays current without being rebuilt. Retrosheet publishes a season once it has ended.

What you get

173 fields per row: the game identity and date, both teams with league and game number, score, line score by inning, innings played, duration, attendance, park, day or night, the full batting and pitching totals for each side, umpires by position, the named pairs (winning and losing pitcher, save, game-winning RBI), the nine starting batters for each side with position, and the provenance fields.

The table view shows 15 of them; all 173 are in the JSON, CSV and Excel downloads.

Input

FieldMeaning
teamsRetrosheet team codes, for example NYA, BOS. Empty means all.
fromSeasonFirst season to include.
toSeasonLast season. Empty means the latest available.
maxGamesStop after this many. 0 removes the cap.
{
"teams": [],
"fromSeason": 2022,
"maxGames": 1000
}

Sample output

One record, trimmed to the fields shown in the table view:

{
"date": "2022-04-07",
"season": 2022,
"game_type": "regular_season",
"away_team": "HOU",
"home_team": "ANA",
"away_score": 3,
"home_score": 1,
"winner": "away",
"innings": 9,
"park_id": "ANA01",
"attendance": 44723,
"away_hits": 8,
"home_hits": 4,
"winning_pitcher_name": "Framber Valdez",
"issues": ""
}

Pricing

EventPer 1,000Notes
Game$0.20One charge per game returned

The complete archive, all 235,611 games, is $47.12. There is no start fee and no per-row dataset fee.

What it does not do

No play-by-play. This is the game level: one row per game. Pitch-by-pitch data is a separate Actor.

Early games are thin. issues marks missing_box_score on games where only the result survives. Almost all of those are before 1903.

Player identifiers are Retrosheet's. winning_pitcher_id is a Retrosheet player code, not an MLBAM id. Joining to other sources requires a crosswalk.

The current season is incomplete until it ends. Retrosheet publishes a season once it is finished. Games played this week are not here.

Notes

Requesting only seasons inside the built-in archive does no network work at all, so the run cannot be slowed by somebody else's server.

Filtering by teams also reduces the live half: only games involving those teams are fetched.

issues is the cheapest quality filter available. Filtering out missing_box_score leaves the games with a full box score.

game_id is Retrosheet's own identifier, so this table joins directly onto Retrosheet play-by-play data.

Support

Open the Issues tab with the game_id and the field that looks wrong.

Licence and attribution

The information used here was obtained free of charge from and is copyrighted by Retrosheet. Interested parties may contact Retrosheet at "www.retrosheet.org".

Retrosheet permits commercial use explicitly, including selling products based on the data, on the single condition that the notice above appears prominently. Every row carries the licence, and every run records it in the run summary.