API Reference¶
Live Tournament Data¶
pgatourpy.pga_leaderboard ¶
Get tournament leaderboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per player. |
pgatourpy.pga_current_leaders ¶
Get current leaders snapshot (top 15).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of current leaders. |
pgatourpy.pga_tee_times ¶
Get tee times for a tournament.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per player per round. |
pgatourpy.pga_scorecard ¶
Get hole-by-hole scorecard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
player_id
|
str
|
Player ID (e.g., "39971"). |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per hole per round. |
pgatourpy.pga_shot_details ¶
pga_shot_details(tournament_id: str, player_id: str, round: int, *, include_radar: bool = False) -> pd.DataFrame
Get shot-level tracking data with coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
player_id
|
str
|
Player ID (e.g., "39971"). |
required |
round
|
int
|
Round number (1-4). |
required |
include_radar
|
bool
|
Include radar data. |
False
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per stroke. |
pgatourpy.pga_odds ¶
Get odds to win for a tournament.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with player odds data. |
pgatourpy.pga_coverage ¶
Get broadcast/streaming coverage info.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of coverage entries. |
Statistics & Standings¶
pgatourpy.pga_stats ¶
Get PGA Tour statistics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stat_id
|
str
|
Stat ID (e.g., "02675" for SG: Total). |
required |
year
|
int | None
|
Season year. Defaults to current season. |
None
|
tour
|
str
|
Tour code. Defaults to "R". |
'R'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with player rankings. Metadata available via |
DataFrame
|
|
pgatourpy.pga_fedex_cup ¶
Get FedExCup standings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int | None
|
Season year. Defaults to current year. |
None
|
tour
|
str
|
Tour code. Defaults to "R". |
'R'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with player standings. |
pgatourpy.pga_scorecard_comparison ¶
pga_scorecard_comparison(tournament_id: str, player_ids: list[str], category: str = 'SCORING') -> pd.DataFrame
Get scorecard stat comparison between players.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
player_ids
|
list[str]
|
List of player IDs to compare. |
required |
category
|
str
|
Comparison category (e.g., "SCORING", "DRIVING"). |
'SCORING'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of comparison category pills. |
Players & Tournaments¶
pgatourpy.pga_players ¶
Get PGA Tour player directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tour
|
str
|
Tour code. Defaults to "R". |
'R'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per player. |
pgatourpy.pga_tournaments ¶
Get tournament metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ids
|
str | list[str]
|
One or more tournament IDs (e.g., "R2026475"). |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per tournament. |
pgatourpy.pga_schedule ¶
Get season schedule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
year
|
int | None
|
Season year. Defaults to current year. |
None
|
tour
|
str
|
Tour code. Defaults to "R". |
'R'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per tournament including dates, purse, |
DataFrame
|
course, champion, and FedExCup points. |
Player Profiles¶
pgatourpy.pga_player_profile ¶
Get player profile overview.
Returns career highlights, wins, earnings, world ranking, FedExCup standing, and bio basics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_id
|
str
|
Player ID (e.g., "52955" for Ludvig Aberg). |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Dict with player info, |
dict
|
|
pgatourpy.pga_player_career ¶
Get player career data.
Returns career achievements including starts, cuts, wins, finish distribution, and earnings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_id
|
str
|
Player ID. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of career statistics. |
pgatourpy.pga_player_results ¶
Get player tournament results.
Returns tournament-by-tournament results for the current season including round scores, finish position, FedExCup points, and earnings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_id
|
str
|
Player ID. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per tournament. |
pgatourpy.pga_player_stats ¶
Get player stats profile.
Returns a player's full statistical profile with ranks and values for 130+ stats in a single call.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_id
|
str
|
Player ID. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per stat. |
pgatourpy.pga_player_bio ¶
Get player bio.
Returns biographical text, amateur highlights, and widget data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_id
|
str
|
Player ID. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Dict with |
dict
|
(list of strings), and |
pgatourpy.pga_player_tournament_status ¶
Get player tournament status.
Returns the player's status in the current tournament (if playing).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_id
|
str
|
Player ID. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row, or empty if not in current tournament. |
Content¶
pgatourpy.pga_news ¶
pga_news(tour: str = 'R', franchises: list[str] | None = None, player_ids: list[str] | None = None, limit: int = 20, offset: int = 0) -> pd.DataFrame
Get news articles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tour
|
str
|
Tour code. Defaults to "R". |
'R'
|
franchises
|
list[str] | None
|
Filter by franchise categories. |
None
|
player_ids
|
list[str] | None
|
Filter by player IDs. |
None
|
limit
|
int
|
Max articles. Defaults to 20. |
20
|
offset
|
int
|
Pagination offset. |
0
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with one row per article. |
pgatourpy.pga_news_franchises ¶
Get news franchise/category list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tour
|
str
|
Tour code. Defaults to "R". |
'R'
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with franchise and label columns. |
pgatourpy.pga_videos ¶
pga_videos(player_ids: list[str] | None = None, tournament_id: str | None = None, tour: str = 'R', season: str | None = None, franchises: list[str] | None = None, limit: int = 18, offset: int = 0) -> pd.DataFrame
Get player video highlights.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
player_ids
|
list[str] | None
|
Player IDs to filter by. |
None
|
tournament_id
|
str | None
|
Tournament ID (numeric part only, e.g., "475"). |
None
|
tour
|
str
|
Tour code. Defaults to "R". |
'R'
|
season
|
str | None
|
Season year as string. |
None
|
franchises
|
list[str] | None
|
Franchise filters. |
None
|
limit
|
int
|
Max videos. Defaults to 18. |
18
|
offset
|
int
|
Pagination offset. |
0
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of videos. |
pgatourpy.pga_tourcast_videos ¶
pga_tourcast_videos(tournament_id: str, player_id: str, round: int, *, hole: int | None = None, shot: int | None = None) -> pd.DataFrame
Get shot-by-shot video clips for a player round.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tournament_id
|
str
|
Tournament ID (e.g., "R2026475"). |
required |
player_id
|
str
|
Player ID. |
required |
round
|
int
|
Round number. |
required |
hole
|
int | None
|
Specific hole number. |
None
|
shot
|
int | None
|
Specific shot number. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of video clips. |