How do I get PGA Tour stat leaders in Python?
Fifteen PGA Tour players ranked on driving distance for 2026, with the sample behind each. Aldrich Potgieter led at 331.6 yards.
Code verified October 12, 2026. One call to get_leaders, 5 credits.
The call
stat takes scoring_average, vs_field, birdies_per_round, earnings, cup_points, wins, top_tens, greens_in_regulation and more. Driving and approach stats are PGA Tour only; scoring_average also works with league: "lpga". min sets the smallest sample.
import requests
import pandas as pd
API_KEY = "YOUR_API_KEY"
resp = requests.post(
"https://mcp.birdieapi.com/v1/get_leaders",
headers={"x-api-key": API_KEY},
json={
"stat": "driving_distance",
"season": 2026,
"limit": 15,
},
timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]
leaders = pd.DataFrame(data["leaders"])
print(data["label"], data["season"], "- minimum", data["minimum"], data["minimum_of"])
print(leaders[["rank", "name", "country", "value", "sample"]].to_string(index=False))
print("average of these 15:", round(leaders["value"].mean(), 1), "yards")
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.
{
"stat": "driving_distance",
"label": "Driving distance (yards, ESPN's tournament lines)",
"season": 2026,
"minimum": 8,
"minimum_of": "events",
"leaders": [
{
"rank": 1,
"player_id": "5080439",
"name": "Aldrich Potgieter",
"country": "South Africa",
"value": 331.6,
"sample": 9
},
{
"rank": 2,
"player_id": "3470",
"name": "Rory McIlroy",
"country": "Northern Ireland",
"value": 329.17,
"sample": 10
},
"...13 more"
],
"count": 15
}What to do next
- get_player_stats (5 credits). One player's season in detail, hole by hole.
- get_ratings (2 credits). Our ratings, which rank players on results rather than one stat.
More guides
Start with 500 free credits every month
No card. REST or MCP.