--- id: mlb-statsapi version: "1.9.0" license: unclear license_treatment: copyleft maintenance: active --- # MLB-StatsAPI — MLB Stats API Wrapper for Python License: copyleft · Maintenance: active · Downloads: 137.8K/mo ## What it is and what it does MLB-StatsAPI is a Python wrapper around MLB's public Stats API that lets you programmatically retrieve baseball data—games, scores, player stats, team information, and more. It abstracts away the HTTP details by wrapping requests, so you can focus on querying the data you need rather than building API calls manually. The package is maintained actively with recent development and has a straightforward install with minimal dependencies. It's designed for developers building baseball-related applications, data analysis tools, or dashboards that need live or historical MLB information. Note that this is an unofficial wrapper; data usage is subject to MLB's terms, and the package is not affiliated with MLB or any MLB team. Use it for: - Build a dashboard or web app that displays live MLB game scores and standings - Analyze historical player statistics or team performance across seasons - Create alerts or notifications for specific teams, players, or game outcomes - Populate a database with MLB data for research or fantasy baseball applications - Integrate MLB data into a sports news or stats aggregation tool ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python access to MLB's Stats API, allowing you to query baseball statistics, game data, player information, and other MLB-related data programmatically. Yes, if you need programmatic access to MLB data. Low install friction, active maintenance, no known vulnerabilities, and a single lightweight dependency make it straightforward to adopt. The GPLv3 license requires that any derivative work also be open-source, so verify that aligns with your project's licensing model before committing. ## Install pip install mlb-statsapi uv add mlb-statsapi poetry add mlb-statsapi ## Installing MLB-StatsAPI Before you install: Low friction installation with a single runtime dependency (requests). Active maintenance with recent commits and steady development history since 2019-04-26. License in practice: Licensed under GPLv3 (copyleft). Any derivative work or modification must also be released under GPLv3; redistribution requires source code availability. Quickstart: pip install mlb-statsapi import statsapi # Fetch game data games = statsapi.schedule(start_date='2025-04-04', end_date='2025-04-04') Verify before relying: - Whether the package supports querying historical data beyond the current season - Rate limiting or throttling behavior when making repeated API calls - Specific Python version compatibility (requires_python is unspecified) ## Package facts - License: not declared (copyleft) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 137.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags MLB baseball statistics API, fetch MLB game data python, baseball stats wrapper, MLB player statistics, baseball data API client, sports-data, api-wrapper [View on SkillFed](https://skillfed.io/packages/mlb-statsapi) · [View on PyPI](https://pypi.org/project/mlb-statsapi/)