Tutorial · 10 min · endpoints verified 2026-09-17

How to build a soccer betting model

Resolve a real fixture, inspect the current market, and measure movement from opening to close without pretending every competition has identical odds depth.

API coverage and endpoint overview: Explore the soccer API

Why this is hard

A price without history is not a model

A current line says where the market is. A useful model also needs where it started, how broadly it is quoted and whether independent feeds agree.

  • Odds coverage varies by competition and fixture.
  • One sportsbook is not market consensus.
  • Backtests need point-in-time snapshots, not today’s overwritten price.
  • A no-vig probability must normalize both sides of the market.

Path 1 · recommended

Have your AI agent build it

Use MCP to find the match, then REST for the paid market data.

1. Connect the MCP server

Add the server in your MCP client and sign in with your Big Balls account. Your client registers itself and handles the token exchange — there is no key to copy.

MCP client configjson
{
  "mcpServers": {
    "bigballs-sports-data": {
      "url": "https://mcp.bigballsdata.com/mcp"
    }
  }
}

2. Tools your agent gets

  • get_matches

    Live, upcoming or historical matches for a sport or league.

  • get_coverage

    Machine-readable map of what we hold and what we do not.

3. Ask for what you want

Paste this at your agent. It is written to make the model check coverage before it designs anything, which is what stops it inventing a field we do not serve.

Prompttext
Find a football match in the competition I name. If it has odds, call the current and historical odds REST endpoints, compute no-vig probabilities, and show opening-to-closing movement. If coverage is empty, say so.

What the agent cannot reach

There is no odds MCP tool. Current and historical bookmaker data require Edge, and some competitions have no loaded odds.

Path 2 · hand-coded

Build it yourself

Treat availability as data and keep price normalization separate from prediction.

  1. 01

    Check the live coverage map first

    Ask the coverage endpoint what is served before you make a field required in your interface. An unavailable field should produce an honest empty state, not a guessed value.

    Verify soccer coveragebash
    curl -s "https://api.bigballsdata.com/v1/coverage?sport=football" \
      -H "x-api-key: $BBS_API_KEY"
  2. 02

    Find a fixture and retain its id

    Filter by the competition used by your product. Do not substitute a fixture from another league when the result is empty.

    Find soccer matchesbash
    curl -s "https://api.bigballsdata.com/v1/matches?sport=football&league=epl&limit=20" \
      -H "x-api-key: $BBS_API_KEY"
  3. 03

    Load current and historical prices

    The match route is the current market; the historical route is the snapshot series used for movement and closing-line value.

    Edge odds callsbash
    curl -s "https://api.bigballsdata.com/v1/matches/$MATCH_ID/odds?sport=football" -H "x-api-key: $BBS_API_KEY"
    curl -s "https://api.bigballsdata.com/v1/odds/historical?match_id=$MATCH_ID" -H "x-api-key: $BBS_API_KEY"
  4. 04

    Remove the bookmaker margin

    Normalize the implied probabilities across all outcomes before comparing them with your model.

    No-vig probabilitiestypescript
    const implied = prices.map((decimal) => 1 / decimal);
    const total = implied.reduce((sum, p) => sum + p, 0);
    const noVig = implied.map((p) => p / total);
  5. 05

    Inspect cross-provider disagreements

    Bound the divergence feed by kickoff date. This compares two providers for the same sportsbook; it is a data-quality signal, not a comparison between different books.

    Edge divergence callbash
    curl -s "https://api.bigballsdata.com/v1/odds/divergences?sport=football&date_from=2026-09-01&date_to=2026-09-30&limit=20" \
      -H "x-api-key: $BBS_API_KEY"

Reference

Every endpoint this tutorial uses

All on the gateway at api.bigballsdata.com. Verified against production on 2026-09-17.

MethodPathReturnsWhy you need itPlan
GET/v1/matches?sport=football&league=Competition-scoped fixtures and match idsResolves the subject of every odds request.Free
GET/v1/matches/:id/oddsCurrent multi-book marketsSupplies the price the model evaluates.Edge
GET/v1/odds/historicalOpening, intermediate and closing snapshots when loadedMakes movement and backtesting possible.Edge
GET/v1/odds/divergencesMeasured cross-source market disagreementSurfaces prices that merit inspection rather than silently choosing one feed.Edge

Pricing, honestly

Odds begin at Edge

Free can resolve fixtures, but bookmaker prices and their history are hard-gated at Edge.

Free key

jsonjson
Fixture ids, kickoff, status and score.

Solo

jsonjson
Current books, historical snapshots and divergence intelligence.
  • There is no productive free substitute for paid odds.
  • Check has_odds before requesting a market.
  • An empty competition is an availability result, not permission to borrow another league.

More tutorials

Other build guides

Known gaps

Model boundaries

The tutorial deliberately stops before claiming profitable predictions.

  • Competition-level odds depth must be measured.
  • Backtests need timestamp-safe train/test splits.
  • Market divergence is a review signal, not proof that one source is correct.

Questions

Are soccer odds available on Free?
No. Match lookup is Free, but current odds and historical snapshots require Edge.
Does every soccer match have odds?
No. Check the match capability and render unavailable when a fixture has no loaded market.
Does this tutorial promise winning picks?
No. It demonstrates market normalization and movement; prediction quality remains your model’s responsibility.

Build against a real market

Resolve fixtures for free, then use an Edge key for prices and history.