The /geodata/getnearest endpoint finds ski resorts nearest to a given geographical location using latitude and longitude coordinates.
GET /geodata/getnearest
lat (float, required)Latitude coordinate of the search origin point.
Range: -90 to 90 (decimal degrees)
Examples:
lat=59.9139 - Oslo, Norwaylat=61.3150 - Trysil arealat=60.4720 - Bergen arealon (float, required)Longitude coordinate of the search origin point.
Range: -180 to 180 (decimal degrees)
Examples:
lon=10.7522 - Oslo, Norwaylon=12.2680 - Trysil arealon=5.3340 - Bergen areadistance (integer, optional, default: 50)Maximum search radius in kilometers from the origin point.
Default: 50 km Range: Any positive integer (practical range: 1-1000)
Examples:
distance=10 - Find resorts within 10 kmdistance=100 - Find resorts within 100 kmdistance=500 - Find resorts within 500 kmNote: Results are limited to a maximum of 50 resorts, ordered by distance (closest first).
sourceFields (string, optional)Return only specific fields from each resort's _source object using dot notation (comma-separated).
Purpose: Optimize response payload size by requesting only needed fields
Examples:
sourceFields=name,locationsourceFields=name,resort_open,lifts,slopessourceFields=name,location.lat,location.lon,conditions.combined.top.snow.depth_terrain{
"took": 1,
"timed_out": false,
"hits": {
"total": 8,
"max_score": null,
"hits": [
{
"_index": "fnugg_resort",
"_type": "resort",
"_id": "89",
"_version": 1,
"found": true,
"_source": {
"id": 89,
"name": "Oslo Vinterpark",
"description": "Oslo Vinterpark ligger bare 30 minutter fra Oslo sentrum...",
"location": {
"lat": 59.9700,
"lon": 10.6700
},
"resort_open": true,
"lifts": {
"total": 11,
"open": 9
},
"slopes": {
"total": 18,
"open": 16
},
"conditions": {
"combined": {
"top": {
"snow": {
"depth": 85
}
}
}
}
// ... more fields (see /get/resort/{id} documentation)
},
"sort": [12500.0]
},
{
"_index": "fnugg_resort",
"_type": "resort",
"_id": "73",
"_version": 1,
"found": true,
"_source": {
"id": 73,
"name": "Norefjell",
"location": {
"lat": 60.1800,
"lon": 9.5500
},
"resort_open": true
// ... more fields
},
"sort": [45300.0]
}
// ... more results
]
}
}
{
"error": "Missing required parameters: lat and lon"
}
took (integer): Request processing time in milliseconds (always 1 for compatibility)timed_out (boolean): Whether request timed out (always false)hits (object): Results container
total (integer): Number of resorts found within the radiusmax_score (null): Always null (not used for geo queries)hits (array): Array of resort result objectsEach resort in hits.hits contains:
_index (string): Index name, always "fnugg_resort"_type (string): Type name, always "resort"_id (string): Resort's site_id as string_version (integer): Document version, always 1found (boolean): Whether resort was found, always true_source (object): Complete resort data (same structure as /get/resort/{id})sort (array): Array with single element: distance in meters (float)GET /geodata/getnearest?lat=59.9139&lon=10.7522&distance=50
Finds all resorts within 50 km of Oslo city center.
GET /geodata/getnearest?lat=60.4720&lon=5.3340&distance=10
Finds resorts within 10 km of Bergen.
GET /geodata/getnearest?lat=61.3150&lon=12.2680&distance=100&sourceFields=name,location,resort_open,lifts.open,slopes.open
Finds resorts within 100 km, returning only name, location, status, and facility counts.
GET /geodata/getnearest?lat=59.9139&lon=10.7522&distance=200
Finds resorts within 200 km (large search radius for broader discovery).
lat and lon parameters are required; omitting either returns an errorsort array in each result contains the calculated distance in meters (not kilometers)distance parameter is omitted/get/resort/{id} (see that documentation for complete field descriptions)sourceFields to reduce payload size, especially when displaying many resorts on a mapresortTypes, regions) for each resort/geodata/getdistance endpoint insteadhits.total: 0 with empty hits.hits array