I'm trying to get WKT or GeoJson polygons of cities and countries from Nominatim (for example, Paris and France). I send a GET request but it returns me several results named "Paris" or "France". How may I narrow results only to a capital and a country. Here's my request url:


And I get an array of 10 objects where only one is the capital:

class: "boundary", type: "administrative".

The rest are:

class: "place", type: "isolated_dwelling"
class: "place", type: "hamlet",
class: "place", type: "neighbourhood"
and so on...

How to select only the desired city and only the desired country ignoring rest of results with the same name?


1 Answer 1


As you seem to try to getting bulk data, you are encouraged to append the email=... param to avoid beein blocked.
You can use various place=* tags to prefilter your results or even limit your result.

As Nominatim isn't build as a data provider, you might use to get the boundary polygons here:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.