elevenelo
Python client for the 11elo Soccer ELO API — live and historical Elo ratings for German football (Bundesliga, 2. Bundesliga, 3. Liga).
Installation
pip install elevenelo
Requires Python 3.10+ and requests.
Quick start
from elevenelo import Client
client = Client(api_key="11e_fre_your_key_here")
# List all teams
teams = client.get_teams()
for team in teams:
print(team["teamName"], team["currentElo"])
# Get detailed info for one team
team = client.get_team("Bayern München")
print(team["team"]["currentElo"])
# Upcoming matches
upcoming = client.get_upcoming_matches(league="BL1", limit=10)
for match in upcoming:
print(match["homeTeam"], "vs", match["awayTeam"])
Getting an API key
Register for free at https://www.11elo.com/docs.
Keys follow the format 11e_<tier>_<hex> and are passed via the X-API-Key request header (handled automatically by this client).
Rate limits by tier:
| Tier | Requests / day |
|---|---|
| Free | 100 |
| Basic | 1,000 |
| Pro | 10,000 |
API reference
Client(api_key, *, base_url, timeout, session)
| Parameter | Default | Description |
|---|---|---|
api_key |
— | Your 11elo API key (required) |
base_url |
https://api.11elo.com |
Override for self-hosted / local dev |
timeout |
30 |
HTTP request timeout in seconds |
session |
None (auto-created) |
Custom requests.Session |
Teams
client.get_teams() → list[dict]
Returns all teams with current ELO stats, league info and trend data.
teams = client.get_teams()
# [{"teamName": "Bayern München", "currentElo": 1847, "league": "BL1", ...}, ...]
client.get_team(team_name) → dict
Full detail for one team — ELO history, recent form, upcoming matches, career stats.
team = client.get_team("Borussia Dortmund")
# {
# "team": {"name": "Borussia Dortmund", "currentElo": 1720, ...},
# "eloHistory": [...],
# "recentForm": [...],
# "upcomingMatches": [...]
# }
client.get_head_to_head(team1, team2) → list[dict]
Historical head-to-head match results between two teams.
h2h = client.get_head_to_head("Bayern München", "Borussia Dortmund")
# [{"date": "2026-02-15", "result": "2:1", "winner": "Bayern München", ...}, ...]
Matches
client.get_matches(*, season, from_date, to_date, limit, offset) → list[dict]
Paginated match history. All parameters are optional.
matches = client.get_matches(season="2024/2025", limit=50)
# [{"homeTeam": "Bayern München", "awayTeam": "BVB", "homeElo": 1835, ...}, ...]
client.get_upcoming_matches(*, league, sort, limit) → list[dict]
Upcoming fixtures with ELO-difference predictions.
upcoming = client.get_upcoming_matches(league="BL1", limit=20)
# [{"homeTeam": "...", "awayTeam": "...", "eloDiff": 40, ...}, ...]
client.get_match(match_id) → dict
Full detail for a single match: teams, ELO at time of match, head-to-head, recent form.
match = client.get_match(12345)
# {"match": {...}, "homeRecentForm": [...], "awayRecentForm": [...], ...}
Seasons
client.get_seasons() → dict
List all available seasons and the latest one.
data = client.get_seasons()
# {"seasons": ["2025/2026", "2024/2025", ...], "latestSeason": "2025/2026"}
client.get_season(season, *, league) → list[dict]
Per-team ELO change statistics for a given season.
entries = client.get_season("2024/2025", league="BL1")
# [{"teamName": "Bayern München", "startElo": 1820, "endElo": 1847, "change": 27, ...}, ...]
Comparison
client.get_comparison_history(teams) → dict
Time-series ELO data for multiple teams in one call.
history = client.get_comparison_history(["Bayern München", "Borussia Dortmund"])
# {
# "Bayern München": [{"Date": 1709856000000, "ELO": 1847}, ...],
# "Borussia Dortmund": [{"Date": 1709856000000, "ELO": 1720}, ...]
# }
Error handling
All exceptions inherit from elevenelo.ElevenEloError.
| Exception | When raised |
|---|---|
AuthenticationError |
API key is missing or invalid (HTTP 401) |
RateLimitError |
Daily quota exceeded (HTTP 429) |
NotFoundError |
Resource does not exist (HTTP 404) |
ApiError |
Any other non-2xx response |
from elevenelo import Client, AuthenticationError, RateLimitError, NotFoundError
client = Client(api_key="11e_fre_your_key_here")
try:
team = client.get_team("Unknown FC")
except NotFoundError:
print("Team not found")
except RateLimitError as e:
print(f"Rate limit hit, resets at {e.reset_at}")
except AuthenticationError:
print("Bad API key")
License
MIT
Metadata
Release files for elevenelo 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| elevenelo-0.1.1.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elevenelo-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / elevenelo-0.1.1.tar.gz
| Download URL | elevenelo-0.1.1.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9575ccae8149145cd3259e7b4c69c7ffd2905270698bef179c2eb0a8e606e1c0
|
|
BLAKE2b-256 checksum How to use checksums |
cfda2ae8445b1921e59153886185d55011546d03b9c45be01534b5060fdaab8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / elevenelo-0.1.1-py3-none-any.whl
| Download URL | elevenelo-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a98fc74164fedb6cacf1879f90dd067897ab4ff96175b7b4030e409b6d183611
|
|
BLAKE2b-256 checksum How to use checksums |
fe7dac39892d867a416208266a7fc80a54ed6bbb93dbff15463ece853ac7635b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|