Historical MLB Game Logs API
Every Major League Baseball game since 1871 from Retrosheet: date, teams, score, ballpark, attendance, line scores, umpire, pitchers of record, starting lineups and team batting totals.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from retrosheet.org/gamelogs/
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/retrosheet-mlb-game-logs/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"seasons":[2025]},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
20 fields: 18 here, 2 technical ones under Technical details.
Basics
- Season year
Example 2,025
- Game number
0 for a single game, 1 or 2 in a doubleheader.
Example 0
- Day of week
Example Sunday
- Visiting team code
Example PIT
- Home team code
Example ATL
- Visiting score
Runs scored by the visitors.
Example 1
- Home score
Runs scored by the home team.
Example 4
- Attendance
Attendance when recorded.
Example 35,827
- Duration (minutes)
Game length in minutes when recorded.
Example 145
- Visiting line score
Visitors' runs by inning.
Example 000001000
- Home line score
Home team's runs by inning.
Example 20000002x
- Home plate umpire
Example Derek Thomas
- Winning pitcher
Example Chris Sale
- Losing pitcher
Example Johan Oviedo
- Saving pitcher
Pitcher credited with the save.
Example Raisel Iglesias
- Starting lineups
Starting lineups for visiting and home teams: batting order, player and position.
Example {"visiting":[{},{}],"home":[{},{}]}
- Team batting totals
Visiting and home team totals: at bats, hits, doubles, home runs, walks, strikeouts, errors and more.
Example {"visiting":{"at_bats":31,"hits":6,"doubles":1,"triples":0,"home_runs":0,"rbi":1,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":0,"walks":3,"intentional_walks":0,"strikeouts":11,"stolen_bases":0,"caught_stealing":1},"home":{"at_bats":28,"hits":6,"doubles":2,"triples":0,"home_runs":1,"rbi":3,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":0,"walks":4,"intentional_walks":0,"strikeouts":7,"stolen_bases":0,"caught_stealing":1}}
Dates
- Date
Day the game was played.
Example Sep 28, 2025
Technical detailsField names and types for developers, and the 2 fields hidden above
Hidden by default
These 2 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.
- ID
idUnique game id: date, home team and game number. - Park ID
park_idBallpark code.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
id | text | ID (hidden) | 3 of 3 |
season | number | Season year | 3 of 3 |
date | date | Date | 3 of 3 |
game_number | number | Game number | 3 of 3 |
day_of_week | text | Day of week | 3 of 3 |
visiting_team | text | Visiting team code | 3 of 3 |
home_team | text | Home team code | 3 of 3 |
visiting_score | number | Visiting score | 3 of 3 |
home_score | number | Home score | 3 of 3 |
park_id | text | Park ID (hidden) | 3 of 3 |
attendance | number | Attendance | 3 of 3 |
duration_minutes | number | Duration (minutes) | 3 of 3 |
visiting_line_score | text | Visiting line score | 3 of 3 |
home_line_score | text | Home line score | 3 of 3 |
home_plate_umpire | text | Home plate umpire | 3 of 3 |
winning_pitcher | text | Winning pitcher | 3 of 3 |
losing_pitcher | text | Losing pitcher | 3 of 3 |
saving_pitcher | text | Saving pitcher | 2 of 3 |
starting_lineups | group of values | Starting lineups | 3 of 3 |
team_batting_totals | group of values | Team batting totals | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Season year | Game number | Day of week | Visiting team code | Home team code | Visiting score | Home score | Attendance | Duration (minutes) | Visiting line score | Home line score | Home plate umpire | Winning pitcher | Losing pitcher | Saving pitcher | Starting lineups | Team batting totals | Date |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2,025 | 0 | Sunday | PIT | ATL | 1 | 4 | 35,827 | 145 | 000001000 | 20000002x | Derek Thomas | Chris Sale | Johan Oviedo | Raisel Iglesias | {"visiting":[{},{}],"home":[{},{}]} | {"visiting":{"at_bats":31,"hits":6,"doubles":1,"triples":0,"home_runs":0,"rbi":1,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":0,"walks":3,"intentional_walks":0,"strikeouts":11,"stolen_bases":0,"caught_stealing":1},"home":{"at_bats":28,"hits":6,"doubles":2,"triples":0,"home_runs":1,"rbi":3,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":0,"walks":4,"intentional_walks":0,"strikeouts":7,"stolen_bases":0,"caught_stealing":1}} | Sep 28, 2025 |
| 2 | 2,025 | 0 | Sunday | SLN | CHN | 0 | 2 | 37,497 | 122 | 000000000 | 00001010x | Ben May | Javier Assad | John King | Jordan Wicks | {"visiting":[{},{}],"home":[{},{}]} | {"visiting":{"at_bats":32,"hits":6,"doubles":2,"triples":1,"home_runs":0,"rbi":0,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":0,"walks":1,"intentional_walks":0,"strikeouts":10,"stolen_bases":1,"caught_stealing":0},"home":{"at_bats":29,"hits":6,"doubles":0,"triples":0,"home_runs":1,"rbi":2,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":0,"walks":0,"intentional_walks":0,"strikeouts":9,"stolen_bases":0,"caught_stealing":0}} | Sep 28, 2025 |
| 3 | 2,025 | 0 | Sunday | NYN | MIA | 0 | 4 | 34,660 | 169 | 000000000 | 00040000x | David Rackley | Edward Cabrera | Brooks Raley | — | {"visiting":[{},{}],"home":[{},{}]} | {"visiting":{"at_bats":30,"hits":5,"doubles":1,"triples":0,"home_runs":0,"rbi":0,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":0,"walks":7,"intentional_walks":0,"strikeouts":11,"stolen_bases":2,"caught_stealing":0},"home":{"at_bats":33,"hits":9,"doubles":3,"triples":1,"home_runs":0,"rbi":4,"sacrifice_hits":0,"sacrifice_flies":0,"hit_by_pitch":1,"walks":3,"intentional_walks":0,"strikeouts":6,"stolen_bases":3,"caught_stealing":0}} | Sep 28, 2025 |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- One season file is downloaded per season asked (about 0.5 MB, up to 2,500 games) and filtered here, so each season adds a few seconds; at most 20 seasons per run.
- Newest games first within each season; the current season is added by Retrosheet after it ends (the latest full file is the previous season), so the newest games are missing.
- Old seasons often have no attendance, duration or lineup data (those fields are then empty); lineups list player names and positions only.
- Retrosheet's data is free for any use, but its notice must appear prominently with the data: 'The information used here was obtained free of charge from and is copyrighted by Retrosheet. Interested parties may contact Retrosheet at www.retrosheet.org.'
- Team codes are Retrosheet's own (for example NYA, BOS, LAN).
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.