Football standings API in Python

Fetch a league table, including matches that are in play, with one request.

Reviewed 2026-10-14

1. Get an API key

Start a 14-day trial at /register (card required, nothing charged until it ends). Your key is shown after signup and on your dashboard, and switches on when the trial starts. Keep it in an environment variable, not in your source code.

2. Find a league ID

Call /standings/ with no league_id. It returns the leagues that have played recently, with their ids, busiest first. Every league also has a page on the website with its id and copy-paste requests, for example /football-api/eredivisie.

import os
import requests

API = "https://api.predictiqpro.com"
HEADERS = {"Authorization": f"Token {os.environ['PREDICTIQ_KEY']}"}

r = requests.get(f"{API}/standings/", headers=HEADERS, timeout=15)
r.raise_for_status()
for lg in r.json()["leagues"][:10]:
    print(lg["id"], lg["name"], lg["count"], "recent matches")

3. Request the table

Call /standings/ with the league_id. The table is built from the current season's finished matches and matches in play, and is_live tells you whether any match is being played right now. Each row has position, team, played, won, drawn, lost, goalsFor, goalsAgainst and points.

LEAGUE_ID = 0  # replace with an id from the list above
r = requests.get(f"{API}/standings/", headers=HEADERS, params={"league_id": LEAGUE_ID}, timeout=15)
r.raise_for_status()
table = r.json()

print(table["league_name"], "| live now:", table["is_live"])
for row in table["results"]:
    print(row["position"], row["team"], row["played"], row["points"])

Related guides

Ready to build?

Full endpoint reference is in the docs; plans are on the pricing page.

Start 14-day trial