Golf Course Finder

FREEMIUM
By golfambit | Updated 8 days ago | Sports
Popularity

9.2 / 10

Latency

422ms

Service Level

98%

Health Check

N/A

Followers: 6
API Creator:
Rapid account: Golfambit
golfambit
golfambit
Log In to Rate API
Rating: 5 - Votes: 1

README

GolfAmbit API v2 Documentation

Description

๐ŸŒ๏ธโ€โ™‚๏ธ Welcome to the Golf API v2 ๐ŸŒ๏ธโ€โ™€๏ธ

๐ŸŒŸ Whatโ€™s New in v2:

  • Expanded Coverage: Access over 30,000 international golf clubs and 39,000 international golf courses, providing comprehensive data on global golfing destinations.
  • Richer Data: Enjoy an enriched dataset, surpassing the capabilities of v1, delivering more detailed and insightful information.

๐Ÿ” API Functionality:

  • Location-based Search: Retrieve golf courses based on specified latitude and longitude coordinates, allowing for precise geographical targeting.
  • Radius Limit: Explore golf courses within a mile or kilometer radius of your specified latitude and longitude, with a maximum limit of 50 miles or 80.4672 kilometers.
  • Google Place Details: Access comprehensive place details sourced from the Google Place API, enriching your golfing data with additional contextual information.

Base URL

The base URL for all API requests is:

https://golf-course-finder.p.rapidapi.com/api

Endpoints

GET /golf-clubs/

This endpoint will return courses located within a radius of up to 50 miles or 80.4672 kilometers from the given latitude and longitude. You can either request the radius in miles or kilometers, but not both. For example if you want the radius to be in miles=โ€50โ€ then donโ€™t pass the kilometers parameter or if you want the radius to be in kilometers=โ€œ50โ€ then donโ€™t pass the miles parameter.

Parameters

  • miles (optional): The search radius of miles is limited to a maximum of 50 miles. If you are searching by kilometers then this field must not be passed.
  • kilometers (optional): The search radius of kilometers is limited to a maximum of 80.4672 kilometers. If you are searching by miles then this field must not be passed.
  • latitude (required): The latitude of the desired location.
  • longitude (required): The longitude of the desired location.

Response

Returns a JSON object with the following properties:

  • club_name: The name of the golf club.
  • club_membership: The type of membership associated with the club.
  • number_of_holes: The total number of holes in the clubโ€™s golf courses.
  • address: The street address of the golf club.
  • city: The city where the golf club is located.
  • state: The state where the golf club is located.
  • country: The country where the golf club is located.
  • postal_code: The postal code of the golf clubโ€™s location.
  • phone: The phone number of the golf club.
  • fax: The fax number of the golf club.
  • website: The website URL of the golf club.
  • email_address: The email address of the golf club.
  • driving_range: Indicates if the club has a driving range (true/false).
  • putting_green: Indicates if the club has a putting green (true/false).
  • chipping_green: Indicates if the club has a chipping green (true/false).
  • practice_bunker: Indicates if the club has a practice bunker (true/false).
  • motor_cart: Indicates if motor carts are available for rent (true/false).
  • pull_cart: Indicates if pull carts are available for rent (true/false).
  • golf_clubs_rental: Indicates if golf clubs are available for rent (true/false).
  • club_fitting: Indicates if club fitting services are available (true/false).
  • pro_shop: Indicates if the club has a pro shop (true/false).
  • golf_lessons: Indicates if golf lessons are available (true/false).
  • caddie_hire: Indicates if caddie hire services are available (true/false).
  • restaurant: Indicates if there is a restaurant at the golf club (true/false).
  • reception_hall: Indicates if there is a reception hall at the golf club (true/false).
  • changing_room: Indicates if there are changing rooms at the golf club (true/false).
  • lockers: Indicates if lockers are available at the golf club (true/false).
  • lodging_on_site: Indicates if lodging is available on-site (true/false).
  • latitude: The latitude coordinate of the golf clubโ€™s location.
  • longitude: The longitude coordinate of the golf clubโ€™s location.
  • place_id: The unique identifier of the golf clubโ€™s location.
  • golf_courses: An array of golf course objects, each with the following properties:
    • course_name: The name of the golf course.
    • holes: The total number of holes in the golf course.
    • par: The par value of the golf course.
    • course_type: The type of golf course.
    • course_architect: The architect(s) of the golf course.
    • open_date: The date when the golf course was opened.
    • guest_policy: The guest policy of the golf course.
    • weekday_price: The price of playing the course on a weekday.
    • weekend_price: The price of playing the course on a weekend.
    • twilight_price: The twilight price of playing the course.
    • fairway: The fairway condition of the golf course.
    • green: The green condition of the golf course.
    • currency: The currency used for pricing.

Example

JavaScript Request:

const url = 'https://golf-course-finder.p.rapidapi.com/api/golf-clubs/?miles=10&latitude=36.56910381018662&longitude=-121.95035631683683';
const options = {
	method: 'GET',
	headers: {
		'X-RapidAPI-Key': 'YOUR_API_KEY',
		'X-RapidAPI-Host': 'golf-course-finder.p.rapidapi.com'
	}
};

try {
	const response = await fetch(url, options);
	const result = await response.text();
	console.log(result);
} catch (error) {
	console.error(error);
}

Python Request:

import requests

url = "https://golf-course-finder.p.rapidapi.com/api/golf-clubs/"

querystring = {"miles":"10","latitude":"36.56910381018662","longitude":"-121.95035631683683"}

headers = {
	"X-RapidAPI-Key": "YOUR_API_KEY",
	"X-RapidAPI-Host": "golf-course-finder.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())

Response:

[
  {
    "club_name": "Pebble Beach Resorts",
    "club_membership": "Resort",
    "number_of_holes": 27,
    "address": "1700 17 Mile Drive",
    "city": "Pebble Beach",
    "state": "California",
    "country": "United States of America",
    "postal_code": "93953",
    "phone": "+1 (831) 622-8723",
    "fax": "+1 (831) 622-8795",
    "website": "pebblebeach.com/golf/pebble-beach-golf-links",
    "email_address": "",
    "driving_range": true,
    "putting_green": true,
    "chipping_green": false,
    "practice_bunker": false,
    "motor_cart": true,
    "pull_cart": true,
    "golf_clubs_rental": true,
    "club_fitting": false,
    "pro_shop": false,
    "golf_lessons": true,
    "caddie_hire": false,
    "restaurant": true,
    "reception_hall": true,
    "changing_room": true,
    "lockers": false,
    "lodging_on_site": true,
    "latitude": 36.5696623,
    "longitude": -121.9497552,
    "place_id": "ChIJYUuxSFbmjYAR14kcbsdLieM",
    "golf_courses": [
      {
        "course_name": "Pebble Beach",
        "holes": 18,
        "par": 72,
        "course_type": "Parkland",
        "course_architect": "Jack Neville/Douglas Grant/",
        "open_date": null,
        "guest_policy": "Open",
        "weekday_price": "535.00",
        "weekend_price": "535.00",
        "twilight_price": "535.00",
        "fairway": "Default Fairway Value",
        "green": "Default Green Value",
        "currency": "USD"
      },
      {
        "course_name": "Peter Hay Par 3",
        "holes": 9,
        "par": 27,
        "course_type": "Parkland",
        "course_architect": "Peter Hay",
        "open_date": null,
        "guest_policy": "Open",
        "weekday_price": "30.00",
        "weekend_price": "30.00",
        "twilight_price": "30.00",
        "fairway": "Default Fairway Value",
        "green": "Default Green Value",
        "currency": "USD"
      }
    ]
  }
]

Errors

This Endpoint uses the following error codes:

{
  "message": "No results were found."
}
// Supply another mile radius because no results were found.
{
  "message": "Please enter a mile radius of 50 or less."
}
// Please enter a mille radius that is 1 to 50 miles.
{
  "message": "Please enter a kilometer radius of 80.4672 or less."
}
// Please enter a kilometer radius that is 1 to 80.4672 kilometers.
{
    "message": "Please provide a miles or kilometers value."
}
// Please provide a value for either the miles parameter or
// the kilometers parameter. One must be provided.
{
    "message": "Please provide only one value for either miles or kilometers."
}
// Please provide only one value for either the miles parameter or
// the kilometers parameter. Only one parameter can be provided.

GET /course/details

This endpoint retrieves course details from the Google Places API. The โ€˜place_idโ€™ can be obtained from the โ€˜Get Coursesโ€™ call. We have โ€˜place_idsโ€™ for 99% of our golf clubs. If a golf club doesnโ€™t have a โ€˜place_idโ€™, it means we havenโ€™t found one yet.

Parameters

  • place_id (required): An ID is required to retrieve the details of a place from the Google Places API.

Response

Returns a JSON object with the following properties:

  • course_details: An object containing details about a golf course.
    • html_attributions: An array of HTML attributions.
    • result: An object containing detailed information about the golf course.
      • formatted_address: The formatted address of the golf course.
      • formatted_phone_number: The formatted phone number of the golf course.
      • name: The name of the golf course.
      • opening_hours: An object containing information about the opening hours of the golf course.
        • open_now: Indicates if the golf course is currently open (true/false).
        • periods: An array of periods containing the opening and closing times for each day of the week.
          • close: An object containing the closing time for a specific day.
            • day: The day of the week (0 for Sunday, 1 for Monday, โ€ฆ, 6 for Saturday).
            • time: The closing time in 24-hour format (e.g., โ€œ1800โ€ for 6:00 PM).
          • open: An object containing the opening time for a specific day.
            • day: The day of the week (0 for Sunday, 1 for Monday, โ€ฆ, 6 for Saturday).
            • time: The opening time in 24-hour format (e.g., โ€œ0800โ€ for 8:00 AM).
        • weekday_text: An array of strings containing the opening hours for each day of the week.
      • photos: An array of photos associated with the golf course.
        • height: The height of the photo.
        • html_attributions: An array of HTML attributions for the photo.
        • photo_reference: A reference to the photo.
        • width: The width of the photo.
      • rating: The rating of the golf course.
      • url: The URL of the golf course on Google Maps.
      • website: The website URL of the golf course.
    • status: The status of the API request (e.g., โ€œOKโ€ for successful).

Example

JavaScript Request:

const url = 'https://golf-course-finder.p.rapidapi.com/api/course/details?place_id=ChIJYUuxSFbmjYAR14kcbsdLieM';
const options = {
	method: 'GET',
	headers: {
		'X-RapidAPI-Key': 'YOUR_API_KEY',
		'X-RapidAPI-Host': 'golf-course-finder.p.rapidapi.com'
	}
};

try {
	const response = await fetch(url, options);
	const result = await response.text();
	console.log(result);
} catch (error) {
	console.error(error);
}

Python Request:

import requests

url = "https://golf-course-finder.p.rapidapi.com/api/course/details"

querystring = {"place_id":"ChIJYUuxSFbmjYAR14kcbsdLieM"}

headers = {
	"X-RapidAPI-Key": "YOUR_API_KEY",
	"X-RapidAPI-Host": "golf-course-finder.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())

Response:

{
  "course_details": {
    "html_attributions": [],
    "result": {
      "formatted_address": "1700 17 Mile Dr, Pebble Beach, CA 93953, USA",
      "formatted_phone_number": "(888) 242-8131",
      "name": "Pebble Beach Resorts",
      "opening_hours": {
        "open_now": false,
        "periods": [
          {
            "close": {
              "day": 0,
              "time": "1800"
            },
            "open": {
              "day": 0,
              "time": "0800"
            }
          },
          {
            "close": {
              "day": 1,
              "time": "1800"
            },
            "open": {
              "day": 1,
              "time": "0800"
            }
          },
          {
            "close": {
              "day": 2,
              "time": "1800"
            },
            "open": {
              "day": 2,
              "time": "0800"
            }
          },
          {
            "close": {
              "day": 3,
              "time": "1800"
            },
            "open": {
              "day": 3,
              "time": "0800"
            }
          },
          {
            "close": {
              "day": 4,
              "time": "1800"
            },
            "open": {
              "day": 4,
              "time": "0800"
            }
          },
          {
            "close": {
              "day": 5,
              "time": "1800"
            },
            "open": {
              "day": 5,
              "time": "0800"
            }
          },
          {
            "close": {
              "day": 6,
              "time": "1800"
            },
            "open": {
              "day": 6,
              "time": "0800"
            }
          }
        ],
        "weekday_text": [
          "Monday: 8:00โ€ฏAMโ€‰โ€“โ€‰6:00โ€ฏPM",
          "Tuesday: 8:00โ€ฏAMโ€‰โ€“โ€‰6:00โ€ฏPM",
          "Wednesday: 8:00โ€ฏAMโ€‰โ€“โ€‰6:00โ€ฏPM",
          "Thursday: 8:00โ€ฏAMโ€‰โ€“โ€‰6:00โ€ฏPM",
          "Friday: 8:00โ€ฏAMโ€‰โ€“โ€‰6:00โ€ฏPM",
          "Saturday: 8:00โ€ฏAMโ€‰โ€“โ€‰6:00โ€ฏPM",
          "Sunday: 8:00โ€ฏAMโ€‰โ€“โ€‰6:00โ€ฏPM"
        ]
      },
      "photos": [
        {
          "height": 780,
          "html_attributions": [
            "<a href>Pebble Beach Resorts</a>"
          ],
          "photo_reference": "ATplDJZr4q2ca05q7XZaDA6oHBiMZZzdwnPuUn-lULvEbY0KnuPZBMMcGNuykFzCxnjSrSzrVkDanQl4Tt1av6Kx8MMAHGwfF00b_FdCJ9cKM12TdM7fdetTDb7cG0xIQ_zEdtkVnBy--r_1upT-X_o4w5-RuXueQt80PbLfpGOG9ZFIuv4",
          "width": 1800
        },
        {
          "height": 1152,
          "html_attributions": [
            "<a href>Pebble Beach Resorts</a>"
          ],
          "photo_reference": "ATplDJYE9zr3QBmsanq4QbSFBN41F6Zzvl6-rXghh9KYkbdBsMURt_YpFdsBZ96JSHnvBEsjn8zcwTWlsOAyvYwLymMxqXOKizd7azPw68HsQz53z9yZNfY0Hb8rFRKM_VvDrNSAeFgSlmybvd_lnXIpY8Ka6w8JRwNPF8EFxTYi4Cp2BgE",
          "width": 2048
        },
        {
          "height": 3000,
          "html_attributions": [
            "<a href>Sindhu Anand</a>"
          ],
          "photo_reference": "ATplDJYs0f6bIPF00FmTPkPx37Lf29xRYzGUDs-BUFgEj01dtaIPfXCHKAcwGLQdXCc0AwkeodvtXHHmLBjMfenESS5lD3zy8eAz1vMyGHNNxugTDY1erXWSyvxZ1QGb85MfLEFaQ1BhkqaPoPL2gQ7_t_eBHZzCZdz8iIQTBD-khefQK3c",
          "width": 4000
        },
        {
          "height": 2318,
          "html_attributions": [
            "<a href>Jim Cenname</a>"
          ],
          "photo_reference": "ATplDJaMd_MOu0DSio7Dm6n-w5BXh1lp-xrlqPfegP1Dc8C3e0_b7c789uWxVKDjwSe0Rj68nW1vAOzqMAXHEYY9711pz5k1Wzp5uTmO23kv928sYqvZVrmRJn2w38pRiCyYtWBCQrb3fcsOhN84XcKGldPQRLw4rAGVyvUjVt3HW8Cif99Y",
          "width": 3280
        },
        {
          "height": 4032,
          "html_attributions": [
            "<a href>Lisa Elley</a>"
          ],
          "photo_reference": "ATplDJZwLjn75mzB3R9C4Yndh5bhKibi2SDpU4MLEMxHPPcbJcybOz1pYvX9Fq2M9hQABkkTZ9vzPyr7dUF_e2OYzkkYUrG-HSP8QY7FiID4xEdx6S9N1UdL5wl4eZw1m0NtBzJ6go2RdxF3RHAFgjr5r0252490IuRPrxps_TViO3vugSeO",
          "width": 3024
        },
        {
          "height": 1835,
          "html_attributions": [
            "<a href>I-Hsing Tan</a>"
          ],
          "photo_reference": "ATplDJbtGanq1WiJ2qpWN0ttCSFWQLTnXU_Ur8T36BLSz7PZ38c_rJ6B_xfBcEKmhgXQr7nMQoaetSuxNS25_uaeu1Rp25-hXK_IEzchl4XT4O_ZmOuyOvteDQf64u4bN7QCqVdLpk-hKlkETtuYBdQiKC54WMp2qK8nxcP3pVtqAUn--o7C",
          "width": 2746
        },
        {
          "height": 3024,
          "html_attributions": [
            "<a href>Hamid Mehr (Ben)</a>"
          ],
          "photo_reference": "ATplDJYbeojqBIoGAxfDFoUISiNvqT51ENpGwHrpqbtJ2AVd1cdUVe5DbHp4AISnOrg04khu7QRKLrMBEuXePHhwp2UYMqKnH5jl7DJGIPFlLDRmozzDGM8nvaW3aGDardqtAcKwlDGbMICPT-58572oPMr6HRYzorIMTxQFcKQLIYDAYrGF",
          "width": 4032
        },
        {
          "height": 3024,
          "html_attributions": [
            "<a href>ssc sim</a>"
          ],
          "photo_reference": "ATplDJZ6tIBETyIdXkCue6-7tLzoLcul89mF4Rg3t7knTZ3LKb9TRZ4eYiZKjcpj3zFga2vzxJUr4W-W3Nc9pYgM3QKAQlsvOe61XYe2x8DT-UqiHaOxTK52XqfYay87B5ZQeh_BCp-zWZQdfBqjohgjUY05qd1QGACZzw_xPub3DDktCQRq",
          "width": 4032
        },
        {
          "height": 9000,
          "html_attributions": [
            "<a href>Thuy-Vu Nguyen</a>"
          ],
          "photo_reference": "ATplDJaVXOwhyT13OVmmBZhkMQqYXhBA2I6Bax9CQzs71GLuBmZROexIiAZO2RsZDe7COD1nPoGEmsl0sZIj1MQWOQwCscyUM8qDzESGNNOkFUtCCk30yzRpUHemX4q8tVtIqnySL9JKWUZYUwVP8IOA_flYRLvfW7iujqYZvd8giruP4k9u",
          "width": 12000
        },
        {
          "height": 9000,
          "html_attributions": [
            "<a href>Thuy-Vu Nguyen</a>"
          ],
          "photo_reference": "ATplDJZXx36Z-trMJERm-C6k19p0yj7aQolC9TZ_w8cCQHxlGHXuq3pEywxWbi_mPUOkgvmubheqybDgoo_zRDKmvc56PoOumRug5L-k2eu6w3VQHP9cFP745GUoov1AaiCDHs4hylgitAPOyttvH7KGYPaq9uyYCO_iWpsdpZg2vOjx75Wx",
          "width": 12000
        }
      ],
      "rating": 4.7,
      "url": "https://maps.google.com/?cid=16395719238336940503",
      "website": "http://www.pebblebeach.com/"
    },
    "status": "OK"
  }
}

Errors

This Endpoint uses the following error code

{
  "course_details": {
    "error_message": "Invalid request. Invalid 'placeid' parameter.",
    "html_attributions": [],
    "status": "INVALID_REQUEST"
  }
}

Supply a valid place_id that is returned from the Get Courses endpoint.