# Odds Comparison & Line Shopping API
URL: https://sockodds.com/use-cases/odds-comparison-api/

> Compare bookmaker odds with one API call. SockOdds returns every book's price under byBookmaker, a consensus line, and click-to-bet deeplinks.

Compare bookmaker odds with one API call. SockOdds returns every book's price under byBookmaker, a consensus line, and click-to-bet deeplinks.

An odds comparison API (or line shopping API) returns the same betting market priced by every bookmaker at once, so a tool can surface the best available number for any bet. SockOdds is built around this: every event ships a `byBookmaker` object with prices from 21 Australian books, the exchange and the prediction markets, and every event carries bookmaker and bet-slip links.

## Why use SockOdds for odds comparison

- **One request returns every book.** A single `/events` call hydrates each market's `byBookmaker` map with side-by-side prices from 21 Australian books plus Betfair Exchange, Kalshi, Polymarket, ProphetX. No per-book integrations.
- **A consensus line ships in the same payload.** `bookOdds` (market consensus, with vig) and `fairOdds` (no-vig) give you an instant baseline to flag which book is genuinely beating the market.
- **Deeplink to the best price.** `links.bookmakers` takes the user to the event on the book; `links.betslip` describes how to land on the selection.
- **Normalised `oddID` lines books up automatically.** Sportsbet's head-to-head and TAB's head-to-head collapse onto one row with zero reconciliation.
- **Props and alt lines, not just the main number.** Same shape, same comparison loop.

## How a line-shopping tool works with our data

### Fetch every book's price with byBookmaker

Request an event (or a league's full slate) and read each market under `event.odds`. Every entry holds that book's `odds`, `decimal`, its line, and an `available` flag.

### Rank prices and benchmark against the consensus

Iterate `byBookmaker`, skip anything where `available` is false, and keep the highest `decimal`. Then compare it against `bookOdds` and `fairOdds` to show how much edge the best book offers over consensus.

### Deeplink the user to the market

A comparison tool earns its keep at the moment of action: the best-price cell becomes a button that opens the event on that book.

## Example request

```bash
curl "https://api.sockodds.com/v2/events/?leagueID=NRL&oddsAvailable=true&oddID=points-home-game-ml-home&includeOpposingOdds=true&limit=1" \
  -H "x-api-key: YOUR_API_KEY"
```

A trimmed response shows one market priced across several books, with the consensus alongside:

```json
{
  "eventID": "afl_2026-09-03_fremantle_vs_hawthorn",
  "leagueID": "AFL",
  "odds": {
    "points-all-game-eo-odd": {
      "oddID": "points-all-game-eo-odd",
      "opposingOddID": "points-all-game-eo-even",
      "marketName": "Odd/Even Total Points",
      "statID": "points",
      "statEntityID": "all",
      "periodID": "game",
      "betTypeID": "eo",
      "sideID": "odd",
      "fairOdds": null,
      "bookOdds": "-116",
      "byBookmaker": {
        "unibet": {
          "odds": "-115",
          "decimal": 1.87,
          "available": true
        },
        "tabtouch": {
          "odds": "-118",
          "decimal": 1.85,
          "available": true
        }
      }
    }
  }
}
```

Walk the same `byBookmaker` map across every market and you have a full comparison grid. For a complete UI, see [the odds comparison dashboard example](https://sockodds.com/docs/examples/odds-comparison-dashboard/).

## SockOdds vs building odds comparison yourself

| Capability | SockOdds | building odds comparison yourself |
| --- | --- | --- |
| Books per call | All 25 in one `byBookmaker` object | One integration, auth and rate limit per book |
| Normalised IDs/markets | Shared `oddID` lines every book up | Map and reconcile each book's market ids |
| Best-line detection | Rank `byBookmaker` in a few lines | Normalise formats before you can compare |
| Consensus baseline | `bookOdds` + `fairOdds` included | Compute and maintain your own |
| Deeplinks | Event and bet-slip links from the books' own ids | Build and track per book |
| Maintenance | One feed; we absorb book-side changes | Re-fix breakage every time a book changes |

## Frequently asked questions

### What is an odds comparison API?

It returns the same market priced by multiple bookmakers in one response so software can display every book's number side by side and pick the best one.

### What is line shopping?

Checking multiple bookmakers for the same bet and placing it wherever the price is best. SockOdds automates the lookup.

### How many bookmakers can I compare?

25, 21 of them Australian, all normalised to a shared oddID.

### Can I link users to the bookmaker to place a bet?

Yes — `links.bookmakers` and `links.betslip` on every linked event.

### What is the difference between bookOdds and fairOdds?

bookOdds is the consensus with the vig in; fairOdds is the no-vig price on Base and above.

### Do you cover player props and alternate lines for comparison?

Yes, in the same byBookmaker structure as main markets.

## Related use cases

- [Odds API for Positive EV Betting](https://sockodds.com/use-cases/positive-ev-betting-api/): Positive EV betting API with no-vig fairOdds and every AU book's price side by side, so you can surface +EV bets without building your own devig pipeline..
- [Odds API for Arbitrage Betting](https://sockodds.com/use-cases/arbitrage-betting-api/): An arbitrage betting API that returns every Australian book's price per market through byBookmaker, so you can scan every bookmaker and alt line for arbs and middles..
- [Sports Odds API for Betting Apps](https://sockodds.com/use-cases/sports-betting-app-api/): The sports betting app API with odds from every major Australian bookmaker, event status, results, and click-to-bet deeplinks in a single feed..
- [Pricing](https://sockodds.com/pricing/): plans priced on request rate and scope, including a free Lite tier with no card.

## Start building today

Free plan available. Set up in 5 minutes. Scale when you're ready.
