Skip to content

Guides

How do I turn golf major winner odds into probabilities in Python?

Every golfer's pre-tournament winner price at a men's major, opening and latest, as implied probability. At the 2025 Masters the 125 prices added up to 150%.

Code verified October 12, 2026. One call to get_winner_odds, 5 credits.

The call

tournament_id comes from list_tournaments, where major is true. The default is the 20 shortest golfers, so pass limit up to 200 to total the whole field. Pass season for all four majors of a year.

import requests
import pandas as pd

API_KEY = "YOUR_API_KEY"

resp = requests.post(
    "https://mcp.birdieapi.com/v1/get_winner_odds",
    headers={"x-api-key": API_KEY},
    json={
        "tournament_id": "401703504",
        "limit": 200,
    },
    timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]

t = data["tournaments"][0]
golfers = pd.DataFrame(t["golfers"])[["player_name", "median_implied_prob_opening", "median_implied_prob_latest"]]
golfers = golfers.rename(columns={"median_implied_prob_opening": "open", "median_implied_prob_latest": "latest"})
total = golfers["latest"].sum()
golfers["fair"] = golfers["latest"] / total
print(t["name"], t["season"], "|", t["golfers_priced"], "golfers priced, first price", t["first_captured_at"][:10], "last", t["last_captured_at"][:10])
print("implied probabilities add up to", round(total, 3), "at the latest price,", round(golfers["open"].sum(), 3), "at the first")
print(golfers.head(10).round(3).to_string(index=False))
print("top 10 hold", round(golfers["fair"].head(10).sum(), 3), "of the field's fair probability")

Replace YOUR_API_KEY with a key from your dashboard. Python needs requests and pandas (pip install requests pandas). JavaScript runs on Node 18 or newer, or in the browser.

What comes back

The data object of the response, trimmed to the first rows. Every field is real output from the run above.

{
  "tournaments": [
    {
      "tournament_id": "401703504",
      "name": "Masters Tournament",
      "season": 2025,
      "start_date": "2025-04-10",
      "snapshots": 47,
      "first_captured_at": "2024-05-17T11:55:39.000Z",
      "last_captured_at": "2025-04-04T11:55:38.000Z",
      "golfers_priced": 125,
      "golfers_returned": 125,
      "golfers": [
        {
          "player_id": "9478",
          "player_name": "Scottie Scheffler",
          "median_implied_prob_opening": 0.1667,
          "median_implied_prob_latest": 0.1818,
          "books": [
            {
              "bookmaker": "betmgm",
              "opening": {
                "price": 500,
                "implied_prob": 0.1667,
                "captured_at": "2024-06-07T11:55:37.000Z"
              },
              "latest_pregame": {
                "price": 450,
                "implied_prob": 0.1818,
                "captured_at": "2025-04-04T11:55:38.000Z"
              },
              "snapshots": 41
            },
            "...5 more"
          ]
        },
        {
          "player_id": "3470",
          "player_name": "Rory McIlroy",
          "median_implied_prob_opening": 0.0769,
          "median_implied_prob_latest": 0.1333,
          "books": [
            {
              "bookmaker": "betmgm",
              "opening": {
                "price": 1200,
                "implied_prob": 0.0769,
                "captured_at": "2024-06-07T11:55:37.000Z"
              },
              "latest_pregame": {
                "price": 650,
                "implied_prob": 0.1333,
                "captured_at": "2025-04-04T11:55:38.000Z"
              },
              "snapshots": 41
            },
            "...5 more"
          ]
        },
        "...123 more"
      ]
    }
  ],
  "count": 1
}

What to do next

  • get_leaderboard (2 credits). Final positions at the same tournament, to grade the prices.
  • list_tournaments (1 credit). Find the tournament id of any major by season.

More guides

Start with 500 free credits every month

No card. REST or MCP.