Baseball Statistics API Guide

This guide demonstrates the comprehensive depth of game and player statistics available through our API, with real examples from an MLB fixture.

Overview

Our API provides enterprise-grade MLB statistics covering:

CategoryStat CountCoverage
Match Stats80+ metricsTeam-level performance
Player Stats100+ metricsIndividual performance
Market Stats30+ metricsBetting-relevant data
Temporal DataBy inningFull game + inning-by-inning

Sample Game Reference

All examples in this guide are from:

New York Yankees 6-3 Boston Red Sox
MLB | Regular Season
June 14, 2025 | Fenway Park
Boston, MA, USA
Attendance: 36,820

Game Statistics Endpoint

Fixture Metadata

Every game includes rich contextual data:

{
  "fixture": {
    "id": "20250614A3F8B21C",
    "game_id": "14027-10881-2025-06-14",
    "start_date": "2025-06-14T23:10:00Z",
    "status": "completed",
    "season_type": "Regular Season",
    "season_year": "2025",
    "venue_name": "Fenway Park",
    "venue_location": "Boston, MA, USA",
    "venue_neutral": false
  }
}

Score Data

Granular scoring breakdown by inning:

"scores": {
   "home": {
      "total": 3,
      "periods": {
         "period_1": 0,
         "period_2": 0,
         "period_3": 2,
         "period_4": 0,
         "period_5": 1,
         "period_6": 0,
         "period_7": 0,
         "period_8": 0,
         "period_9": 0
      }
   },
   "away": {
      "total": 6,
      "periods": {
         "period_1": 2,
         "period_2": 0,
         "period_3": 0,
         "period_4": 3,
         "period_5": 0,
         "period_6": 0,
         "period_7": 1,
         "period_8": 0,
         "period_9": 0
      }
   }
}

Team Statistics Categories

1. Batting

StatisticYankeesRed SoxDescription
runs63Total runs scored
hits107Total hits
at_bats3332At-bats
doubles21Two-base hits
triples01Three-base hits
home_runs21Home runs
rbi63Runs batted in
walks53Base on balls
strikeouts_batting911Batter strikeouts
left_on_base75Runners stranded
stolen_bases12Stolen bases
grounded_into_double_play02GIDPs

Advanced Batting Metrics:

{
  "batting_average": 0.303,
  "on_base_percentage": 0.389,
  "slugging_percentage": 0.545,
  "ops": 0.934,
  "total_bases": 18,
  "runners_in_scoring_position": 5,
  "risp_hits": 3,
  "risp_at_bats": 5
}

2. Pitching

StatisticYankeesRed SoxDescription
innings_pitched9.09.0Total innings pitched
pitches_thrown148162Total pitches
strikes_thrown96101Strikes thrown
hits_allowed710Hits against
earned_runs36Earned runs allowed
walks_allowed35BB against
strikeouts_pitching119Batters struck out
home_runs_allowed12HR surrendered
era3.006.00Earned run average
whip1.111.67Walks + hits per inning

Pitch Mix Breakdown:

{
  "fastball_count": 68,
  "fastball_avg_velocity": 95.3,
  "breaking_ball_count": 44,
  "offspeed_count": 36,
  "first_pitch_strike_pct": 0.643,
  "swinging_strikes": 18,
  "called_strikes": 29,
  "ground_ball_pct": 0.44,
  "fly_ball_pct": 0.32
}

3. Fielding

StatisticYankeesRed SoxDescription
errors01Defensive errors
putouts2727Outs recorded
assists97Fielding assists
passed_balls00Passed balls
fielding_percentage1.000.973Fielding pct

Market Statistics (Betting Data)

Pre-calculated metrics for betting markets:

{
  "home": {
    "team_total": 3.0,
    "1st_half_team_total": 2.0,
    "2nd_half_team_total": 1.0,
    "1st_inning_team_total": 0.0,
    "team_total_hits": 7.0,
    "team_total_strikeouts": 11.0,
    "team_total_home_runs": 1.0,
    "team_total_errors": 1.0
  },
  "away": {
    "team_total": 6.0,
    "1st_half_team_total": 5.0,
    "2nd_half_team_total": 1.0,
    "1st_inning_team_total": 2.0,
    "team_total_hits": 10.0,
    "team_total_strikeouts": 9.0,
    "team_total_home_runs": 2.0,
    "team_total_errors": 0.0
  }
}

Player Statistics Endpoint

Player Metadata

{
  "player": {
    "id": "C4D1E9F27A3B",
    "name": "Aaron Judge",
    "position": "RF",
    "number": 99,
    "numerical_id": 592450,
    "base_id": 107652
  },
  "team": {
    "id": "A4E71B2F9C88",
    "name": "New York Yankees"
  },
  "status": "completed",
  "is_starter": true,
  "batting_order": 3
}

Featured Player Example: Aaron Judge

Game Performance: 2-for-4, 1 HR, 2 RBI, 1 BB

Hitting Detail

{
  "at_bats": 4.0,
  "hits": 2.0,
  "singles": 1.0,
  "home_runs": 1.0,
  "rbi": 2.0,
  "runs": 2.0,
  "walks": 1.0,
  "strikeouts": 1.0,
  "total_bases": 5.0
}

Home Run Detail

{
  "home_run_inning": 4,
  "home_run_distance_ft": 452,
  "home_run_exit_velocity": 112.4,
  "home_run_launch_angle": 28,
  "home_run_runners_on": 1
}

Player Categories Deep Dive

Batting Statistics

Example: Juan Soto (1B, 2B, BB)

{
  "at_bats": 3.0,
  "plate_appearances": 4.0,
  "hits": 2.0,
  "singles": 1.0,
  "doubles": 1.0,
  "triples": 0.0,
  "home_runs": 0.0,
  "rbi": 1.0,
  "runs": 1.0,
  "walks": 1.0,
  "strikeouts": 0.0,
  "hit_by_pitch": 0.0,
  "stolen_bases": 1.0,
  "caught_stealing": 0.0,
  "grounded_into_double_play": 0.0,
  "total_bases": 3.0,
  "batting_average": 0.667,
  "on_base_percentage": 0.750
}

Starting Pitcher Statistics

Example: Gerrit Cole (W, 7.0 IP, 11 K)

{
  "innings_pitched": 7.0,
  "pitches_thrown": 103,
  "strikes_thrown": 71,
  "hits_allowed": 5,
  "runs_allowed": 3,
  "earned_runs": 3,
  "walks_allowed": 2,
  "strikeouts": 11,
  "home_runs_allowed": 1,
  "win": true,
  "loss": false,
  "quality_start": true,
  "era": 3.86,
  "whip": 1.00,
  "k_per_9": 14.14,
  "k_bb_ratio": 5.50,
  "first_pitch_strike_pct": 0.652,
  "swinging_strike_pct": 0.142,
  "ground_ball_pct": 0.46
}

Relief Pitcher Statistics

Example: Luke Weaver (SV, 2.0 IP)

{
  "innings_pitched": 2.0,
  "pitches_thrown": 28,
  "hits_allowed": 1,
  "runs_allowed": 0,
  "earned_runs": 0,
  "walks_allowed": 0,
  "strikeouts": 3,
  "save": true,
  "hold": false,
  "blown_save": false,
  "inherited_runners": 0,
  "inherited_runners_scored": 0
}

Catcher Statistics

Example: Austin Wells

{
  "at_bats": 3.0,
  "hits": 1.0,
  "rbi": 1.0,
  "stolen_bases_allowed": 1.0,
  "caught_stealing_catcher": 1.0,
  "passed_balls": 0.0,
  "catcher_framing_runs": 0.6,
  "putouts": 9.0,
  "assists_catcher": 1.0
}

Player Market Stats

Pre-calculated for betting markets:

{
  "player_hits": 2.0,
  "player_home_runs": 1.0,
  "player_rbi": 2.0,
  "player_runs": 2.0,
  "player_total_bases": 5.0,
  "player_hits_+_runs_+_rbi": 6.0,
  "player_stolen_bases": 0.0,
  "player_walks": 1.0,
  "player_strikeouts_batting": 1.0,
  "player_singles": 1.0,
  "player_doubles": 0.0,
  "player_triples": 0.0,
  "player_strikeouts_pitching": 11.0,
  "player_innings_pitched": 7.0,
  "player_pitches_thrown": 103.0,
  "player_hits_allowed": 5.0,
  "player_walks_allowed": 2.0,
  "player_earned_runs": 3.0,
  "player_win": 1.0
}

Period-by-Period Breakdown

Statistics are available for:

  • all - Full game aggregates
  • period_1 - 1st Inning
  • period_2 - 2nd Inning
  • period_3 - 3rd Inning
  • period_4 - 4th Inning
  • period_5 - 5th Inning
  • period_6 - 6th Inning
  • period_7 - 7th Inning
  • period_8 - 8th Inning
  • period_9 - 9th Inning
  • period_10+ - Extra Innings

Example: Aaron Judge by Inning

MetricInn 1Inn 2Inn 3Inn 4Inn 5-9Full Game
at_bats101114
hits001102
home_runs000101
rbi000202
walks010001
strikeouts100001

Key Identifiers

ID TypeExampleUse Case
id (string)"C4D1E9F27A3B"Primary API reference

Complete Statistic Reference

Match-Level Stats (80+)

Batting

  • runs, hits, at_bats, batting_average
  • singles, doubles, triples, home_runs
  • rbi, walks, strikeouts_batting, left_on_base
  • stolen_bases, caught_stealing, hit_by_pitch
  • sacrifice_flies, grounded_into_double_play
  • on_base_percentage, slugging_percentage, ops
  • total_bases, runners_in_scoring_position, risp_hits, risp_at_bats

Pitching

  • innings_pitched, pitches_thrown, strikes_thrown, balls_thrown
  • hits_allowed, runs_allowed, earned_runs, era
  • walks_allowed, strikeouts_pitching, home_runs_allowed, whip
  • fastball_count, fastball_avg_velocity, breaking_ball_count, offspeed_count
  • first_pitch_strike_pct, swinging_strikes, ground_ball_pct, fly_ball_pct

Fielding

  • errors, putouts, assists, passed_balls, fielding_percentage

Player-Level Stats (100+)

Batting

  • at_bats, plate_appearances, hits, singles, doubles, triples, home_runs
  • rbi, runs, walks, strikeouts, hit_by_pitch
  • stolen_bases, caught_stealing, grounded_into_double_play, sacrifice_flies
  • total_bases, batting_average, on_base_percentage, slugging_percentage

Pitching

  • innings_pitched, pitches_thrown, strikes_thrown
  • hits_allowed, earned_runs, walks_allowed, strikeouts, home_runs_allowed
  • win, loss, save, hold, blown_save, quality_start
  • era, whip, k_per_9, k_bb_ratio
  • first_pitch_strike_pct, swinging_strike_pct, ground_ball_pct
  • inherited_runners, inherited_runners_scored

Fielding / Catching

  • putouts, assists, errors, fielding_percentage
  • passed_balls, stolen_bases_allowed, caught_stealing_catcher, catcher_framing_runs

Use Cases

Use CaseRelevant Stats
Prop BettingHits, HRs, RBI, total bases, pitcher strikeouts, walks
Run Line & Game TotalsRuns, ERA, WHIP, team totals by half
F5 MarketsFirst-half team totals, starting pitcher splits, 1st inning scoring
Fantasy & DFSH+R+RBI combos, stolen bases, quality starts, saves
Scouting & AnalyticsExit velocity, launch angle, pitch velocity, K/BB, ground ball %
BroadcastingReal-time stat overlays, inning-by-inning splits, player comparisons