DEV Community

kenn-kentonm
kenn-kentonm

Posted on

I tested whether my football model beats the bookmakers. It doesn't, so my API says so

I built a football prediction API. Then I tested it against the thing that matters: the bookmaker market. It didn't beat it.
That could have been the end of the project. Instead it changed the product.
The result
Bookmaker odds, once you strip out the margin, are a very good probability estimate. My statistical model added nothing measurable on top. So I stopped pretending.
Now, where odds exist, the API returns the margin-free consensus across bookmakers. Where they don't, it falls back to the model. Every response says which one you got:
{ "prob_home": 0.48, "prob_draw": 0.27, "prob_away": 0.25, "basis": "market_consensus" }
(Illustrative values. The real response has more fields.)
Check it yourself
I publish the track record, misses included: [N] finished matches, forecast before kickoff, log loss [log loss], Brier [Brier].
Public page: https://www.predictiqpro.com/accuracy
The same numbers with no API key: GET https://api.predictiqpro.com/status/accuracy
How it's calculated: https://www.predictiqpro.com/methodology
Using it
Every league has a page with its ID and requests you can paste. Live scores, Python:
import requests

r = requests.get(
"https://api.predictiqpro.com/fixtures/",
params={"league_id": 88}, # Eredivisie: see /football-api/eredivisie for the ID
headers={"Authorization": "Token YOUR_API_KEY"},
timeout=15,
)
for m in r.json()["results"][:5]:
print(m["home_team"], "vs", m["away_team"], m["status"])
Check the league ID on the league's page before you use it. I haven't verified 88 here, so don't copy it blindly. Live scores in JavaScript:
const headers = { Authorization: "Token YOUR_API_KEY" };
setInterval(async () => {
const res = await fetch("https://api.predictiqpro.com/live/feed", { headers });
console.log(await res.json());
}, 20000);
There's also a WebSocket that pushes only changed matches (Developer plan and up), and an MCP server so an AI agent can call the predictions as tools: https://www.predictiqpro.com/mcp
League pages to start from:
Football API: all leagues
Brasileirão live scores API
Eredivisie live scores API
La Liga API
What it isn't
It's not the cheapest or the biggest. API-Football and Sportmonks cover many more sports and leagues. If you just need raw data, start there. I wrote a side-by-side with where they're stronger: https://www.predictiqpro.com/api-football-alternative
Many projects use both: a broad data provider for fixtures and stats, and this API only for the probabilities and market analysis.
Pricing, with no surprises
No free-forever plan. There's a 14-day trial of the Developer plan. A card is required to start it, and nothing is charged until it ends. Paid plans start at $14 a month. There's a refund policy and you can cancel before the trial ends.
Try it: https://www.predictiqpro.com/register. If something's missing for your use case, reply here and tell me.

Top comments (0)