Skip to content

Guides

How do I track a golfer's winner odds across the majors in Python?

One golfer's opening and latest winner price at every major he was priced for, as implied probability. Scottie Scheffler was priced for 28 majors from 2021 to 2027.

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

The call

player_id comes from search_players. Majors that have not been played yet show their current price, so open and latest can be equal.

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={
        "player_id": "9478",
    },
    timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]

rows = []
for t in data["tournaments"]:
    g = t["golfers"][0]
    rows.append({
        "major": t["name"],
        "season": t["season"],
        "books": len(g["books"]),
        "open": g["median_implied_prob_opening"],
        "latest": g["median_implied_prob_latest"],
    })
df = pd.DataFrame(rows)
df["move"] = df["latest"] - df["open"]
print(data["tournaments"][0]["golfers"][0]["player_name"], "across", len(df), "majors priced")
print(df.round(3).to_string(index=False))
print("shortened in", int((df["move"] > 0).sum()), "of", len(df), "| average move", round(df["move"].mean(), 3))

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": "401243010",
      "name": "2021 Masters Tournament",
      "season": 2021,
      "start_date": "2021-04-08",
      "snapshots": 1,
      "first_captured_at": "2021-04-02T11:55:00.000Z",
      "last_captured_at": "2021-04-02T11:55:00.000Z",
      "golfers_priced": 1,
      "golfers_returned": 1,
      "golfers": [
        {
          "player_id": "9478",
          "player_name": "Scottie Scheffler",
          "median_implied_prob_opening": 0.0244,
          "median_implied_prob_latest": 0.0244,
          "books": [
            {
              "bookmaker": "betonlineag",
              "opening": {
                "price": 4000,
                "implied_prob": 0.0244,
                "captured_at": "2021-04-02T11:55:00.000Z"
              },
              "latest_pregame": {
                "price": 4000,
                "implied_prob": 0.0244,
                "captured_at": "2021-04-02T11:55:00.000Z"
              },
              "snapshots": 1
            },
            "...3 more"
          ]
        }
      ]
    },
    {
      "tournament_id": "401243418",
      "name": "PGA Championship",
      "season": 2021,
      "start_date": "2021-05-20",
      "snapshots": 6,
      "first_captured_at": "2021-04-09T11:55:00.000Z",
      "last_captured_at": "2021-05-14T11:55:00.000Z",
      "golfers_priced": 1,
      "golfers_returned": 1,
      "golfers": [
        {
          "player_id": "9478",
          "player_name": "Scottie Scheffler",
          "median_implied_prob_opening": 0.0196,
          "median_implied_prob_latest": 0.0238,
          "books": [
            {
              "bookmaker": "betonlineag",
              "opening": {
                "price": 5000,
                "implied_prob": 0.0196,
                "captured_at": "2021-04-09T11:55:00.000Z"
              },
              "latest_pregame": {
                "price": 3500,
                "implied_prob": 0.0278,
                "captured_at": "2021-05-14T11:55:00.000Z"
              },
              "snapshots": 6
            },
            "...1 more"
          ]
        }
      ]
    },
    "...26 more"
  ],
  "count": 28
}

What to do next

  • get_player_results (5 credits). The same golfer's finishes, tournament by tournament.
  • get_ratings (2 credits). Our strokes gained style ratings, to set a rating beside the price.

More guides

Start with 500 free credits every month

No card. REST or MCP.