Read a PGA golfer's leaderboard finishes
The leaderboards table has one row per player per tournament: rank, total score, earnings, FedEx Cup points, and strokes-gained splits. Filter to a golfer to read their season of finishes.
1. Find a golfer's finishes
Filter leaderboards by player_id to get every tournament that golfer played. Swap PLAYER_ID for an id from the pga/players endpoint.
curl -sS \ -H 'Authorization: Bearer YOUR_API_KEY' \ 'https://api.stat-api.com/api/v1/pga/leaderboards?player_id=PLAYER_ID&limit=25'2. Rank the finishes
Sort by rank for best results, or by sg_total to see where strokes were gained relative to the field.
const headers = { Authorization: 'Bearer YOUR_API_KEY' } const base = 'https://api.stat-api.com/api/v1/pga' const board = await fetch(`${base}/leaderboards?player_id=PLAYER_ID&limit=25`, { headers }) .then(r => r.json()) // Best finishes first; each row carries rank, total_score, earnings, sg_total. board.leaderboards.sort((a: { rank: number }, b: { rank: number }) => a.rank - b.rank)