Get a free key

Use case: player props

Player props odds API for the AFL, NRL, MLB and more

Props are where Australian books disagree the most, and where a feed that lines them all up earns its keep. They arrive alongside the game lines, from one request, on every plan, with no separate endpoint to learn.

AFL

Disposals and goals

Disposal, kick, handball, mark, tackle and hitout lines, plus anytime, first and last goalscorer, wherever the books hang them.

NRL

Try scorers

Anytime, first and last try scorer, tries, tackles and run metres across the NRL, NRLW and the World Cup.

Cricket

Batter runs

Runs lines for batters, where the books hang them.

MLB

Hits and home runs

Hits, total bases, home runs, runs and RBIs for batters; strikeouts and outs for pitchers.

NFL

Yards and touchdowns

Passing, rushing and receiving yards, receptions, and anytime, first and last touchdown scorers.

Soccer

Shots and scorers

Shots, shots on target, anytime scorer, assists and cards in the Premier League and Europe's top leagues.

/v1/markets?league=afl lists every prop a league can carry; the odds response shows what the books are pricing right now.

How props are keyed

A prop is a market with a player for its subject

Game markets have no subject. A prop's market names the player as its subject, with a player ID and name, so player_disposals_over_under with Lachie Neale as the subject is his disposals line for the whole game, and telling props from team markets is a single check.

To fetch one prop for every player, name its key in markets. Both sides come back, over and under, each with its line:

league=afl&markets=player_disposals_over_under

/v1/players?league=afl gives names and IDs, but a name on that list is no promise that a book is pricing the player today; the odds response is the source of truth for what is open.

prop_outliers.py
import os
from collections import Counter, defaultdict
import requests

resp = requests.get(
    "https://api.sockodds.com/v1/odds",
    params={"league": "afl", "markets": "player_disposals_over_under"},
    headers={"Authorization": f"Bearer {os.environ['SOCKODDS_KEY']}"},
    timeout=20,
)
resp.raise_for_status()

# Which books hang a different line from the rest?
for event in resp.json()["data"]:
    lines = defaultdict(dict)  # player name -> {bookmaker: main line}
    for book in event["bookmakers"]:
        for market in book["markets"]:
            for o in market["outcomes"]:
                if o["side"] == "over" and o.get("available") and not o["alternate"]:
                    lines[market["subject"]["name"]][book["key"]] = o["line"]
    for player, by_book in lines.items():
        usual = Counter(by_book.values()).most_common(1)[0][0]
        for book, line in by_book.items():
            if line != usual:
                print(f"{event['name']} | {player}: {book} {line} vs {usual} elsewhere")

Lines differ

Compare the number before the price

One book might have a midfielder at 28.5 disposals and another at 30.5. A longer price at a higher line is not a better bet, so group quotes by line before ranking prices. That grouping is built in here: each number is its own market, with its own outcome IDs. Ask for alternates=true to get every rung of a book's ladder, each rung marked alternate.

Props in multis. Several books run a same-game multi lane, and props make natural legs. Be careful multiplying single-leg prices together, though: legs from the same game are often linked (a midfielder's disposals and his team's winning margin, say), and books price same-game multis with that in mind. A product of straight prices is a rough guide, not the book's price.

Questions

Props and the API

Are player props on the free plan?

Yes. Props are included on every plan. The free plan's limits still apply: the AFL, NRL, NFL and MLB, priced by Sportsbet, TAB and Ladbrokes.

Is there a separate props endpoint?

No. Props come from /v1/odds and /v1/events/{event_id}/odds with everything else. Name prop keys in markets if you only want props, or leave it off to get the whole event.

Can props be settled from the feed?

Where official results carry the player's stats. /v1/results grades each prop outcome it can settle from official evidence and leaves out the ones it cannot, rather than guessing.

Do props have fair prices?

Only where Pinnacle or the exchange prices the prop, and many props are retail-only. You can still remove the margin from one book's over and under, with the caveats on the fair odds page.

Start now

Your first Australian price is one request away.

Free key, no card, AFL and NRL included. Keys are issued on sockodds.com.