MLB Fundamentals for Developers
This page provides a high-level overview of Major League Baseball concepts for developers who are new to baseball. It explains how MLB is structured and how real-world baseball mechanics map to data available in the Sportradar MLB API.
What Is MLB?
Major League Baseball (MLB) is a professional team sport in which 30 teams compete over a 162-game regular season, followed by a postseason tournament that culminates in the World Series.
Unlike clock-based sports, baseball is structured around innings, outs, and plate appearances rather than timed quarters or halves. Games progress through discrete events such as pitches, at-bats, and plays.
In the MLB API, seasons and games are accessed through the Seasons and Schedule feeds.
How MLB Is Structured
American League and National League
MLB consists of two leagues:
- American League (
AL) - National League (
NL)
Each league is divided into three divisions (East, Central, West). League and division information is available in:
League structure is reflected in league.id, division.id, and team-level metadata within season and standings feeds.
Season Types
The MLB season includes multiple season types, identified using the required season_type parameter and returned as season.type in schedule and game feeds.
The following table lists the season types available in the MLB API.
| Value | Name | Definition |
|---|---|---|
PRE | Preseason | Spring Training exhibition games played before the regular season. Results do not count toward standings. |
REG | Regular Season | The 162-game competitive season where teams accumulate wins and losses that determine division rankings and Wild Card eligibility. |
PST | Postseason | The playoff tournament following the regular season, culminating in the World Series. |
AST | All-Star Game | The annual midseason exhibition game featuring selected players from the American and National Leagues. |
WBC | World Baseball Classic | An international tournament featuring national teams, separate from the MLB regular season and postseason structure. |
During the Regular Season (REG), teams compete for division titles and Wild Card spots based on win percentage.
The Postseason (PST) via the series.title includes:
- Wild Card Series
- Division Series (ALDS / NLDS)
- League Championship Series (ALCS / NLCS)
- World Series
<season-schedule id="e2c1d367-7f3d-4244-b8a9-8eefb1fcb062" year="2025" type="PST">
<series title="ALDS - DET vs SEA" start_date="2025-10-04" id="f12b63ce-4ba8-4516-83c1-13a4754b816c" round="ALDS2" best_of="5" status="closed">
<participant name="Tigers" record="2">
<team name="Tigers" market="Detroit" abbr="DET" id="575c19b7-4052-41c2-9f0a-1c5813d02f99" seed="6"/>
</participant>
<participant name="Mariners" record="3">
<team name="Mariners" market="Seattle" abbr="SEA" id="43a39081-52b4-4f93-ad29-da7f329ea960" seed="2"/>
</participant>Season phase and postseason series data can be discovered through:
- League Schedule
- Series Schedule (For bracket and progression workflows, see Tracking MLB Playoffs).
How a Baseball Game Works
A baseball game consists of nine innings, with each inning divided into:
- Top half: Away team bats
- Bottom half: Home team bats
Each half-inning continues until three outs are recorded.
Game state is tracked through:
inninginning_half(top/bottom)outsballsstrikesrunners(base occupancy)
This information is available in:
Pitches, At-Bats, and Plate Appearances
Each offensive sequence follows this hierarchy:
Game → Inning → Half → At-Bat → Pitch → Play Result
Key pitch-level attributes include:
{
"pitch_type": "FF",
"start_speed": 96.4,
"zone": 5,
"outcome": "strike_swinging"
}At-bat results include:
- Single
- Double
- Triple
- Home run
- Walk
- Strikeout
- Fielding out
These are represented within events, pitch, and at_bat objects in:
Applications building live pitch trackers, strike zone visualizations, or play logs should rely on Play-by-Play as the authoritative event feed.
Lineups, Positions, and the Designated Hitter
Each team starts nine players:
| Position | Abbreviation |
|---|---|
| Pitcher | P |
| Catcher | C |
| First Base | 1B |
| Second Base | 2B |
| Third Base | 3B |
| Shortstop | SS |
| Left Field | LF |
| Center Field | CF |
| Right Field | RF |
| Designated Hitter | DH |
Starting lineups and batting order are available in:
Look for:
lineupbatting_orderpositionstarter(boolean)
For real-time lineup changes such as substitutions and pitching changes, use:
For a full integration walkthrough, see Tracking Lineups and Game Rosters.
Pitchers and Bullpens
The starting pitcher begins the game. Relief pitchers enter during substitutions.
Pitching data includes:
innings_pitchedearned_runsstrikeoutswalkspitch_count
Available via:
Pitching changes are surfaced in Play-by-Play as substitution events.
Scoring and Statistics
A run scores when a baserunner legally advances around all four bases and reaches home plate.
Game-level scoring is tracked through:
runshitserrorsleft_on_base
These appear in:
Common Offensive Statistics
| Stat | Meaning |
|---|---|
| AVG | Batting Average |
| OBP | On-Base Percentage |
| SLG | Slugging Percentage |
| OPS | On-base + Slugging |
| HR | Home Runs |
| RBI | Runs Batted In |
Common Pitching Statistics
| Stat | Meaning |
|---|---|
| ERA | Earned Run Average |
| WHIP | Walks + Hits per Inning Pitched |
| K | Strikeouts |
| BB | Walks |
These are available via:
Ballparks and Game Context
MLB games are played in team-specific stadiums with unique dimensions.
Venue data is available through:
Venue attributes include:
namecitystatesurfacecapacity
Weather and attendance may also be included in game-level feeds.
Standings and Rankings
Teams are ranked by:
- Wins (
wins) - Losses (
losses) - Win Percentage (
win_pct) - Games Behind (
games_back)
Available in:
Wild Card standings and division splits are also represented within standings feeds.
For implementation guidance, see Retrieving MLB Standings.
IDs and Data Relationships
MLB data is connected using unique identifiers for:
- Season
- League
- Team
- Game
- Player
- Venue
A typical data flow:
Seasons → Schedule → Game Summary → Play-by-Play → Boxscore → Season Statistics
Understanding ID propagation is critical when linking game events to season-level statistics.
See ID Handling for best practices.
Mapping MLB Concepts to API Feeds
| MLB Concept | API Feed |
|---|---|
| Season | Seasons |
| Game schedule | Schedule |
| Live game state | Game Summary |
| Pitch-by-pitch data | Play-by-Play |
| Box score stats | Game Boxscore |
| Player season stats | Season Statistics |
| Standings | Standings |
| Venue information | Venues |
More Questions?Check our MLB API FAQ or contact support at [email protected]
Updated 24 days ago
