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.

Try it
Ready-made, maintained by usRecords, 20 fieldsv1.0

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

Seasonsoptional
Seasons to read, from 1871 (default: the latest finished season). Up to 20. One per line, or separated by commas.
Example: 2025
Teamsoptional
Only games played by these teams (Retrosheet codes such as NYA, BOS, LAN). One per line, or separated by commas.
Example: NYA

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
Endpoint
POSThttps://pullrow.dev/v1/apis/retrosheet-mlb-game-logs/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
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.

seasonslist
Seasons to read, from 1871 (default: the latest finished season). Up to 20.
example: 2025
teamslist
Only games played by these teams (Retrosheet codes such as NYA, BOS, LAN).
example: NYA

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 nameTypeShown on this page asFilled
idtextID (hidden)3 of 3
seasonnumberSeason year3 of 3
datedateDate3 of 3
game_numbernumberGame number3 of 3
day_of_weektextDay of week3 of 3
visiting_teamtextVisiting team code3 of 3
home_teamtextHome team code3 of 3
visiting_scorenumberVisiting score3 of 3
home_scorenumberHome score3 of 3
park_idtextPark ID (hidden)3 of 3
attendancenumberAttendance3 of 3
duration_minutesnumberDuration (minutes)3 of 3
visiting_line_scoretextVisiting line score3 of 3
home_line_scoretextHome line score3 of 3
home_plate_umpiretextHome plate umpire3 of 3
winning_pitchertextWinning pitcher3 of 3
losing_pitchertextLosing pitcher3 of 3
saving_pitchertextSaving pitcher2 of 3
starting_lineupsgroup of valuesStarting lineups3 of 3
team_batting_totalsgroup of valuesTeam batting totals3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordSeason yearGame numberDay of weekVisiting team codeHome team codeVisiting scoreHome scoreAttendanceDuration (minutes)Visiting line scoreHome line scoreHome plate umpireWinning pitcherLosing pitcherSaving pitcherStarting lineupsTeam batting totalsDate
12,0250SundayPITATL1435,82714500000100020000002xDerek ThomasChris SaleJohan OviedoRaisel 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
22,0250SundaySLNCHN0237,49712200000000000001010xBen MayJavier AssadJohn KingJordan 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
32,0250SundayNYNMIA0434,66016900000000000040000xDavid RackleyEdward CabreraBrooks 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.
Known limits
  • 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.