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 329.5 yards.
Code verified November 18, 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.
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.
{
"stat": "driving_distance",
"label": "Driving distance (yards, tournament stat lines)",
"season": 2026,
"minimum": 8,
"minimum_of": "events",
"leaders": [
{
"rank": 1,
"player_id": "5080439",
"name": "Aldrich Potgieter",
"country": "South Africa",
"value": 329.53,
"sample": 10
},
{
"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.
The data this uses
Every row above comes from PGA Tour player stats 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
- PuckAPI: How do I rank NHL goalies by goals saved above expected?
- FighterAPI: Who lands the most significant strikes per 15 minutes in the UFC?
- StrikerAPI: Who leads the Premier League in expected goals, and how do I rank players in Python?
- FastballAPI: How do I get MLB home run leaders and stat leaders in Python?
- YorkerAPI: How do I get cricket leaderboards in Python?
Rather ask Claude? 19 free Claude skills call these endpoints for you.
Start with 500 free credits every month
No card. REST or MCP.