Skip to content

Foresportia Python SDK

Official Python SDK for the Foresportia API, a football analytics API that provides match data, model probabilities, predicted picks, confidence signals, and Core Analytics payloads for building or enriching football prediction models.

Foresportia returns probabilistic forecasts and analytics. It does not provide betting advice, bookmaker odds, or guaranteed outcomes, and it is not a live score feed.

Quick install

pip install foresportia

Quick start

from foresportia import ForesportiaClient

with ForesportiaClient.from_env() as client:
    leagues = client.list_leagues()
    for league in leagues.data:
        print(league.code, league.name, league.matches_available)

    picks = client.list_today_picks()
    for match in picks.data:
        print(match.home_team, "vs", match.away_team, match.pick)

Typed methods return an ApiResponse with data (typed result), payload (full JSON dict), etag, quota, and status_code. The dict-based methods from 0.1.0 (me(), picks_today(), leagues(), ...) keep working unchanged.

Documentation