Skip to main content

5DollarFootballAPI — Python client

Official Python client for the 5DollarFootballAPI: football (soccer) fixtures, live scores, standings, statistics and odds — including full odds movement history and corner & card lines most football APIs don't carry.

  • 15 endpoints, one method each — mirrors the API docs exactly
  • Automatic retry on rate limits, honoring Retry-After
  • Typed exceptions (AuthenticationError, RateLimitError, ...) with the API's error code and request_id
  • Built-in pagination helper that walks has_more pages for you
  • Python 3.8+, one dependency (requests)

Install

pip install fivedollarfootball

Until the package lands on PyPI you can install straight from GitHub:

pip install git+https://github.com/5dollarfootballapi/football-api-python-sdk.git

Quickstart

Grab a free API key at 5dollarfootballapi.com — the free tier covers the top-5 European leagues, no credit card required.

from fivedollarfootball import Client

client = Client("fb_live_your_key")

# Today's fixtures (kickoff window defaults to today UTC)
for match in client.fixtures():
    teams = match["teams"]
    print(teams["home"]["name"], "vs", teams["away"]["name"], "-", match["status"])

# Live matches only
live = client.fixtures(status="live")

# One fixture with events and statistics included
fixture = client.fixture(1234567, include=["events", "stats"])

Odds and odds history

# Current prices for a fixture: 1x2, Asian handicap, goal line, corners, cards, BTTS
odds = client.fixture_odds(1234567, bookmakers=["bet365", "pinnacle"], market="1x2")

# Every recorded price movement for a market — the endpoint most APIs don't have
for tick in client.iter_all(client.odds_history, fixture_id=1234567, market="corner"):
    print(tick)

# Which bookmakers are available on your plan
books = client.bookmakers()

Leagues, teams, standings

leagues = client.leagues(popular=True)
league_id = leagues[0]["id"]

# A league season's fixtures
finished = client.league_fixtures(league_id, status="finished")

# League table — also as corner or card standings
table = client.standings(league_id)
corner_table = client.standings(league_id, type="corner")

team_id = finished[0]["teams"]["home"]["id"]
team = client.team(team_id)
recent = client.team_fixtures(team_id, status="finished")

Pagination

Paginated methods return a Page (a plain list plus page, per_page, count, has_more). To walk every page:

for fixture in client.iter_all(client.fixtures, status="finished"):
    ...

Time windows

start_time / end_time accept unix seconds or datetime objects (naive datetimes are treated as UTC):

import datetime as dt

start = dt.datetime(2026, 8, 22, tzinfo=dt.timezone.utc)
weekend = client.fixtures(start_time=start, end_time=start + dt.timedelta(hours=24))

Errors and rate limits

from fivedollarfootball import APIError, RateLimitError

try:
    client.fixture(999999999)
except RateLimitError as e:
    print("try again in", e.retry_after, "seconds")
except APIError as e:
    print(e.status_code, e.code, e.message, e.request_id)

The client retries 429 responses automatically (max_retries=2 by default) and exposes the latest rate-limit headers on client.rate_limit:

client.status()
print(client.rate_limit)  # {'limit': 10, 'remaining': 9, 'reset': 1755590400}

Links

Development

pip install -e .
python -m unittest discover tests

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fivedollarfootball-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fivedollarfootball-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file fivedollarfootball-0.1.0.tar.gz.

File metadata

  • Download URL: fivedollarfootball-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for fivedollarfootball-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aaabc9fc574f467c8978e84483334bf2859dc828e0cb44d265b26179a07750d3
MD5 2e8df9edc98592b2f5218bfb9ff0d72d
BLAKE2b-256 e66ba792ff6eefd2e0fad609d7550f689a2cf7e573064bd2d89031cf99cbe422

See more details on using hashes here.

File details

Details for the file fivedollarfootball-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fivedollarfootball-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c7627b4d8b9c9e0af66e0b7a222eb4cc4df56886bad016c5d1657196aee67f9
MD5 b54747078228f63019cfa0ac41436668
BLAKE2b-256 e0540989e12a6ac586847ed75509f218ff3c16bd3951a15c8caafbcfb23aab4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page