--- id: espn-api version: "0.46.0" license: unclear license_treatment: permissive maintenance: active --- # espn-api — ESPN API License: permissive · Maintenance: active · Downloads: 77.0K/mo ## What it is and what it does espn-api is a Python wrapper around ESPN's Fantasy API that lets you programmatically fetch league, team, and player data from Fantasy Football and Basketball leagues. It handles authentication and API communication through requests and urllib3, abstracting away the complexity of ESPN's endpoints so you can work directly with league objects. You instantiate a League object with a league ID and year, then query teams, players, and statistics. The package supports both public and private leagues. Hockey and Baseball APIs are noted as in development. It's actively maintained with recent commits and has no known security vulnerabilities. Use it for: - Build a dashboard or bot that pulls live Fantasy Football standings and player stats from your league - Analyze historical league data across multiple seasons for performance trends - Automate Fantasy Basketball trade analysis or draft preparation by querying league rosters - Export league data to a database or spreadsheet for further analysis - Create alerts or notifications based on roster changes or scoring updates ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extracts league, team, and player data from ESPN's Fantasy API for Football and Basketball leagues, supporting both public and private leagues. Yes. Low install friction, permissive MIT license, active maintenance, no vulnerabilities, and a clear use case for anyone managing or analyzing ESPN fantasy leagues. The two-dependency footprint is minimal. Verify that Hockey and Baseball APIs meet your needs if you plan to use those sports. ## Install pip install espn-api uv add espn-api poetry add espn-api ## Installing espn-api Before you install: Low friction installation via pip with only two runtime dependencies (requests and urllib3). Active maintenance with recent commits and no known vulnerabilities. License in practice: MIT-licensed under permissive terms, allowing use in commercial and private projects with minimal restrictions. Quickstart: pip install espn_api from espn_api.football import League league = League(league_id=222, year=2019) Verify before relying: - Whether Hockey and Baseball APIs are production-ready or still in development - Exact Python version requirements (requires_python unspecified in metadata) ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 77.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags espn fantasy football api, espn fantasy basketball api, fantasy league data extraction, espn league statistics, fantasy sports api wrapper, fantasy-sports, espn-integration [View on SkillFed](https://skillfed.io/packages/espn-api) · [View on PyPI](https://pypi.org/project/espn-api/)