NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum


I try to retrive the polygon-data of the boundaries of cities in germany. I need to process these data in php.

My first approach was to send a request to Nominatim and retrieve JSON data in return. See this example:

But I red the usage policy of the Nominatim project and it seems to me that it is adverse to send automatic requests (out of my php script) to Nominatim. Afterwards I read about PBF Files and XML-Files and how to access the data, but it all seems to be much more complicated and I am not even sure if this would give my finally the information I need.

Is there any easy access to this data - or does anybody know which approach would be the best to retrieve the data I am looking for? Thank you in advance!

asked 06 Mar '19, 14:59

frlln's gravatar image

accept rate: 0%

Have a look at In the left-pane navigation you can use right-mouse-click to select multiple levels. Countries are marked (2), states (4), cities can (6) or (7) depending on type (Bavaria markt, kreisfrei etc). is also powerful. Zoom to the desired area and search for 'relation"admin_level"="6";' example From inside a script you can query the API directly

permanent link

answered 06 Mar '19, 15:14

mtmail's gravatar image

accept rate: 27%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Mar '19, 14:59

question was seen: 18,058 times

last updated: 06 Mar '19, 15:14

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum