Docs

Quickstart

Create a test key and read one driver.

Create a test key

Create an account in the dashboard. Free requires no credit card. Save the API key secret when it appears; it is shown once. A test key reads the fixed sandbox fixture.

Send a request

Run both lines in the same terminal window, with your key between the single quotes on the first line:

Shell
export GOLFDEV_API_KEY='<your test key>'
curl 'https://api.golfapi.dev/drivers?limit=1' \
  -H "Authorization: Bearer $GOLFDEV_API_KEY"

The first line saves the key in the GOLFDEV_API_KEY variable. In the request, leave $GOLFDEV_API_KEY as written; the shell replaces it with your key. A 401 with the message "Empty bearer token" means the variable is not set in that terminal. See Set your key.

The response contains data and page. Save the club's id for joins. The Golfapi-Request-Id response header identifies the request. In your own code, keep the secret in your server environment or secret manager.

Read live data

Choose an available paid plan in Pricing, complete checkout, then create a live key after the dashboard confirms access. Replace the environment variable with that secret; the API hostname and request format stay the same.

Continue with authentication, queries and Catalog for data limits.