Github Copilot
How it works
Setup
# Sportmonks Football API v3
## Base URL
https://api.sportmonks.com/v3/football
## Authentication
Always use the `api_token` query parameter. Read from environment variables:
- Node.js: `process.env.SPORTMONKS_API_TOKEN`
- Python: `os.environ["SPORTMONKS_API_TOKEN"]`
- Go: `os.Getenv("SPORTMONKS_API_TOKEN")`
Never hardcode the token.
## Key endpoints
- Search players: GET /players/search/{query}
- Search teams: GET /teams/search/{query}
- Search leagues: GET /leagues/search/{query}
- Player profile: GET /players/{id}?include=position;nationality;teams
- Team profile: GET /teams/{id}?include=venue;country
- Current squad: GET /squads/teams/{team_id}?include=player;position;detailedPosition
- Fixtures by date: GET /fixtures/date/{YYYY-MM-DD}?include=participants;scores;state
- Fixture detail: GET /fixtures/{id}?include=participants;scores;state;events;lineups;statistics
- Head to head: GET /fixtures/head-to-head/{team1_id}/{team2_id}?per_page=5&order=desc
- Live scores: GET /livescores/inplay?include=participants;scores;state
- Standings: GET /standings/live/leagues/{league_id}?include=participant;details
- Topscorers: GET /topscorers/seasons/{season_id}?include=player;participant&filters=seasonTopscorerTypes:208
## Includes
Semicolon-separated string: ?include=participants;scores;state;league
## Filters
Key:value syntax: ?filters=fixtureLeagues:8
## Response shape
All responses: { "data": ... }
Lists: { "data": [...], "pagination": { "has_more": bool, "current_page": int } }
Always access `.data`, not the root response.
## Common IDs
Premier League: 8 | La Liga: 564 | Bundesliga: 82 | Serie A: 384
Champions League: 2 | World Cup 2026: league_id=732, season_id=26618
Topscorer types: goals=208, assists=209, yellow cards=84
## Error handling
401/403 - invalid token or subscription restriction
404 - resource not found
429 - rate limit, back off and retry with exponential backoffWhat changes
Copilot Chat
Last updated
Was this helpful?