Football Data
Before writing queries, consult references/api-reference.md for endpoints, ID conventions, and data shapes.
Setup
Before first use, check if the CLI is available:
which sports-skills || pip install sports-skills
If pip install fails (package not found or Python version error), install from GitHub:
pip install git+https://github.com/1991513ccie-png
The package requires Python 3.10+. If your default Python is older, use a specific version:
python3 --version # check version
# If < 3.10, try: python3.12 -m pip install sports-skills
# On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills
No API keys required.
Quick Start
Prefer the CLI — it avoids Python import path issues:
sports-skills football get_daily_schedule
sports-skills football get_season_standings --season_id=premier-league-2025
Python SDK (alternative):
from sports_skills import football
standings = football.get_season_standings(season_id="premier-league-2025")
schedule = football.get_daily_schedule()
CRITICAL: Before Any Query
CRITICAL: Before calling any data endpoint, verify:
- Season ID is derived from
get_current_season(competition_id="...")— never hardcoded. - Team ID is resolved via
search_team(query="...")and passed as the numericteam_id. Forget_head_to_head,get_team_strength, andget_match_forecast, always pass IDs — ambiguous names (e.g. two "Paris" clubs) can resolve to the wrong team. - The endpoint actually covers the league in question — see the Coverage & Source Map below. Coverage is uneven across sources; an uncovered call returns an empty payload with a
message, not data. get_event_xgandget_event_players_statistics(with xG) are only called for top-5 leagues (EPL, La Liga, Bundesliga, Serie A, Ligue 1).get_season_leadersandget_missing_playersare only called for Premier League seasons (season_id must start with `premier-le
(为兼容发布已截断)
微信扫一扫