statsbombpy
easily stream StatsBomb data into Python
What it is and what it does
StatsBombpy is a Python client for StatsBomb's football analytics platform. It retrieves structured match, event, lineup, and competition data and returns it as pandas DataFrames, making it easy to load StatsBomb datasets into analysis workflows. The package supports both authenticated API access (for paying customers) and free public datasets hosted on GitHub.
The package handles authentication via environment variables or inline credentials, supports parallel event and frame fetching across multiple CPU cores (configurable via SB_CORES), and includes caching via requests-cache to reduce redundant API calls. Its main dependencies are pandas for data structures, requests for HTTP communication, and joblib for concurrent processing.
Use it for:
- Fetch competition and match metadata for a specific league and season to build a fixture list for analysis.
- Download event-level data (passes, shots, fouls, etc.) for a single match and analyze player actions or team tactics.
- Retrieve lineup data to cross-reference player IDs, positions, and physical attributes with event records.
- Batch download events across multiple matches using parallel processing to speed up large dataset assembly.
- Combine StatsBomb data with external sources (team stats, player ratings) in a pandas workflow for custom analytics.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Streams StatsBomb football analytics data into Python via API (for paying customers) or free public datasets from GitHub, returning structured match, event, lineup, and competition information as pandas DataFrames.
Yes, if you have StatsBomb API credentials or want to use its free public datasets. Install friction is low, maintenance is active, and no known vulnerabilities exist. The main caveat is unclear licensing—verify the User Agreement and data usage terms before publishing research or deploying in production. Python version support is unspecified, so test compatibility with your environment.
Install
statsbombpy on PyPI
pip
pip install statsbombpyuv
uv add statsbombpypoetry
poetry add statsbombpyInstalling statsbombpy
Before you install
Low friction: pure Python wheel with five common runtime dependencies (pandas, requests, requests-cache, inflect, joblib). Active maintenance—last commit 2026-07-30, 15 days old—and 738 GitHub stars suggest ongoing support.
License in practice
License treatment is unclear; no SPDX or raw license metadata is available. Users should verify licensing terms, especially the StatsBomb User Agreement referenced in the package documentation, before using data in production or publishing research.
Quickstart
pip install statsbombpy
from statsbombpy import sb
# Free public data, no credentials needed
competitions_df = sb.competitions()
matches_df = sb.matches(competition_id=9, season_id=42)
events_df = sb.events(match_id=303299)
API access requires StatsBomb paid credentials (SB_USERNAME and SB_PASSWORD environment variables or creds dict argument); free data is available without authentication.
Verify before relying
- Whether free public data access requires email registration or has usage restrictions beyond the User Agreement.
- Python version compatibility (requires_python is unspecified in metadata).
- Whether the package's concurrency features (SB_CORES environment variable) scale predictably with system resources.
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — pandas, requests, requests-cache, inflect, joblib |
| Maintenance | actively maintained — 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 108,663/month — #12,546 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: statsbombpy-1.22.0-py3-none-any.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
nflreadpyDownloads and caches NFL data from nflverse…
permissive · top 15,000 on PyPI
nba_apinba_api provides Python access to NBA.com's…
permissive · top 15,000 on PyPI
espn-apiExtracts league, team, and player data from…
permissive · top 15,000 on PyPI
pybaseballScrapes baseball data from Baseball Reference,…
permissive · top 15,000 on PyPI
nfl-data-pyImports NFL play-by-play, weekly, seasonal,…
permissive · top 15,000 on PyPI
eurostatFetches statistical data and metadata from…
permissive · top 15,000 on PyPI
meteostatMeteostat provides access to historical weather…
unclear · top 15,000 on PyPI
MLB-StatsAPIProvides Python access to MLB's Stats API,…
copyleft · top 15,000 on PyPI
betfairlightweightA Python wrapper for the Betfair API-NG that…
permissive · top 15,000 on PyPI
names-datasetLooks up demographic information about first…
permissive · top 15,000 on PyPI