GET
/courses/:id/holes
PRORetrieve detailed GPS coordinates for each hole on a course.
Requires Pro or Enterprise plan.
GPS Hole Data is a Pro Feature
Upgrade to Pro ($29/mo) or Enterprise ($99/mo) to access GPS coordinates for every hole.
View pricing →Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id | integer | The course_id from the list courses response |
Example Request
bash
curl "https://golfly.dev/api/v1/courses/19271/holes" \
-H "x-api-key: gf_your_api_key"Response
json
{
"data": {
"course_id": 19271,
"hole_count": 18,
"holes": [
{
"hole_number": 1,
"par": 5,
"length_yards": 451,
"coordinates": {
"tee": { "lat": 32.3347889, "lng": -86.3283939 },
"green": {
"front": { "lat": 32.3327640, "lng": -86.3316233 },
"center": { "lat": 32.3326751, "lng": -86.3316760 },
"back": { "lat": 32.3325829, "lng": -86.3317355 }
},
"fairway": { "lat": 32.3339946, "lng": -86.3308427 },
"dogleg": { "lat": 32.3337874, "lng": -86.3311825 },
"layup": { "lat": 32.3341234, "lng": -86.3299876 }
},
"hazards": [
{
"type": "bunker",
"label": "Front Bunker",
"lat": 32.3338,
"lng": -86.3305
},
{
"type": "water",
"label": "Left Water",
"lat": 32.3336,
"lng": -86.3308
}
]
}
]
}
}Response Fields
Hole Object
| Field | Type | Description |
|---|---|---|
| hole_number | integer | Hole number (1-18) |
| par | integer | Hole par |
| length_yards | integer | Hole length in yards |
| coordinates | object | GPS coordinates object |
| hazards | array | Array of hazard objects |
Coordinates Object
| Field | Type | Description |
|---|---|---|
| tee | object | Tee box coordinates {lat, lng} |
| green.front | object | Front of green coordinates |
| green.center | object | Center of green coordinates |
| green.back | object | Back of green coordinates |
| fairway | object | Fairway target (optional) |
| dogleg | object | Dogleg point (optional) |
| layup | object | Layup target for positioning (optional) |
Hazard Object
| Field | Type | Description |
|---|---|---|
| type | string | "bunker" or "water" |
| label | string | Descriptive name |
| lat | number | Latitude |
| lng | number | Longitude |
Errors
403
upgrade_requiredYour plan doesn't include GPS hole data. Upgrade to Pro or Enterprise.
404
course_not_foundThe specified course ID does not exist.