datagolf.com APIdatagolf.com ↗
Access DataGolf.com player rankings and round-level strokes gained (SG) data by tournament, round, and category via a simple REST API.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/903e8876-c2eb-4278-ad16-a13a031e2c86/get_top_players' \ -H 'X-API-Key: $PARSE_API_KEY'
Fetch the current top-ranked players from Data Golf, including their unique dg_id, rank, and country. Returns all players listed on the rankings page.
No input parameters required.
{
"type": "object",
"fields": {
"players": "array of player objects each containing dg_id, name, rank, and country"
},
"sample": {
"data": {
"players": [
{
"name": "Scottie Scheffler",
"rank": 1,
"dg_id": "18417",
"country": "USA"
},
{
"name": "Jon Rahm",
"rank": 20,
"dg_id": "19195",
"country": "ESP"
},
{
"name": "Cameron Young",
"rank": 3,
"dg_id": "26651",
"country": "USA"
}
]
},
"status": "success"
}
}About the datagolf.com API
This 2-endpoint API surfaces DataGolf.com player rankings and detailed historical strokes gained (SG) data for professional golfers. The get_top_players endpoint returns each player's unique dg_id, rank, and country, while get_player_sg_data delivers per-round SG breakdowns across five categories — OTT, APP, ARG, PUTT, and total — organized by tournament and sorted newest first.
Player Rankings
The get_top_players endpoint returns the current DataGolf rankings with no required inputs. Each player object in the response includes a dg_id (the stable identifier used across the API), name, rank, and country. This list is the primary way to discover which players are covered and to obtain the dg_id values needed for the second endpoint.
Round-Level Strokes Gained Data
The get_player_sg_data endpoint accepts a single required parameter — dg_id — and returns a player object plus a tournaments array. Tournaments are ordered newest first. Each tournament entry includes event_name, tournament_num, year, tour, course_name, and finish. Within each tournament, a rounds array provides per-round SG figures broken into five categories: off-the-tee (OTT), approach (APP), around-the-green (ARG), putting (PUTT), and total SG.
Data Shape and Coverage
All SG data is tied to the players listed on DataGolf's rankings page. The dg_id field is consistent across both endpoints, making it straightforward to join ranking position with historical performance. Tournament entries include tour and year fields, so filtering to a specific circuit or season is possible client-side once the full array is retrieved.
- Build a strokes-gained trend chart for a specific player across a full season using the
roundsarray fromget_player_sg_data - Compare approach-shot (APP) SG across top-ranked players to identify ball-striking leaders
- Filter historical tournament data by
tourfield to analyze performance on a specific circuit (PGA, European, etc.) - Rank top players by putting (PUTT) SG to surface short-game specialists from the rankings list
- Cross-reference
finishand total SG per tournament to study how scoring efficiency correlates with final standing - Populate a fantasy golf dashboard with current rankings and each player's recent round-level SG metrics
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does DataGolf have an official developer API?+
What exactly does get_player_sg_data return, and how is it organized?+
tournaments array sorted newest first. Each tournament entry includes event_name, tournament_num, year, tour, course_name, and finish. Inside each tournament is a rounds array with per-round SG values across five categories: OTT (off-the-tee), APP (approach), ARG (around-the-green), PUTT (putting), and total SG.Does this API cover players outside the current DataGolf top rankings?+
get_top_players endpoint returns the players listed on DataGolf's rankings page, and get_player_sg_data is keyed to those same dg_id values. Players not appearing in the current rankings are not directly discoverable through this API. You can fork it on Parse and revise to add an endpoint that accepts a known dg_id directly, bypassing the rankings list.Is live or in-round scoring data available?+
Can I filter tournaments by tour or year within the API?+
get_player_sg_data endpoint returns the full tournament history for a player in a single response; filtering by tour or year is not a server-side parameter. Each tournament object includes tour and year fields, so you can apply that filtering client-side after receiving the array. You can also fork the API on Parse and revise it to add query-time filtering as a parameter.