Access golf course data programmatically using our REST API.
All API requests require an API key. Include your key in the request header:
X-API-Key: tr_your_api_key_here
Or as a query parameter: ?api_key=tr_your_api_key_here
Create an account to get your free API key.
Request limits reset at midnight UTC.
Search and filter golf courses.
| Parameter | Type | Description |
|---|---|---|
q | string | Search query (name, city, country) |
country | string | Filter by country |
state | string | Filter by state/region |
min_holes | integer | Minimum number of holes |
min_rating | float | Minimum rating (1-5) |
min_length | integer | Minimum yardage |
max_length | integer | Maximum yardage |
has_reviews | boolean | Only courses with reviews |
limit | integer | Results per page (max 100, default 50) |
offset | integer | Skip first N results |
curl -H "X-API-Key: YOUR_KEY" \ "http://teeradar.online/api/v1/courses.php?country=United%20States&min_rating=4&limit=10"Response:
{
"total": 1523,
"limit": 10,
"offset": 0,
"count": 10,
"courses": [
{
"course_id": "pebble-beach-golf-links",
"name": "Pebble Beach Golf Links",
"city": "Pebble Beach",
"state": "California",
"country": "United States",
"rating": 4.8,
"ratings_count": 2341,
"holes": 18,
"length_yards": 6828,
"description": "...",
"primary_image": "/media/courses/abc123.jpg"
},
...
]
}
Get detailed information for a single course.
| Parameter | Type | Description |
|---|---|---|
id | string | Course ID (required) |
curl -H "X-API-Key: YOUR_KEY" \ "http://teeradar.online/api/v1/course.php?id=pebble-beach-golf-links"
List all countries with course counts.
Response:{
"count": 45,
"countries": [
{"country": "United States", "count": 3200},
{"country": "United Kingdom", "count": 520},
...
]
}
List states/regions for a country with course counts.
| Parameter | Type | Description |
|---|---|---|
country | string | Country name (required) |
Get ranked course lists.
| Parameter | Type | Description |
|---|---|---|
type | string | top_rated, most_reviewed, or longest |
limit | integer | Number of results (max 100) |
min_reviews | integer | For top_rated: minimum review count |
The API returns standard HTTP status codes:
| Code | Meaning |
|---|---|
200 | Success |
400 | Bad request (missing/invalid parameters) |
401 | Unauthorized (invalid API key) |
404 | Not found |
429 | Rate limit exceeded |
500 | Server error |
{
"error": "Rate limit exceeded.",
"daily_limit": 100,
"daily_used": 100,
"reset": "midnight UTC"
}