There is the Google Places Autocomplete API,
https://developers.google.com/places/documentation/autocomplete
and a library for Maps Version 3 at https://developers.google.com/maps/documentation/javascript/places#places_autocomplete
but I don't know how well it will cope with different names for the same city — although, having tried it, it does present Munich, Germany for munchen — see how well your use case performs.