Reverse Geocoding
The reverse geocoding API converts geo-coordinates (like 48.1954, 16.3668) to a postal address.
Endpoints
The endpoints are available via GET
and POST
request and return the postal address and the related geo-coordinates.
GET/v1/geocode/reverse
curl -X GET https://api.apistax.io/v1/geocode/reverse?latitude=48.1954&longitude=16.36688 \
-H 'Authorization: Bearer API_KEY_HERE'
POST/v1/geocode/reverse
curl -X POST https://api.apistax.io/v1/geocode/reverse \
-H 'Authorization: Bearer API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{ "latitude": 48.1954, "longitude": 16.36688 }'
Response
The endpoints return the result in JSON format with HTTP status 200. If no matching postal address can be found, an empty response with HTTP status 204 is returned.
{
"position": {
"latitude": 48.1954,
"longitude": 16.36688
},
"address": {
"houseNumber": "32",
"street": "Wiedner Hauptstraße",
"city": "Vienna",
"postalCode": "1040",
"country": "Austria",
"countryCode": "AT"
}
}
Parameters
latitude: Double
longitude: Double
language: String = en
The language used for result localization based on ISO 639-1.
For example: en
or fr
Possible errors
Identifier | Description |
---|---|
message.latitudeMustNotBeNull |
Parameter latitude is required and must not be null. |
message.longitudeMustNotBeNull |
Parameter longitude is required and must not be null. |
message.latitudeMustBeValid |
Parameter latitude must be a valid number. |
message.longitudeMustBeValid |
Parameter longtiude must be a valid number. |
message.languageMustBeValid |
Parameter language must be valid and covered by ISO 639. |
It should be noted that there are a number of common error messages, which can be found in the "Possible errors" section of the general documentation.