MLB Play-by-Play — Every Pitch Since 1915 avatar

MLB Play-by-Play — Every Pitch Since 1915

Pricing

$0.20 / 1,000 plays

Go to Apify Store
MLB Play-by-Play — Every Pitch Since 1915

MLB Play-by-Play — Every Pitch Since 1915

Every pitch and every event of Major League Baseball since 1915 — batter, pitcher, count, pitch sequence and the raw Retrosheet event notation, one row per play, licensed for commercial use.

Pricing

$0.20 / 1,000 plays

Rating

0.0

(0)

Developer

SourceRow

SourceRow

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Share

Every pitch and every event of Major League Baseball, one row per play. Batter, pitcher, the count, the pitch-by-pitch sequence and the event itself, from 1915 to the last completed season.

What it does

Retrosheet publishes play-by-play as event files in its own notation, one line per play, with the pitch sequence and the outcome encoded as strings that were designed for compactness rather than reading.

This Actor parses a season into one row per play with 41 fields: who was at bat, who was pitching, the count, the pitch sequence, the raw Retrosheet event code, and a decoded outcome.

What you get

41 fields per row, including date, game_id, inning, half, batting_team, batter_id, pitcher_id, balls, strikes, pitch_sequence, play, outcome, is_plate_appearance, is_out, is_hit, bases, modifiers, baserunning, count_known, pitches_continue_next_row, the park and game conditions, and the provenance fields.

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

Input

FieldMeaning
fromSeasonFirst season to include.
toSeasonLast season.
teamsRetrosheet team codes. Empty means all.
maxPlaysStop after this many. 0 removes the cap.
{
"fromSeason": 2024,
"toSeason": 2024,
"maxPlays": 1000
}

Sample output

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

{
"date": "2024-04-05",
"game_id": "ANA202404050",
"inning": 1,
"half": "top",
"batting_team": "BOS",
"batter_id": "duraj001",
"pitcher_id": "canng001",
"balls": 0,
"strikes": 0,
"pitch_sequence": "X",
"play": "6/P78S",
"outcome": "fielded_out",
"is_plate_appearance": true,
"pitches_continue_next_row": false,
"issues": ""
}

Pricing

EventPer 1,000Notes
Play$0.20One charge per play returned

One season is about $50. There is no start fee and no per-row dataset fee.

What it does not do

Pitch counts double if you sum naively. Retrosheet writes a NP (no play) row when a substitution interrupts an at-bat, and repeats the pitch sequence on the next row. pitches_continue_next_row marks those, and issues reports pitches_repeated_in_next_row. Filter on is_plate_appearance instead, or exclude the flagged rows.

No count before 1988. count_known is false for most earlier games. The plays are recorded; the ball-strike count was not.

No pitch velocity, spin or location. Retrosheet is an event record, not tracking data. For pitch physics, a different source is needed.

play is Retrosheet notation. outcome decodes the common cases. The raw code is kept because the notation carries detail no decoding preserves.

Volume. One season is roughly 190,000 plays. Ten seasons is two and a half million rows.

Notes

Filter out pitches_continue_next_row before summing pitches, or filter to is_plate_appearance. Either gives the correct total. This is the single easiest mistake to make with this data.

Request one season at a time until the shape of the query is settled.

game_id matches the identifier used across all Retrosheet products, so this joins directly onto game-level data.

Support

Open the Issues tab with the game_id and the play in question.

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, on the single condition that the notice above appears prominently. Every row carries the licence, and every run records it in the run summary.