Identification of locatons using coordiates

web project (php, mysql), 200k + sites

We need to clearly identify the location of the user on the site and identify city to him. For a clearer identification of locations, we want to use city boundaries. Now we just use GeoIP lite from MaxMind. We do not want to use the GeoPy request because there are problems with the fields being passed:

  1. Translation of cities, and the fields in which they are transferred are very different usually
  2. Searching for OSM id does not make sense, because we will get accurate coordinates from user, even if not accurate, GeoPy will still post it for us.

Therefore, we will assign the location on the server side.

And here is the question.
Where can we get a location polygon database or maybe somewhere we can api request to OpenStreamMap to get coordinates for your database (MySQL),

On the example Kyiv


you can use the website to search for the administrative boundaries (if available)(tag boundary = administrative). There is the possibility of different output formats (see the OSM Wiki

The user wambacher checks these borders daily worldwide and also offers an export on his page ( , help see


Georg V. (OSM=user_5359)