A simple Flask app which returns the country/state/city/suburb name for given coordinates, using OpenStreetMap data.
/lat/lon
: Get local names/lang/lat/lon
: Get names for specified language. See https://wiki.openstreetmap.org/wiki/Names#Localization
/fr/50.843388/4.349016
{
"city": "Bruxelles",
"country": "Belgique",
"country_code": "BE",
"country_flag": "🇧🇪",
"state": "Bruxelles-Capitale",
"suburb": "Quartier Midi-Lemonnier"
}
- If no name was found (most often suburb), empty string is returned.
- Country code is ISO3166-1.
- Data from OpenStreetMap
- Overpass instance used : Private.coffee