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)

Also available for Node.js: npm install fivedollarfootball.

Install

pip install fivedollarfootball

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

Metadata

Release files for fivedollarfootball 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fivedollarfootball 0.1.3
File Size Uploaded
fivedollarfootball-0.1.3.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fivedollarfootball 0.1.3
File Interpreter ABI Platform
fivedollarfootball-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 20.9 kB

Release files / fivedollarfootball-0.1.3.tar.gz

Download URL fivedollarfootball-0.1.3.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a539fe620c1fa2a7e903720eab2c48f6675a26a8638a08fa467c927e2c55189e
BLAKE2b-256 checksum
How to use checksums
c96bfcb1fc25f948234ffb85e88474900c86f1e5aba3f46338b723b79b84b731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / fivedollarfootball-0.1.3-py3-none-any.whl

Download URL fivedollarfootball-0.1.3-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8e78f5f4694de4adc2369c51d1e78c2b0e7c653c0cdb13e622e06b613c9e6c0
BLAKE2b-256 checksum
How to use checksums
e041ea3c856dbbfb6ada695048519ae91326f35250322425610bc940791a1fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page