The reference is generated from the OpenAPI 3.1.0 file. Use it to generate a client or to validate answers. To try the endpoints in Postman, import the Postman collection or open it in the public Postman workspace; the same reference is also published in Postman.
Conventions
Golf course data: par and stroke index per hole, tee lengths, course rating and slope, and club details (address, position, website, other names). Phone numbers are not delivered.
Conventions
- Lengths are whole meters per hole. Add
units=yardstoGET /v1/courses/{id}to get yards as well. - Missing values are
null, never0and never invented. - By default only tees with a course rating and slope are served. Add
include_unrated=trueto anyGETto also get the tees and courses without a rating, marked byratedandrating_status. - Ids are stable strings. A replaced id answers
301with the new id; a withdrawn id answers410. - Lists are sorted by id and paged with an opaque
cursor. data_versionchanges whenever the approved set changes./v1/releasesand/v1/changestell what changed.- Every
200carries anETag; send it back inIf-None-Matchto get304. - Every error has the form
{"error": {"code", "message"}}. GET /v1/courses/{id}/greensgives the position of the middle of each green (WGS 84), where the course has them;greens_counton a course tells how many holes have one.GET /v1/export/{country}gives a whole country as one gzip file.POST /v1/reports(hosted service) reports an error in a course or club.- What counts (hosted service): only course data counts toward a quota: per paid period on the paid plans (a month, or a year on
world), in all on the free trial.GET /v1/courses/{id}answering200counts 1;GET /v1/courses/batchcounts the courses it returns;GET /v1/export/{country}counts the number of courses in the file. Green positions count on their own:GET /v1/courses/{id}/greenscounts 1 when the course has at least one position (0 when it has none), andGET /v1/export/{country}/greenscounts the number of courses in that file. Lists, search, clubs, changes, releases, usage, reports and every304are free. Free calls have a per-minute limit on keys with a plan.X-Request-Costtells what a request counted.
Versioning. Inside v1, new fields may be added to existing objects, and new endpoints, countries and optional query parameters may appear. Clients must ignore unknown fields. Removing or renaming a field, changing a unit or the meaning of a field, changing the sort order or the paging, or changing the error model needs v2. A replaced id keeps answering 301 for at least one major version.
Access. The hosted service needs a customer key in Authorization: Bearer <key>. A key sees every country in the current release; a key on the free trial has a small number of course requests in all. What counts toward the quota is described under What counts above.
Data. The data is delivered as it is.
Authentication
Customer key in Authorization: Bearer <key>. Hosted service only. A key on a paid plan sees every country in the current release; a trial key sees the same, with a small number of course requests in all.
Courses
Course layouts with par, stroke index, tees and ratings.
List courses
Course summaries sorted by id, paged with limit and cursor. total_count counts all matches, not only the page.
Parameters
| Parameter | Description |
|---|---|
country | Only items of one country prefix, as listed in courses_per_country of /v1/meta (lower case, for example es or gb-eng). gb gives all of the United Kingdom: England, Northern Ireland, Scotland and Wales (gb-eng, gb-nir, gb-sct and gb-wls). Case-insensitive. An unknown code answers 400; GET /v1/countries lists the codes. |
q | Free-text search, ignoring case and accents. For courses it looks in club name, course name and id; for clubs in club name, other names, city, province and id. It tries these steps in order and answers with the first that finds something: (1) the text as typed; (2) the text without apostrophes, punctuation and spaces (Royal St George's finds The Royal St Georges Golf Club, stockbrook finds Stock Brook); (3) every word on its own, in any order (Turnberry Ailsa, Sandhurst, Victoria); (4) every distinctive word on its own, with golf's common words optional on both sides (golf, club, course, country, links, resort, the, GC, CC, G&CC, GK, golfklubb and the like) and Saint = St, Sainte = Ste, Mount = Mt, Fort = Ft (Shotts GC finds Shotts Golf Club, Saint Denis Golf Course finds St. Denis Golf Course); a search of only common words finds nothing in this step; (5) spelling: a distinctive word of at least 5 letters may differ by one letter, of at least 8 letters by two, where two neighbouring letters swapped count as one (wokefiled finds Wokefield and Wakefield). Steps 2 to 5 match from the start of a word and also look in the names of a club's courses, and for courses in the club's other names, city and province. Places: when the search is a town, city, county or region (the city or province of one of the clubs, or a populated place or region by its English or local name, such as Gothenburg, Munich or West Sussex), the answer also has the clubs within about 25 km of the place, more for a large place and at most 60 km; a state, province or county also has every club whose address names it, wherever in it the club is (Texas finds the clubs with TX in the address, County Dublin those with Co. Dublin). Each place counts on its own (Melbourne finds the clubs near Melbourne, Australia and near Melbourne, Florida), and with country only the places in that country. Without sort, the name matches come first (by id) and then the place's other clubs (by id); with sort=relevance the place's clubs come after the name matches, nearest first. When neither the names nor the search as a place find anything, the place is tried without golf's common words (Gothenburg golf club finds the clubs near Gothenburg). Spelling (step 5) is tried only when neither the names nor a place found anything. match in the response says which kind of step answered. A search that finds something as typed still finds the same matches; when it also names a place, the clubs near the place are added. |
sort | id (default): the list is sorted by id, as before. relevance: the best match comes first, for a search box. With q, the matches of steps 1 to 4 are taken together and ordered by how a name meets the search (a name that is the search, then a name that starts with it, then the search from the start of a word in a name, then every distinctive word in the names, then a match in city or province), then fewer letters changed for spelling, fewer words of the search missing, a shorter name without golf's common words, and id. Clubs and courses that only a place found come after the name matches, nearest to the place first. Abbreviations count as written out (GC = Golf Club, CC = Country Club) and the is left out when names are compared. Without q the order is by id. Pages follow next_cursor as usual. Not with lat and lng, which sort by distance. Any other value answers 400. |
updated_since | Only items updated (updated_at) at this instant or later. An ISO 8601 date or date-time (2026-10-26, 2026-10-26T08:00:00Z, 2026-10-26T10:00+02:00); without a time zone UTC is assumed. For clubs the newest updated_at among the club's courses counts; changed club metadata does not. Withdrawn items are not listed: use /v1/changes for those. |
limit | Page size, 1 to 500. Default 50. |
cursor | Continue after the previous page: the next_cursor of that page. Opaque. Keep the other parameters unchanged between pages. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | One page of courses. | CourseList |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 400 | bad_request See errors | – |
| 401 | unauthorized See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Get several courses
Several courses in one request (at most 100 ids), in the order asked (an id asked twice is answered once). Each id is answered as GET /v1/courses/{id} would answer it: found courses in courses, replaced ids in moved (not followed; ask for the new id), withdrawn ids in gone, and the rest in not_found. Use it to fetch the courses that /v1/changes lists. In the hosted service every course in courses counts toward the quota, the same as fetching it alone.
Parameters
| Parameter | Description |
|---|---|
idsrequired | Course ids separated by commas, 1 to 100. Spaces around an id and empty entries are ignored. |
units | meter (default) changes nothing. yards adds distances_yd and total_yd (and distances_yd_women and total_yd_women) to every tee; the meter values stay. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The courses that were found, and what happened to the other ids. | CourseBatch |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 400 | bad_request See errors | – |
| 401 | unauthorized See errors | – |
| 403 | plan_limit See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Get one course
The whole course. A replaced id answers 301 with the new id in Location and in the body; a withdrawn id answers 410.
Parameters
| Parameter | Description |
|---|---|
idrequired | Course id, as in id of a course summary. |
units | meter (default) changes nothing. yards adds distances_yd and total_yd (and distances_yd_women and total_yd_women) to every tee; the meter values stay. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The course. | CourseDetail |
| 301 | The id has been replaced. Follow Location; the body repeats the new id. | Moved |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 400 | bad_request See errors | – |
| 401 | unauthorized See errors | – |
| 403 | plan_limit See errors | – |
| 404 | not_found See errors | – |
| 405 | method_not_allowed See errors | – |
| 410 | gone See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Get the green positions of a course
The position of the middle of the green for each hole of the course, in playing order (WGS 84). A hole without a position has lat and lon null, and a course without any has greens null; greens_count on the course tells in advance. The id is answered as GET /v1/courses/{id}: a replaced id answers 301 with the new id in Location and in the body, a withdrawn id answers 410. In the hosted service the request counts 1 toward the quota when the course has at least one position, on top of the course itself, and 0 when it has none.
Parameters
| Parameter | Description |
|---|---|
idrequired | Course id, as in id of a course summary. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The green positions. | CourseGreens |
| 301 | The id has been replaced. Follow Location; the body repeats the new id. | Moved |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 400 | bad_request See errors | – |
| 401 | unauthorized See errors | – |
| 403 | plan_limit See errors | – |
| 404 | not_found See errors | – |
| 405 | method_not_allowed See errors | – |
| 410 | gone See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Clubs
Clubs with their courses and metadata.
List or search clubs
Clubs with their courses, sorted by id. With lat and lng (and optionally radius_km) it is a position search: only clubs with a known position within the radius, sorted by distance and then id, with distance_km set. The filters city and region were removed on 2026-12-04 and answer 400: q finds clubs by name, town or region.
Parameters
| Parameter | Description |
|---|---|
country | Only items of one country prefix, as listed in courses_per_country of /v1/meta (lower case, for example es or gb-eng). gb gives all of the United Kingdom: England, Northern Ireland, Scotland and Wales (gb-eng, gb-nir, gb-sct and gb-wls). Case-insensitive. An unknown code answers 400; GET /v1/countries lists the codes. |
q | Free-text search, ignoring case and accents. For courses it looks in club name, course name and id; for clubs in club name, other names, city, province and id. It tries these steps in order and answers with the first that finds something: (1) the text as typed; (2) the text without apostrophes, punctuation and spaces (Royal St George's finds The Royal St Georges Golf Club, stockbrook finds Stock Brook); (3) every word on its own, in any order (Turnberry Ailsa, Sandhurst, Victoria); (4) every distinctive word on its own, with golf's common words optional on both sides (golf, club, course, country, links, resort, the, GC, CC, G&CC, GK, golfklubb and the like) and Saint = St, Sainte = Ste, Mount = Mt, Fort = Ft (Shotts GC finds Shotts Golf Club, Saint Denis Golf Course finds St. Denis Golf Course); a search of only common words finds nothing in this step; (5) spelling: a distinctive word of at least 5 letters may differ by one letter, of at least 8 letters by two, where two neighbouring letters swapped count as one (wokefiled finds Wokefield and Wakefield). Steps 2 to 5 match from the start of a word and also look in the names of a club's courses, and for courses in the club's other names, city and province. Places: when the search is a town, city, county or region (the city or province of one of the clubs, or a populated place or region by its English or local name, such as Gothenburg, Munich or West Sussex), the answer also has the clubs within about 25 km of the place, more for a large place and at most 60 km; a state, province or county also has every club whose address names it, wherever in it the club is (Texas finds the clubs with TX in the address, County Dublin those with Co. Dublin). Each place counts on its own (Melbourne finds the clubs near Melbourne, Australia and near Melbourne, Florida), and with country only the places in that country. Without sort, the name matches come first (by id) and then the place's other clubs (by id); with sort=relevance the place's clubs come after the name matches, nearest first. When neither the names nor the search as a place find anything, the place is tried without golf's common words (Gothenburg golf club finds the clubs near Gothenburg). Spelling (step 5) is tried only when neither the names nor a place found anything. match in the response says which kind of step answered. A search that finds something as typed still finds the same matches; when it also names a place, the clubs near the place are added. |
sort | id (default): the list is sorted by id, as before. relevance: the best match comes first, for a search box. With q, the matches of steps 1 to 4 are taken together and ordered by how a name meets the search (a name that is the search, then a name that starts with it, then the search from the start of a word in a name, then every distinctive word in the names, then a match in city or province), then fewer letters changed for spelling, fewer words of the search missing, a shorter name without golf's common words, and id. Clubs and courses that only a place found come after the name matches, nearest to the place first. Abbreviations count as written out (GC = Golf Club, CC = Country Club) and the is left out when names are compared. Without q the order is by id. Pages follow next_cursor as usual. Not with lat and lng, which sort by distance. Any other value answers 400. |
updated_since | Only items updated (updated_at) at this instant or later. An ISO 8601 date or date-time (2026-10-26, 2026-10-26T08:00:00Z, 2026-10-26T10:00+02:00); without a time zone UTC is assumed. For clubs the newest updated_at among the club's courses counts; changed club metadata does not. Withdrawn items are not listed: use /v1/changes for those. |
lat | Latitude of a point, -90 to 90. Together with lng this turns the request into a position search: only clubs with a known position within radius_km, nearest first. |
lng | Longitude of a point, -180 to 180. Must be given together with lat. |
radius_km | Search radius in kilometres, greater than 0 and at most 500. Default 50. Requires lat and lng. When q finds nothing within the radius, outside_radius names the nearest matches further away. |
limit | Page size, 1 to 500. Default 50. |
cursor | Continue after the previous page: the next_cursor of that page. Opaque. Keep the other parameters unchanged between pages. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | One page of clubs. | ClubList |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 400 | bad_request See errors | – |
| 401 | unauthorized See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Get one club
The club with its courses. A merged club's old id answers 301 with the new id in Location and in the body; a withdrawn id answers 410.
Parameters
| Parameter | Description |
|---|---|
idrequired | Club id, as in club_id of a course summary. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The club. | Club |
| 301 | The club id has been merged into another. Follow Location; the body repeats the new id. | Moved |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 401 | unauthorized See errors | – |
| 404 | not_found See errors | – |
| 405 | method_not_allowed See errors | – |
| 410 | gone See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Meta
Release, coverage and change information.
Describe the current data release
Versions, counts per country and units of the current release. Compare data_version with the one you stored to learn whether anything changed.
Parameters
| Parameter | Description |
|---|---|
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The current release. | Meta |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 401 | unauthorized See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
List coverage per country
One entry per country (England, Scotland and Wales are separate), with the number of courses and clubs, the number of 9- and 18-hole courses and the ids of all courses.
Parameters
| Parameter | Description |
|---|---|
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Coverage per country. | CountryList |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 401 | unauthorized See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
List data releases
The release history, newest first, with the number of added, changed and removed courses and clubs in each release.
Parameters
| Parameter | Description |
|---|---|
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The release history. | ReleaseList |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 401 | unauthorized See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
List changes since a release
The net change in course and club ids from the release since to the current one: what was added, what changed and what is gone (with the replacing id when there is one). A since that is unknown answers 400: fetch everything again.
Parameters
| Parameter | Description |
|---|---|
sincerequired | A data_version from /v1/meta or /v1/releases. The changes after that release are returned. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The changes. | Changes |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 400 | bad_request See errors | – |
| 401 | unauthorized See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Account
The customer's own usage.
Show the customer's own request counts
Hosted service only; the local reference server does not have this path. Counts are per customer and UTC day; this request is included in requests_today and requests_this_month, and counts nothing toward the quota.
Parameters
| Parameter | Description |
|---|---|
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The request counts. | Usage |
| 401 | unauthorized See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Download
A whole country as one file.
Download a whole country as one file
Every course and every club of one country in the current release as one gzip-compressed JSON file (CountryExport once decompressed): the same objects as GET /v1/courses/{id} (in meters) and GET /v1/clubs/{id}, sorted by id. The same release always gives the same bytes, so the ETag changes only when data_version does. Use it to keep a full copy; between files, /v1/changes tells what changed. The file is served as application/gzip; it is not decompressed for you. Counts toward the quota as the number of courses in the file, the same as fetching each course. A key whose plan does not include country files answers 403 plan_limit.
Parameters
| Parameter | Description |
|---|---|
countryrequired | Country as a key of courses_per_country in /v1/meta, for example es or gb-eng. Case does not matter. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The file. | gzip of CountryExport |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 401 | unauthorized See errors | – |
| 403 | plan_limit See errors | – |
| 404 | not_found See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Download the green positions of a whole country as one file
The green positions of every course of one country that has any, in the current release, as one gzip-compressed JSON file (CountryGreensExport once decompressed): the same objects as GET /v1/courses/{id}/greens, sorted by course id. The same release always gives the same bytes. The file is served as application/gzip; it is not decompressed for you. A country without green positions answers 404; greens_courses_count in /v1/countries tells in advance. Counts toward the quota as the number of courses in the file (greens_courses_count), the same as fetching the green positions of each course, and on top of GET /v1/export/{country}. A key whose plan does not include country files answers 403 plan_limit.
Parameters
| Parameter | Description |
|---|---|
countryrequired | Country as a key of courses_per_country in /v1/meta, for example es or gb-eng. Case does not matter. |
include_unrated | false (default): a course is served with only its tees that have a course rating and slope, and a course without such a tee is left out. true: the same release with those tees and courses included, marked by rated on each tee and rating_status on each course. Both views have the same data_version but each has its own history: use the same value of include_unrated with /v1/releases and /v1/changes as when you fetched the data. Any other value answers 400. |
If-None-Match | An ETag from an earlier response. When it still matches, the answer is 304 without a body. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The file. | gzip of CountryGreensExport |
| 304 | Not modified: the If-None-Match header matched the current ETag. No body. | – |
| 401 | unauthorized See errors | – |
| 403 | plan_limit See errors | – |
| 404 | not_found See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Feedback
Error reports from customers.
Report an error in a course or club
Hosted service only; the local reference server does not have this path. Tell us when a value looks wrong. The report is stored and answered with 202; it changes nothing by itself. We check it like any other correction, and a fix shows up in a later release (/v1/changes). The course or club must be visible to your key. At most 100 reports per customer and UTC day; each report also counts as a request.
Request body
application/json: ReportRequest. The report.
Responses
| Status | Description | Body |
|---|---|---|
| 202 | The report is stored. | ReportReceipt |
| 400 | bad_request See errors | – |
| 401 | unauthorized See errors | – |
| 404 | not_found See errors | – |
| 405 | method_not_allowed See errors | – |
| 429 | quota_exceeded See errors | – |
| 500 | internal See errors | – |
| 503 | unavailable See errors | – |
Schemas
Every object the API returns or accepts. Fields marked required are always present; any field can gain siblings within v1.
ErrorMovedPagingCourseSummaryRatingTeeClubLocationClubAddressClubWebsiteClubRefCourseDetailCourseBatchBatchMovedClubClubListItemCourseListClubListMetaCountryCountryListChangeCountsReleaseReleaseListRemovedItemChangeSetChangesUsagePartOfClubNameCountryExportReportRequestReportReceiptLoopLoopUseGreenCourseGreensCountryGreensExport
Error
Body of every error response (4xx and 5xx).
| Field | Description |
|---|---|
errorrequired | The error. |
error.coderequired | Machine-readable error code: bad_request (400), unauthorized (401), plan_limit (403), not_found (404), method_not_allowed (405), gone (410), quota_exceeded (429), internal (500) or unavailable (503). Clients should treat a code they do not know as a generic error of that HTTP status. |
error.messagerequired | Explanation in English for people. Do not match on it; use code. |
Moved
Body of a 301 response: the requested id has been replaced by another one.
| Field | Description |
|---|---|
alias_ofrequired | The id that replaces the requested id. The Location header points at it. |
Paging
Paging information for list responses.
| Field | Description |
|---|---|
total_countrequired | Number of items matching the query in total, not only on this page. |
limitrequired | Page size in effect (the limit parameter, or 50). |
next_cursorrequired | Pass this as cursor to get the next page. null on the last page. Opaque: do not parse or build it. |
CourseSummary
One playable course layout in short form. Used in course lists and inside clubs.
| Field | Description |
|---|---|
idrequired | Stable course id: lowercase ASCII and hyphens, starting with the country prefix, for example es-camposol-club-de-golf-standard-18. If an id is replaced later, the old id answers 301. |
club_idrequired | Id of the club the course belongs to. |
club_namerequired | Name of the club. |
course_namerequired | Name of the course or layout. |
countryrequired | ISO 3166-1 alpha-2 country code in upper case, for example ES. |
regionrequired | ISO 3166-2 code, only for England, Scotland, Wales and Northern Ireland (GB-ENG, GB-SCT, GB-WLS, GB-NIR). null for every other country. |
holes_countrequired | Number of holes played on this layout. 18 or 9 in almost all cases; 6, 11, 12 and 14 also occur. |
physical_holes_countrequired | Number of physical holes the layout is built on, for example 9 when an 18-hole round is two laps of a 9-hole loop. null when not established. |
par_totalrequired | Sum of par_men over all holes. null when par is not known for every hole. |
tee_countrequired | Number of tees listed on the course. |
updated_atrequired | When the content of this course last changed through an approval, ISO 8601 with time zone: the newest approval among the course itself, the 9-hole courses whose ratings it carries (ratings[].half) and, for a 9-hole course with part_of, the 18-hole course it belongs to. A later update of the course moves it. Used by updated_since. |
part_ofrequired | Normally null. The front and back nine of an 18-hole layout in the API are not courses of their own: the 18-hole layout carries each half's 9-hole ratings on its tees (ratings[].half), and an id that used to be such a half redirects (301) to the 18-hole layout. Set only for the rare 9-hole course that is listed while the same response set also holds its 18-hole layout only under include_unrated=true: which layout and which half. |
rating_statusrequired | rated: every tee has a course rating and slope (rated is true on all tees). partial: some tees have. unrated: none has, or the course has no tees. partial and unrated appear only with include_unrated=true. |
greens_count | Number of holes with a green position in GET /v1/courses/{id}/greens. 0 when the course has none; then that request is free. |
Rating
A course rating and slope for one tee and one category.
| Field | Description |
|---|---|
categoryrequired | Rating category: men or women. |
course_ratingrequired | Course rating, in strokes with one decimal (for example 71.4). |
slope_ratingrequired | Slope rating. Normally a whole number between 55 and 155 (a few are given with a decimal point). |
holesrequired | Number of holes the rating applies to: 18 or 9 (12 occurs). Read it before using the rating: on a 9-hole course a rating with holes 18 is the rating for playing the nine twice, with the par of the two laps in par_total. |
par_totalrequired | Par the rating was issued for. |
halfrequired | null for a rating of the whole layout. front or back for a 9-hole rating of one half of an 18-hole layout: holes 1-9 or 10-18; on a nine played twice (published_two_loops), the first or second loop. Such ratings have holes 9 and the par of that half in par_total. They are only given where that tee has a nine-hole rating; otherwise there is none. |
Tee
One tee (set of markers) on a course: lengths per hole, printed totals and ratings.
| Field | Description |
|---|---|
namerequired | Name of the tee as the club writes it. |
kind | What sort of tee this is. winter: a winter tee (the name says Winter). temporary: a temporary tee (the name says Temp or Temporary). youth: a tee for a youth age class, served only with include_unrated=true. regular: every other tee. Absent in releases published before the field was added. Use it to sort or hide tees in a tee picker; new values may be added. |
colorrequired | Tee colour in English lower case, for example white, yellow, red; a tee with two colours as green/white. null when not stated. |
distances_mrequired | Length of each hole in whole meters, hole 1 first. null when the tee has no lengths. An entry is null when that hole's length is not known; never 0. |
distances_m_women | Length of each hole in whole meters for women, hole 1 first, when women play other lengths than men on this tee (for example another teeing area on some holes). null when the tee has no lengths of its own for women; then distances_m applies to women too. |
source_unitrequired | Unit the original lengths are in: yards or m. null when not recorded. |
total_mrequired | Sum of distances_m. null when the tee has no lengths or a hole is missing. |
total_m_women | Sum of distances_m_women. null when distances_m_women is null. |
par_menrequired | Par per hole for men on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level par_men applies. |
par_womenrequired | Par per hole for women on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level par_women applies. |
index_menrequired | Stroke index per hole for men on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level index_men applies. |
index_womenrequired | Stroke index per hole for women on this tee, hole 1 first, when the tee has its own values (for example a women's tee where a hole is par 5 and the men's is par 4). null when the tee has no values of its own; then the course-level index_women applies. |
ratingsrequired | Ratings for this tee, one per category (men, women). |
distances_yd | Length of each hole in whole yards. Present only with units=yards. The card's own yards when the course is measured in yards (source_unit); otherwise meters / 0.9144 rounded to a whole number. null when the tee has no lengths (as distances_m). |
distances_yd_women | Only with units=yards: distances_m_women in yards, hole 1 first. null when distances_m_women is null. |
total_yd | Sum of distances_yd. Present only with units=yards. null when a hole length is missing. |
total_yd_women | Only with units=yards: sum of distances_yd_women. null when distances_yd_women is null. |
ratedrequired | true when the tee has at least one rating with both course rating and slope. Nine-hole ratings added from a separate nine (half) do not count. Always true unless include_unrated=true. |
ClubLocation
Position of the club. null when no position is known.
| Field | Description |
|---|---|
latrequired | Latitude in decimal degrees (WGS 84). |
lonrequired | Longitude in decimal degrees (WGS 84). |
confidence | confirmed when two independent positions agree within 3 km, otherwise single_source. |
ClubAddress
Postal address of the club. null when no address is known.
| Field | Description |
|---|---|
streetrequired | Street name, possibly with the number. |
housenumberrequired | House number when given separately. |
postcoderequired | Postal code. |
cityrequired | City or town. |
regionrequired | Region or province as written in the address (not an ISO code), for example Malaga. |
ClubWebsite
Website of the club. null when no website is known.
| Field | Description |
|---|---|
valuerequired | Web address of the club. |
ClubRef
The club of a course: its id and name, and its metadata when the release carries it.
| Field | Description |
|---|---|
idrequired | Id of the club. |
namerequired | Name of the club. |
location | Position of the club. Present when the release carries club metadata; null when unknown. |
address | Address of the club. Present when the release carries club metadata; null when unknown. |
website | Website of the club. Present when the release carries club metadata; null when unknown. |
other_names | Other names the club is known by; searched by q on /v1/clubs. Present when the release carries club metadata with names; an empty list when there are none. |
CourseDetail
A whole course: par and stroke index per hole, tees with lengths and ratings, approval and when it was last updated.
| Field | Description |
|---|---|
idrequired | Stable course id, as in the summary. |
clubrequired | The club the course belongs to. |
course_namerequired | Name of the course or layout. |
countryrequired | ISO 3166-1 alpha-2 country code in upper case, for example ES. |
regionrequired | ISO 3166-2 code for England, Scotland, Wales and Northern Ireland (GB-ENG, GB-SCT, GB-WLS, GB-NIR); null elsewhere. |
holes_countrequired | Number of holes played on this layout. |
physical_holes_countrequired | Number of physical holes the layout is built on. null when not established. |
par_menrequired | Par per hole for men, hole 1 first. |
par_womenrequired | Par per hole for women, hole 1 first. null when there is no separate women's par. |
index_menrequired | Stroke index per hole for men, hole 1 first: 1 is the hardest hole, and each number from 1 to holes_count occurs once. |
index_womenrequired | Stroke index per hole for women. null when there is no separate women's index. |
par_totalrequired | Sum of par_men. null when par is not known for every hole. |
teesrequired | Tees of the course. |
updated_atrequired | When the content of this course last changed through an approval, ISO 8601 with time zone: the newest approval among the course itself, the 9-hole courses whose ratings it carries (ratings[].half) and, for a 9-hole course with part_of, the 18-hole course it belongs to. A later update of the course moves it. Used by updated_since. |
data_versionrequired | Version of the data release the response comes from. The same value as data_version in /v1/meta. |
part_ofrequired | Normally null. The front and back nine of an 18-hole layout in the API are not courses of their own: the 18-hole layout carries each half's 9-hole ratings on its tees (ratings[].half), and an id that used to be such a half redirects (301) to the 18-hole layout. Set only for the rare 9-hole course that is listed while the same response set also holds its 18-hole layout only under include_unrated=true: which layout and which half. |
loopsrequired | The loops of the layout with a stable id per loop at the club. On an 18-hole layout two entries in playing order, holes 1-9 and holes 10-18 (on a nine played twice, the first and second loop); on a 9-hole course one entry, holes 1-9. Two halves, or a half and a 9-hole course, at the same club are the same loop when par is equal hole by hole and at least one tee has exactly the same length on all nine holes, also through other layouts (A = B and B = C). Stroke index is not compared. A loop found on only one layout gets no id. null when no half belongs to a loop. |
used_inrequired | For a 9-hole course: the 18-hole layouts in the API whose loops give this course as course_id, and on which holes. null when none. |
rating_statusrequired | rated: every tee has a course rating and slope (rated is true on all tees). partial: some tees have. unrated: none has, or the course has no tees. partial and unrated appear only with include_unrated=true. |
greens_count | Number of holes with a green position in GET /v1/courses/{id}/greens. 0 when the course has none; then that request is free. |
CourseBatch
Answer of GET /v1/courses/batch. Every requested id is in exactly one of the four lists.
| Field | Description |
|---|---|
coursesrequired | The courses found, in the order asked, each as GET /v1/courses/{id} returns it. |
movedrequired | Ids that have been replaced: id as asked, alias_of the replacing id. |
gonerequired | Ids of withdrawn courses (410 on the single endpoint). |
not_foundrequired | Ids that are not known, or not in the key's countries. |
BatchMoved
A replaced id in a batch answer.
| Field | Description |
|---|---|
idrequired | The id that was asked for. |
alias_ofrequired | The id that replaces it. |
Club
A club with its courses and, when the release carries it, its metadata.
| Field | Description |
|---|---|
idrequired | Stable club id, for example es-camposol-club-de-golf-club. A merged club's old id answers 301. |
namerequired | Name of the club. |
countryrequired | ISO 3166-1 alpha-2 country code in upper case. |
regionrequired | ISO 3166-2 code for England, Scotland and Wales; null elsewhere. |
coursesrequired | The club's courses, sorted by id. |
location | Position of the club. Present when the release carries club metadata; null when unknown. |
address | Address of the club. Present when the release carries club metadata; null when unknown. |
website | Website of the club. Present when the release carries club metadata; null when unknown. |
other_names | Other names the club is known by; searched by q on /v1/clubs. Present when the release carries club metadata with names; an empty list when there are none. |
ClubListItem
One hit in a club list.
| Field | Description |
|---|---|
clubrequired | The club, in the same form as /v1/clubs/{id}. |
distance_kmrequired | Great-circle distance in kilometres, rounded to whole meters: from the searched point for a position search (lat and lng, also in outside_radius), or from the place for a club that only a place in q found. Otherwise null. |
CourseList
One page of courses, sorted by id (best match first with sort=relevance).
| Field | Description |
|---|---|
datarequired | The courses on this page. |
match | Only with q: how the search found its matches. text: the search as typed, or without punctuation and spaces (steps 1 and 2 of q). words: every word, or every distinctive word, on its own (steps 3 and 4). place: no name matched, and these are near the place the search names (see q). spelling: nothing matched as written and these are the nearest spellings (step 5), for a "Did you mean". null when nothing was found. |
pagingrequired | Paging information. |
unrated_count | Only with q: how many more matches the same search has with include_unrated=true, which also lists courses and clubs without a course rating. 0 when there are none. null when the request already has include_unrated=true, for a position search (lat and lng), and when the release has no such option. Use it to offer the option when a search finds little or nothing. |
ClubList
One page of clubs, sorted by id (by distance, then id, for a position search; best match first with sort=relevance).
| Field | Description |
|---|---|
datarequired | The clubs on this page. |
match | Only with q: how the search found its matches. text: the search as typed, or without punctuation and spaces (steps 1 and 2 of q). words: every word, or every distinctive word, on its own (steps 3 and 4). place: no name matched, and these are near the place the search names (see q). spelling: nothing matched as written and these are the nearest spellings (step 5), for a "Did you mean". null when nothing was found. |
outside_radius | Only for a position search with q (q, lat and lng) that finds no club within radius_km: the nearest clubs that the same q finds outside the radius, at most 3, nearest first, each with its distance from the point. An empty array when q finds no club with a position anywhere in the countries searched. Not present otherwise. Use it to tell your user that the club exists but further away, for example when the point you search from is not where the club is. |
pagingrequired | Paging information. |
unrated_count | Only with q: how many more matches the same search has with include_unrated=true, which also lists courses and clubs without a course rating. 0 when there are none. null when the request already has include_unrated=true, for a position search (lat and lng), and when the release has no such option. Use it to offer the option when a search finds little or nothing. |
Meta
Description of the current data release.
| Field | Description |
|---|---|
api_versionrequired | Major version of the API. Always 1 in v1. |
data_versionrequired | Version of the data: a SHA-256 hex digest that changes with every change of the approved set. Pass it as since to /v1/changes later. |
generated_atrequired | Time of the latest approval in the release, ISO 8601 with time zone. |
courses_countrequired | Number of courses in the release (for the customer's countries in the hosted service). |
clubs_countrequired | Number of clubs in the release. |
courses_per_countryrequired | Number of courses per country prefix, for example {"es": 628}. The keys are the values country accepts. |
unitsrequired | Units used in the responses. |
units.lengthrequired | Unit of all lengths: always meter. |
Country
Coverage of one country, or of one UK nation.
| Field | Description |
|---|---|
countryrequired | ISO 3166-1 alpha-2 country code in upper case. |
regionrequired | ISO 3166-2 code for England, Scotland, Wales and Northern Ireland (GB-ENG, GB-SCT, GB-WLS, GB-NIR); null elsewhere. |
courses_countrequired | Number of courses. |
clubs_countrequired | Number of clubs. |
nine_hole_coursesrequired | Number of courses with holes_count 9. |
eighteen_hole_coursesrequired | Number of courses with holes_count 18. |
greens_courses_count | Number of courses with at least one green position: the courses in GET /v1/export/{country}/greens, and what that file counts toward the quota. |
CountryList
Coverage per country.
| Field | Description |
|---|---|
countriesrequired | One entry per country (England, Scotland and Wales are separate entries). |
ChangeCounts
Number of ids that were added, changed or removed in one release.
| Field | Description |
|---|---|
addedrequired | Number of ids added. |
changedrequired | Number of ids whose content changed. |
removedrequired | Number of ids removed (withdrawn or replaced). |
Release
One data release in the history.
| Field | Description |
|---|---|
data_versionrequired | The release's data_version. |
generated_atrequired | Time of the latest approval in the release, ISO 8601 with time zone. |
previousrequired | data_version of the release before this one. null for the first release in the history. |
coursesrequired | Course changes in this release compared with the previous one. |
clubsrequired | Club changes in this release compared with the previous one. |
ReleaseList
The release history, newest first.
| Field | Description |
|---|---|
releasesrequired | Releases, newest first. The first one is the current release. |
RemovedItem
An id that no longer exists.
| Field | Description |
|---|---|
idrequired | The id that was removed. |
alias_ofrequired | The id that replaces it (the old id then answers 301). null when it was withdrawn (the old id answers 410). |
ChangeSet
Net change of ids of one kind between two releases.
| Field | Description |
|---|---|
addedrequired | Ids that did not exist in the since release and exist now. |
changedrequired | Ids that exist in both and whose content changed. |
removedrequired | Ids that existed in the since release and are gone now. |
Changes
Net changes between a past release and the current one.
| Field | Description |
|---|---|
sincerequired | The data_version the changes are counted from, as given. |
data_versionrequired | The current data_version. |
coursesrequired | Course ids that changed. |
clubsrequired | Club ids that changed. |
Usage
The customer's own request counts. Hosted service only.
| Field | Description |
|---|---|
customerrequired | Name of the customer the key belongs to. |
countriesrequired | Country prefixes the key gives access to. |
dayrequired | The current day (UTC), YYYY-MM-DD. |
monthrequired | The current month (UTC), YYYY-MM. |
requests_todayrequired | All requests today, free or not, including this one. |
requests_this_monthrequired | All requests this month, free or not, including this one. |
quota_used_todayrequired | Course requests counted toward the quota today: 1 per course answering 200, the number of courses per country file. |
quota_used_this_monthrequired | Course requests counted toward the quota this calendar month (UTC). A paid plan counts its quota over the paid period instead: see quota_used_this_period. |
daily_quotarequired | Course requests allowed per day (see quota_used_today). Lists, search and other calls are free. null when no quota is set. |
monthly_quotarequired | Course requests allowed per month on a monthly paid plan, counted over the paid period (see period_quota and quota_used_this_period). Lists, search and other calls are free. null on a yearly plan and when no plan quota is set. |
planrequired | The key's plan: trial (the free trial: a few course requests in all, no country files), starter, basic, plus, business or world (yearly). null for a customer set up by hand. |
period_quotarequired | Course requests allowed in the current paid period: a month, or a year on world. Lists, search and other calls are free. On trial it is the trial's course requests in all, which do not start again. null without a plan quota. |
period_startrequired | The day (UTC) the current paid period started, YYYY-MM-DD. The quota starts again when the plan renews, and a larger plan starts a new period. null without a plan quota. |
period_endrequired | When the current paid period ends and the quota starts again. null without a plan quota, or when it is not known (then the quota follows the calendar month). |
quota_used_this_periodrequired | Course requests counted toward period_quota in the current paid period, counting the whole day the period started. null without a plan quota. |
PartOf
This 9-hole layout is one half, or one loop, of an 18-hole layout in the API: the same holes, par and lengths as that half. null when the layout is not part of another.
| Field | Description |
|---|---|
idrequired | Id of the 18-hole layout. |
halfrequired | front is holes 1-9 (or the first loop), back holes 10-18 (or the second loop). |
ClubName
Another name the same club is known by (word order, 'Golf Club' for 'Club de Golf', abbreviations). Used by the club search.
| Field | Description |
|---|---|
valuerequired | The name as written. |
CountryExport
The whole country in one document: what GET /v1/courses/{id} and GET /v1/clubs/{id} answer for every course and club of the country, sorted by id. Lengths are meters.
| Field | Description |
|---|---|
api_versionrequired | API version, as in /v1/meta. |
countryrequired | ISO 3166-1 alpha-2 code, as in /v1/countries. |
regionrequired | ISO 3166-2 region for countries split by region (for example England), as in /v1/countries; otherwise null. |
data_versionrequired | Version of the data release the file comes from, as in /v1/meta. |
generated_atrequired | When the release was generated, as in /v1/meta. |
coursesrequired | Every course of the country, sorted by id. |
clubsrequired | Every club of the country, sorted by id. |
ReportRequest
An error report. Give exactly one of course_id and club_id, and a message. Unknown fields are refused with 400. The body may be at most 8192 bytes.
| Field | Description |
|---|---|
course_id | Id of the course the report is about, as in the API. |
club_id | Id of the club the report is about, as in the API. |
field | Optional: which value looks wrong, in your own words or as a path such as tees[0].ratings[1].slope_rating. |
messagerequired | What is wrong and, if you know it, what is right and where it can be seen. Leading and trailing spaces are removed. |
ReportReceipt
Receipt for a stored report.
| Field | Description |
|---|---|
reportrequired | The stored report. |
report.idrequired | Id of the report; the same as the X-Request-Id of the request. Quote it when you contact us. |
report.received_atrequired | When the report was stored, UTC. |
Loop
One loop of a layout.
| Field | Description |
|---|---|
holesrequired | First and last hole of the loop on this layout: [1, 9] or [10, 18]. |
loop_idrequired | Id of the loop at the club, <club id>-loop-<n>. It stays the same in later releases while any layout that plays the loop remains. null when the half belongs to no loop. |
course_idrequired | Id of the 9-hole course that is this loop when the loop has exactly one; on a 9-hole course its own id. null otherwise. |
LoopUse
An 18-hole layout that plays this 9-hole course as one of its loops.
| Field | Description |
|---|---|
course_idrequired | Id of the 18-hole layout. |
holesrequired | The holes of the 18-hole layout this loop covers: [1, 9] or [10, 18]. |
Green
The middle of the green of one hole. lat and lon are both null when the hole has no position; a missing position is never estimated.
| Field | Description |
|---|---|
holerequired | Hole number on this layout, from 1 to holes_count. |
latrequired | Latitude of the middle of the green in decimal degrees (WGS 84). null when there is no position for the hole. |
lonrequired | Longitude of the middle of the green in decimal degrees (WGS 84). null when there is no position for the hole. |
CourseGreens
The green positions of one course: one entry per hole in playing order.
| Field | Description |
|---|---|
course_idrequired | Course id, as in id of the course. |
holes_countrequired | Number of holes played on this layout, as on the course. |
greens_countrequired | Number of holes with a position, as greens_count on the course. |
greensrequired | One entry per hole, hole 1 first, holes_count entries. null when the course has no green positions at all. |
CountryGreensExport
The green positions of a whole country in one document: what GET /v1/courses/{id}/greens answers for every course of the country that has at least one position, sorted by course id.
| Field | Description |
|---|---|
api_versionrequired | API version, as in /v1/meta. |
countryrequired | ISO 3166-1 alpha-2 code, as in /v1/countries. |
regionrequired | ISO 3166-2 region for countries split by region (for example England), as in /v1/countries; otherwise null. |
data_versionrequired | Version of the data release the file comes from, as in /v1/meta. |
generated_atrequired | When the release was generated, as in /v1/meta. |
coursesrequired | The green positions of every course of the country that has any, sorted by course id. |
Errors
Every error answers {"error": {"code", "message"}}. Branch on code; the message is for people and may change.
| Status | Code | Meaning |
|---|---|---|
| 304 | – | Not modified: the If-None-Match header matched the current ETag. No body. |
| 400 | bad_request | the request is not valid, for example an unknown country, a bad limit, cursor, updated_since, units, lat, lng or radius_km, or a since that is missing or not a known data_version, or a report body that is not valid (POST /v1/reports). |
| 401 | unauthorized | the key is missing, wrong, revoked or inactive. Hosted service only. |
| 403 | plan_limit | the key's plan does not include this, for example country files (/v1/export/{country} and /v1/export/{country}/greens), or the free trial's course requests are used up (then on a course or a batch; it does not start again, so do not retry). Hosted service only. |
| 404 | not_found | no such path, no such id, or no such country (for /v1/export/{country} and reports, also one outside the key's countries). |
| 405 | method_not_allowed | the path does not take this method. Every path takes only GET, except /v1/reports, which takes only POST (hosted service). It answers 405 after the key has been checked in the hosted service. |
| 410 | gone | the id existed earlier and has been withdrawn without a replacement. |
| 429 | quota_exceeded | the daily or monthly quota of course requests is used up (a course, or a country file that counts more than what is left), or the per-minute limit on free calls is reached, or (for POST /v1/reports) the customer has sent 100 reports this UTC day. Hosted service only. |
| 500 | internal | unexpected error. Retry later and quote the X-Request-Id. Hosted service only. |
| 503 | unavailable | no data release is active at the moment, or the data is being updated (then with Retry-After; try again after that many seconds). Hosted service only. |
Response headers
| Header | Meaning |
|---|---|
ETag | Strong validator of the response body. Send it back in If-None-Match to get 304 when nothing changed. |
X-Request-Id | Unique id (UUID) of the request. Quote it when reporting a problem. |
X-Requests-Today | Requests counted for the customer today (UTC day), including this one. Hosted service only. |
X-Request-Cost | What this request counted toward the quota: 1 for a course answering 200, 1 for the green positions of a course that has any, the number of courses for a country file, 0 for everything else. Hosted service only. |
X-Quota-Daily | The customer's daily quota of course requests: each course (GET /v1/courses/{id} with 200) counts 1 and each country file counts the number of courses in it. Hosted service only, and only when a daily quota is set. |
X-Quota-Monthly | The customer's monthly quota of course requests (the monthly paid plans), counted from the day the paid month started (UTC): each course (GET /v1/courses/{id} with 200) counts 1 and each country file counts the number of courses in it. Hosted service only, and only on a monthly plan; a yearly plan has its quota in GET /v1/usage (period_quota). |
X-Quota-Remaining | Course requests left after this request, of the quota that runs out first when there is both a daily and a monthly quota, plus any course requests bought once. Hosted service only, and only when a quota is set. |
Retry-After | Seconds to wait before trying again. On 429 quota_exceeded: 60 when the per-minute limit on free calls is reached, otherwise the seconds until the quota starts again (the next UTC day for a daily quota or for reports, the end of the paid period for a plan, or 60 while a plan is being renewed). On 503 unavailable: while the data is being updated. Hosted service only. |
Location | Path of the replacing resource, for example /v1/courses/{new-id} (/v1/courses/{new-id}/greens for green positions). It keeps units=yards (courses) and include_unrated=true in the query when they were asked for, in that order. |
WWW-Authenticate | Always Bearer. Hosted service only. |
Content-Disposition | attachment with a file name of the form golf-course-data-{country}-{first 12 characters of data_version}.json.gz, or ...-include-unrated.json.gz with include_unrated=true. |