
Golf Data
- 590 installs
- 201 repo stars
- Updated August 5, 2026
- machina-sports/sports-skills
golf-data is an agent skill that explores golf player, course, and tournament datasets for developers building sports analytics apps, editorial products, or predictive models needing domain metrics.
About
golf-data is a machina-sports/sports-skills agent skill focused on golf domain data for software engineers building analytics platforms, editorial golf products, or predictive scoring models. It guides exploration of player profiles, course characteristics, and tournament histories so implementations use accurate, domain-specific metrics instead of generic sports stubs. Developers reach for golf-data when scaffolding APIs, dashboards, or ML features that must reference real golf entities and stat categories. The skill bridges sports data modeling and application code during build phases. Use it when golf-specific fields, aggregations, or dataset joins are required in backend or data-layer work.
- Golf statistics sourcing
- Course and player datasets
- Sports analytics foundations
- Schema normalization guidance
- Domain-specific performance metrics
Golf Data by the numbers
- 590 all-time installs (skills.sh)
- +8 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #413 of 2,064 Data Science & ML skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/machina-sports/sports-skills --skill golf-dataAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 590 |
|---|---|
| repo stars | ★ 201 |
| Last updated | August 5, 2026 |
| Repository | machina-sports/sports-skills ↗ |
Where do golf player and tournament datasets come from?
Explore golf player, course, and tournament datasets when designing sports analytics apps, editorial golf products, or predictive models needing domain-specific metrics.
Who is it for?
Developers building golf analytics apps, editorial tools, or ML models that need player, course, and tournament data context.
Skip if: General web apps with no sports domain or teams needing non-golf sports datasets from other skills.
When should I use this skill?
A sports analytics or editorial feature needs golf player, course, or tournament dataset exploration.
What you get
Domain-aware golf metrics, entity schemas, and dataset references for analytics or editorial features.
Files
Golf Data (PGA / LPGA / DP World Tour)
Before writing queries, consult references/api-reference.md for endpoints, player IDs, and score formats.
Setup
Before first use, check if the CLI is available:
which sports-skills || pip install sports-skillsIf pip install fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:
python3 --version # check version
# If < 3.10, try: python3.12 -m pip install sports-skills
# On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skillsNo API keys required.
Quick Start
Prefer the CLI — it avoids Python import path issues:
sports-skills golf get_leaderboard --tour=pga
sports-skills golf get_schedule --tour=pga --year=2026
sports-skills golf get_news --tour=pgaCRITICAL: Before Any Query
CRITICAL: Before calling any data endpoint, verify:
- The
tourparameter is specified (pga,lpga, oreur) — there is no default tour. - Player IDs are obtained from
get_leaderboardresults or ESPN golf URLs — never guessed.
Important: Golf is Not a Team Sport
- Tournaments, not games: Each event is a multi-day tournament (typically 4 rounds, Thu–Sun).
- Individual athletes: The leaderboard has 72–147 individual golfers, not 2 teams.
- Score relative to par: Scores are strings like "-17", "E" (even), "+2" — not point totals.
- One event per week: Unlike team sports, golf has one tournament per week per tour.
- No standings endpoint: FedEx Cup standings are not available via this API.
The tour Parameter
Most commands require --tour=pga, --tour=lpga, or --tour=eur:
- PGA: PGA Tour (men's professional golf)
- LPGA: LPGA Tour (women's professional golf)
- EUR: DP World Tour (formerly European Tour)
If the user doesn't specify, default to pga. If they say "women's golf" or "LPGA", use lpga. If they mention the European Tour or DP World Tour, use eur.
Commands
| Command | Description |
|---|---|
get_leaderboard | Current tournament leaderboard with all golfer scores |
get_schedule | Full season tournament schedule |
get_player_info | Individual golfer profile |
get_player_overview | Detailed overview with season stats, rankings, recent results |
get_scorecard | Hole-by-hole scorecard for a golfer |
get_news | Golf news articles |
See references/api-reference.md for full parameter lists and return shapes.
Examples
Example 1: Current leaderboard User says: "What's the PGA leaderboard right now?" Actions: 1. Call get_leaderboard(tour="pga") Result: Current tournament leaderboard sorted by position with each golfer's score and round-by-round breakdown
Example 2: Season schedule User says: "Show me the LPGA schedule for 2026" Actions: 1. Call get_schedule(tour="lpga", year=2026) Result: Full LPGA tournament calendar with names, dates, and venues
Example 3: Golfer profile User says: "Tell me about Scottie Scheffler" Actions: 1. Call get_player_info(player_id="9478", tour="pga") Result: Scheffler's profile with age, nationality, height/weight, turned pro year
Example 4: Upcoming major User says: "When is the Masters this year?" Actions: 1. Derive year from currentDate 2. Call get_schedule(tour="pga", year=<derived_year>) 3. Search results for "Masters Tournament" Result: Masters date, course (Augusta National), and tournament ID
Example 5: Player scorecard User says: "Show me Scottie Scheffler's scorecard" Actions: 1. Call get_scorecard(tour="pga", player_id="9478") Result: Hole-by-hole scores for each completed round with strokes and score-to-par
Example 6: Player season form User says: "How has Rory McIlroy been playing this season?" Actions: 1. Call get_player_overview(player_id="3470", tour="pga") Result: Season stats (scoring average, earnings, wins, top-10s), world ranking, and recent results
Commands that DO NOT exist — never call these
- ~~
get_tournament_results~~ — does not exist. Useget_leaderboardfor current/recent tournament scores. - ~~
get_rankings~~ — does not exist. FedEx Cup/world rankings are not available via this API. Useget_player_overviewfor individual rankings. - ~~
get_odds~~ / ~~get_betting_odds~~ — not available. For prediction market odds, use the polymarket or kalshi skill. - ~~
search_player~~ — does not exist. Useget_leaderboardto find player IDs from the current field.
If a command is not listed in the Commands table above, it does not exist.
Error Handling
When a command fails, do not surface raw errors to the user. Instead: 1. If no active tournament, tell the user and suggest checking the schedule 2. If a player ID is wrong, suggest using get_leaderboard to find current player IDs 3. Only report failure with a clean message after exhausting alternatives
Troubleshooting
Error: sports-skills command not found Cause: Package not installed Solution: Run pip install sports-skills
Error: No active tournament on leaderboard Cause: Golf tournaments run Thursday–Sunday; between events the leaderboard may show no active tournament Solution: Call get_schedule(tour="pga") to find the next upcoming event
Error: Limited round data — scores are empty Cause: Before a tournament starts, round scores will be empty. During the tournament, only completed rounds have scores. Solution: Check get_leaderboard for tournament status and current round; wait for rounds to complete
Error: Player not found by ID Cause: Player ID is incorrect or the player is not in the current tournament field Solution: Get player IDs from get_leaderboard results, or look up ESPN golf URLs (espn.com/golf/player/_/id/<id>/player-name)
Golf Data — API Reference
Commands
get_leaderboard
Get the current tournament leaderboard with all golfer scores.
tour(str, required): "pga", "lpga", or "eur"
Returns the current/most recent tournament with:
- Tournament name, venue, status, current round, and
field_size leaderboard[]sorted by position with golferid,name,country,score, androunds[]
Each golfer in leaderboard[] has:
position: Leaderboard rankname: Golfer namecountry: Nationalityscore: Total score relative to par (e.g., "-17", "E", "+2")rounds[]: Array withround,strokes, andscore(score-to-par) per round
get_schedule
Get full season tournament schedule.
tour(str, required): "pga", "lpga", or "eur"year(int, optional): Season year. Defaults to current.
Returns tournaments[] with tournament name, ID, start/end dates.
get_player_info
Get individual golfer profile.
player_id(str, required): ESPN athlete IDtour(str, optional): "pga", "lpga", or "eur". Defaults to "pga".
Returns golfer details: name, age, nationality, birthplace, height/weight, turned pro year, college, headshot URL, and ESPN profile link.
Note: LPGA player profiles are not available through ESPN — the command automatically tries PGA and EUR as fallback.
get_player_overview
Get detailed golfer overview with season stats, rankings, and recent results.
player_id(str, required): ESPN athlete IDtour(str, optional): "pga", "lpga", or "eur". Defaults to "pga".
Returns season statistics (scoring average, earnings, wins, top-10s), world/tour rankings, and recent tournament results.
get_scorecard
Get hole-by-hole scorecard for a golfer in the current/most recent tournament.
tour(str, required): "pga", "lpga", or "eur"player_id(str, required): ESPN athlete ID
Returns rounds[] with hole-by-hole scores (strokes, score relative to par) for each completed round.
get_news
Get golf news articles.
tour(str, required): "pga", "lpga", or "eur"
Returns articles[] with headline, description, published date, and link.
Reading Golf Scores
Scores are relative to par:
- Negative score = under par (good). "-17" = 17 strokes under par.
- "E" = even par.
- Positive score = over par. "+2" = 2 strokes over par.
- Strokes = actual stroke count for that round (e.g., par 72 course → 63 strokes = -9).
Common Player IDs
| Player | ID | Player | ID |
|---|---|---|---|
| Scottie Scheffler | 9478 | Nelly Korda | 9012 |
| Rory McIlroy | 3470 | Jin Young Ko | 9758 |
| Jon Rahm | 9780 | Lydia Ko | 7956 |
| Collin Morikawa | 10592 | Lilia Vu | 9401 |
| Xander Schauffele | 10404 | Nasa Hataoka | 10484 |
| Viktor Hovland | 10503 | Atthaya Thitikul | 10982 |
| Hideki Matsuyama | 5765 | Celine Boutier | 9133 |
| Ludvig Aberg | 4686088 | Lexi Thompson | 6843 |
Player IDs also appear in get_leaderboard results (id field on each golfer). ESPN golf URLs also contain the ID: espn.com/golf/player/_/id/9478/scottie-scheffler → ID is 9478.
Major Championships
| Tournament | Months | Course(s) |
|---|---|---|
| The Masters | April | Augusta National |
| PGA Championship | May | Varies |
| U.S. Open | June | Varies |
| The Open Championship | July | Links courses (UK) |
See also: references/majors.md and references/player-ids.md for extended references.
Major Championships
| Tournament | Months | Course(s) |
|---|---|---|
| The Masters | April | Augusta National |
| PGA Championship | May | Varies |
| U.S. Open | June | Varies |
| The Open Championship | July | Links courses (UK) |
Use get_schedule and search for these tournament names to find dates and event IDs.
Common Golf Player IDs (ESPN)
| Player | ID | Player | ID |
|---|---|---|---|
| Scottie Scheffler | 9478 | Nelly Korda | 9012 |
| Rory McIlroy | 3470 | Jin Young Ko | 9758 |
| Jon Rahm | 9780 | Lydia Ko | 7956 |
| Collin Morikawa | 10592 | Lilia Vu | 9401 |
| Xander Schauffele | 10404 | Nasa Hataoka | 10484 |
| Viktor Hovland | 10503 | Atthaya Thitikul | 10982 |
| Hideki Matsuyama | 5765 | Celine Boutier | 9133 |
| Ludvig Aberg | 4686088 | Lexi Thompson | 6843 |
Tip: Use get_leaderboard to find current player IDs from the active tournament.
#!/bin/bash
SPORT="${1:-golf}" # golf
MONTH=$(date +%m)
case "$SPORT" in
golf)
DOW=$(date +%u)
if [[ $DOW -le 3 ]]; then
echo "INFO: Golf tournaments run Thu-Sun. Leaderboard may show last week's results."
fi
;;
esac
echo "OK"
Related skills
FAQ
What datasets does golf-data cover?
golf-data explores golf player, course, and tournament datasets for developers designing sports analytics apps, editorial golf products, or predictive models. The machina-sports skill focuses on domain-specific metrics rather than generic sports placeholders.
When should developers use golf-data?
Developers should use golf-data when implementing golf analytics APIs, dashboards, or ML features that need accurate player, course, and tournament fields. golf-data fits build-time data modeling and integration work.