Skip to content

Guides

Where do I get strokes gained style data for golfers in Python?

A rating in strokes per round better than the field, adjusted for field strength and weighted toward recent rounds, for every active player.

Code verified October 10, 2026. One call to get_ratings, 2 credits.

The call

Pass as_of (YYYY-MM-DD) for the ratings as they stood on a date. min_rounds raises the sample needed to be listed.

import requests
import pandas as pd

API_KEY = "YOUR_API_KEY"

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

ratings = pd.DataFrame(data["ratings"])
print("as of", data["as_of"])
print(ratings[["rank", "name", "country", "rating", "weighted_rounds"]].head(10))
# A rating of 3.3 means 3.3 strokes a round better than an average player in the same field.
print("gap between first and tenth:", round(ratings.loc[0, "rating"] - ratings.loc[9, "rating"], 2), "strokes a round")

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.

{
  "as_of": "2026-10-04",
  "min_rounds": 20,
  "ratings": [
    {
      "rank": 1,
      "player_id": "9478",
      "name": "Scottie Scheffler",
      "country": "USA",
      "rating": 3.31,
      "weighted_rounds": 133.1,
      "rated_after": "2026-08-30",
      "last_tournament_id": "401811964"
    },
    {
      "rank": 2,
      "player_id": "3470",
      "name": "Rory McIlroy",
      "country": "Northern Ireland",
      "rating": 2.39,
      "weighted_rounds": 96.8,
      "rated_after": "2026-08-30",
      "last_tournament_id": "401811964"
    },
    "...23 more"
  ],
  "count": 25,
  "method": "Strokes per round better than an average player in the same field, from every full round: each round is compared with the field's average on the same course that day, adjusted for how strong that field was, weighted toward recent rounds (half-life one year) and shrunk toward zero for players with few rounds. Positive is better. Measured within one tour."
}

What to do next

  • get_player_results (5 credits). A player's rounds against the field, tournament by tournament, behind the rating.
  • get_leaders (5 credits). Season leaders in the stats we compute or ESPN keeps.

More guides

Start with 500 free credits

No card. REST or MCP.