# jldbc/pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)

Repository: https://github.com/jldbc/pybaseball
Canonical: https://ross.abutalabs.com/products/pybaseball
Language: Python
License: MIT
License Family: permissive
Topics: baseball, sabermetrics, python, data, statcast
Last push: 2026-01-04T14:44:17+00:00

## Health v2 (maintenance only)
Score: 50/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 60, release rhythm 8, longevity 100
- inputs: {"age_days": 3361, "days_push": 241, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1719, forks 424 (observed 2026-08-28T04:05:26.664494+00:00)

## What it is
pybaseball is a Python package that scrapes and retrieves current and historical baseball statistics from sources like MLB Statcast (Baseball Savant), Baseball Reference, and FanGraphs. It provides convenient functions for pulling pitch-level Statcast data, batting/pitching stats, standings, and awards data into pandas DataFrames.

## Use cases
- pull statcast pitch-level data for MLB games
- download historical batting and pitching statistics
- analyze sabermetrics data in Python
- get team standings and records
- retrieve MLB awards data
- scrape baseball reference and fangraphs data without writing scrapers

## When to choose
- you need MLB data in pandas DataFrames for analysis
- you want pitch-level Statcast metrics like launch speed and spin rate
- you're doing sabermetric research or sports analytics in Python

## When to avoid
- you need data for sports other than baseball
- you need a real-time live game feed API
- you need guaranteed uptime since it scrapes third-party sites that may change

## Facets
- artifact type: library
- maturity: active
- function: web-scraping, data-science, etl
- domain: sports, data-science, analytics
- platform: python, cross-platform
- tags: baseball, sabermetrics, statcast, fangraphs, baseball-reference, sports-analytics

## Member repositories
- jldbc/pybaseball (main) score 50

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:26.664494+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:34:07.278952+00:00, confidence not recorded.
  - readme: https://github.com/jldbc/pybaseball (fetched 2026-08-28T04:05:26.664494+00:00, sha 788c68b25103)
  - registry_pypi: https://pypi.org/pypi/pybaseball/json (fetched 2026-08-29T11:09:58.421726+00:00, sha 38bffd050a4f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
