Golf Data

machina-sports/sports-skills/skills/golf-data

作者 machina-sports09eb7e8566f4MIT242 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫3 天前更新

PGA Tour, LPGA, and DP World Tour golf data via ESPN public endpoints — tournament leaderboards, scorecards, season schedules, golfer profiles/overviews, and news. Zero config, no API keys. Use when: user asks about golf scores, tournament leaderboards, scorecards, PGA Tour schedule, golfer profiles, golfer season stats, LPGA results, or golf news. Don't use when: user asks about other sports — use football-data (soccer), nfl-data (NFL), nba-data (NBA), wnba-data (WNBA), nhl-data (NHL), mlb-data (MLB), tennis-data (tennis), cricket-data (cricket), cfb-data (college football), cbb-data (college basketball), or fastf1 (F1). For betting odds use polymarket or kalshi. For news use sports-news.

包含腳本Data & Analytics
AI 產生的概覽

取得 PGA、LPGA 與 DP World Tour 高爾夫資料——排行榜、計分卡、賽程、球員檔案與新聞。

功能
透過 sports-skills 命令列工具從 ESPN 公開端點取得高爾夫資料,涵蓋賽事排行榜、逐洞計分卡、賽季賽程、球員檔案與賽季概況,以及新聞文章。支援 pga、lpga 與 eur 三個巡迴賽,回傳相對標準桿的成績與逐輪明細。參考文件說明端點、球員 ID 與成績格式,另有一支參數驗證腳本。
適用情境
當使用者詢問高爾夫比分、賽事排行榜、計分卡、巡迴賽賽程、球員檔案或賽季數據,或高爾夫新聞時使用。不適用於其他運動、博彩賠率或一般新聞。
執行需求
需要透過 pip 安裝 sports-skills Python 套件(Python 3.10 以上),並能存取 ESPN 公開端點。不需要 API 金鑰。隨附一支參數驗證腳本與參考文件。

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:

bash
which sports-skills || pip install sports-skills

If pip install fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:

bash
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-skills

No API keys required.

Quick Start

Prefer the CLI — it avoids Python import path issues:

bash
sports-skills golf get_leaderboard --tour=pgasports-skills golf get_schedule --tour=pga --year=2026sports-skills golf get_news --tour=pga

CRITICAL: Before Any Query

CRITICAL: Before calling any data endpoint, verify:

  • The tour parameter is specified (pga, lpga, or eur) — there is no default tour.
  • Player IDs are obtained from get_leaderboard results 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

CommandDescription
get_leaderboardTournament leaderboard with all golfer scores (current, or event_id / date)
get_scheduleFull season tournament schedule
get_player_infoIndividual golfer profile
get_player_overviewDetailed overview with season stats, rankings, recent results
get_scorecardHole-by-hole scorecard for a golfer (current, or event_id / date)
get_newsGolf 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. Use get_leaderboard (with event_id from get_schedule for a past tournament).
  • get_rankings — does not exist. FedEx Cup/world rankings are not available via this API. Use get_player_overview for individual rankings.
  • get_odds / get_betting_odds — not available. For prediction market odds, use the polymarket or kalshi skill.
  • search_player — does not exist. Use get_leaderboard to 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)

來源與署名

來源:machina-sports/sports-skills位於skills/golf-data提交09eb7e8

授權條款: MIT

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 machina-sports/sports-skills 的技能

World Cup

machina-sports

Premium FIFA World Cup 2026 market & match intelligence — a hosted, read-only layer that fuses official match truth (fixtures, standings, squads, injuries, player performance) with live prediction markets (Kalshi + Polymarket: prices, order books, price history, movers, cross-venue edges) and AI-grounded context (prematch briefs, move explanations, fan/social pulse). Every entity carries a canonical machina URN cross-walked across api-football, sportradar, opta, entain and ESPN, so a market resolves to a fixture resolves to two teams. This skill is prompt-only and premium: it routes the agent to the hosted World Cup Intelligence project (a per-project Machina MCP server) via `machina-cli`. It runs no code locally and ships no API keys. Use when: the user wants World Cup 2026 odds + match context together, asks "what moved and why", wants a grounded market brief or fan-sentiment read on a fixture, or needs one stable id that joins markets ↔ fixtures ↔ teams across providers. Don't use when: the user wants fr

待分類2423 天前更新

Xctf Data

machina-sports

從 TFRRS 擷取 NCAA 越野賽與田徑運動員資料,並從 The Stride Report 取得新聞。

包含腳本
Data & Analytics2423 天前更新

Sports Reporter

machina-sports

透過 sports-skills 命令列工具取得即時資料,產生原創體育新聞文章。

包含腳本
Writing & Content2423 天前更新

Volleyball Data

machina-sports

透過 Nevobo API 取得荷蘭排球資料:積分榜、賽程、賽果、俱樂部、賽事與新聞。

Data & Analytics2423 天前更新

Polymarket

machina-sports

以唯讀方式存取 Polymarket 運動預測市場:賠率、價格、委託簿、賽事與市場搜尋。

包含腳本
Business & Finance2423 天前更新

Metadata

machina-sports

透過 TheSportsDB 查詢球隊隊徽、球員照片、球場與俱樂部資訊,並支援球隊與球員名稱搜尋。

Research & Analysis2423 天前更新