Skip to content

Guides

How do I get a golfer's season stats in Python?

A golfer's season: starts, wins, scoring average, strokes versus the field, hole scoring and ball striking. Scottie Scheffler won 3 of 20 starts in 2026.

Code verified November 18, 2026. One call to get_player_stats, 5 credits.

The call

player_id comes from search_players. ball_striking is filled for the PGA Tour and Korn Ferry Tour where it is kept. Pass league: "lpga" for an LPGA player.

import requests
import pandas as pd

API_KEY = "YOUR_API_KEY"

resp = requests.post(
    "https://mcp.birdieapi.com/v1/get_player_stats",
    headers={"x-api-key": API_KEY},
    json={
        "player_id": "9478",
        "season": 2026,
    },
    timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]

p = data["player"]["name"]
r, h, b = data["results"], data["hole_scoring"], data["ball_striking"]
print(p, data["season"], r["starts"], "starts,", r["wins"], "wins,", r["top_tens"], "top tens, $" + format(r["earnings"], ","))
print(pd.Series({"scoring_average": r["scoring_average"], "vs_field": r["vs_field"], "birdies_per_round": h["birdies_per_round"], "par_rate": h["par_rate"], "driving_distance": b["driving_distance"], "greens_in_regulation": b["greens_in_regulation"]}))

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.

Or use the official client: pip install birdieapi

What comes back

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

{
  "player": {
    "player_id": "9478",
    "name": "Scottie Scheffler",
    "first_name": null,
    "last_name": "Scheffler",
    "country": "USA",
    "birth_date": null,
    "amateur": false
  },
  "season": 2026,
  "results": {
    "starts": 20,
    "wins": 3,
    "top_tens": 13,
    "top_25s": 19,
    "made_cut": 19,
    "missed_cut": 1,
    "withdrew_or_dq": 0,
    "average_finish": 6.7,
    "earnings": 30937526,
    "cup_points": 4986,
    "rounds": 78,
    "scoring_average": 67.86,
    "average_to_par": -3.12,
    "vs_field": 2.35,
    "adj_vs_field": 3.46
  },
  "hole_scoring": {
    "rounds_with_holes": 78,
    "eagles_per_round": 0.128,
    "birdies_per_round": 4.821,
    "bogeys_or_worse_per_round": 1.833,
    "par_rate": 0.6232,
    "par3_average": 2.984,
    "par4_average": 3.883,
    "par5_average": 4.41,
    "holes_in_one": 0,
    "sg_par3": 0.5,
    "sg_par4": 2.111,
    "sg_par5": 0.843,
    "sg_par_rounds": 78
  },
  "ball_striking": {
    "tournaments": 17,
    "driving_distance": 312.5,
    "driving_accuracy": 63.8,
    "greens_in_regulation": 73.4,
    "putts_per_gir": 1.684,
    "sand_saves": 56.5
  },
  "published_season": {
    "events": 20,
    "cuts_made": 19,
    "wins": 3,
    "top_tens": 13,
    "earnings": 30937524,
    "cup_points": 4986,
    "scoring_average": 67.85897,
    "driving_distance": null,
    "driving_accuracy": null,
    "greens_in_regulation": null,
    "putts_per_gir": 1.694,
    "birdies": 376,
    "eagles": 10
  }
}

What to do next

The data this uses

Every row above comes from PGA Tour player stats data and PGA Tour hole-by-hole data. Driving distance and accuracy, greens in regulation, putts per green and sand saves per player per PGA Tour tournament, with scoring stats counted from every hole.

More guides

The same guide for other sports

Rather ask Claude? 19 free Claude skills call these endpoints for you.

Start with 500 free credits every month

No card. REST or MCP.