Reverse Geocoding
Overview
The Reverse Geocoding API returns the closest location(s) to a given latitude and longitude. Useful for converting device coordinates into a named location.
Endpoint
GET /geocoding/reverse?lat={latitude}&lon={longitude}Parameters
Parameter | Required | Default | Description |
|---|---|---|---|
| Yes | — | Latitude (-90 to 90) |
| Yes | — | Longitude (-180 to 180) |
| No |
| Language code for localized results (e.g. |
| No |
| Number of nearest locations to return (max 50) |
Example Request
GET /geocoding/reverse?lat=47.37&lon=8.55
Example Response
{
"results": [
{
"id": "3704415940",
"name": "Zürich",
"lat": 47.36667,
"lon": 8.55,
"distance_km": 0.4,
"country_code": "CH",
"country_name": "Switzerland",
"admin1_name": "Kanton Zürich",
"timezone": "Europe/Zurich",
"population": 341730,
"feature_code": "PPLA"
}
],
"count": 1
}Response Fields
All standard Geocoding response fields are included, plus:
Field | Type | Description |
|---|---|---|
| float | Distance from the query coordinate to the location, in kilometers |
Errors
Status | Description |
|---|---|
| Missing |
| Geocoding data not yet loaded |