Skip to content
DFS Directory

pybaseball

Python package for Statcast, FanGraphs and Baseball Reference data

About pybaseball

pybaseball is an MIT-licensed Python library that downloads pitch-level Statcast data from Baseball Savant, season stats from FanGraphs, and historical records and standings from Baseball Reference. James LeDoux created it, and Moshe Schorr now maintains it. The last PyPI release (2.2.7) came out in September 2023, but the repository had commits as recently as January 2026.

Features

  • Statcast pitch-level queries
  • FanGraphs batting and pitching leaderboards
  • Baseball Reference stats and standings
  • Player ID lookup
  • pandas DataFrame output

Sports and sites covered

Sports

Works with

Not tied to a specific DFS site.

Pricing

Free

Open source (MIT)

Prices as listed on github.com when we checked. Confirm current pricing on their site.

Compare pybaseball

Alternatives to pybaseball

Compare all alternatives
  • Open-source R, Python and JS packages for college and pro play-by-play data

    Data APINFLCFBNBACBBWNBA+3
    Free
  • College football and basketball stats API with a free tier and cheap paid tiers

    Data APICFBCBB
    Free, or $1/mo
  • Open-source R and Python packages for NFL play-by-play and related data

    Data APINFL
    Free
  • Developer API for stats, odds and player props across 20+ leagues

    Data APINBAWNBANFLMLBNHL+8
    Free, or $9.99/mo
  • Budget sports stats API with live, historical and DFS slate feeds

    Data APINFLCFBNBACBBMLB+1DraftKings, FanDuel, Yahoo
    Free + paid plans
  • Low-latency odds and same-game-parlay API that includes PrizePicks and Splash lines

    Data APINFLCFBNBACBBWNBA+7PrizePicks, Splash Sports
    From $299/mo

Sources and corrections

Last checked Oct 3, 2026. We build every listing from the sources below and recheck them regularly. If something about pybaseball has changed, let us know.