NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Here I asked for a near by search for restaurants around a node or town:

Now it would be helpful to perform the same search for an concrete address.

E. g. let's say all restaurants around a disctance of 1000 Meters "Platz der Republik 1, Berlin" (maybe also with zip code)

Would it be possible to build an address-replaceable query for that task?

I'm new to openstreetmap and it's hard for me to understand the overpass API

This wizard input text from the wiki gave me the hint: amenity=restaurant around "1600 Pennsylvania Ave NW, Washington"

So I got now this, successfully tested with two different addresses that I know:

This has been generated by the overpass-turbo wizard.
The original search was:
“amenity=restaurant around "Bindlacher Straße 10 95448 Bayreuth"”
// adjust the search radius (in meters) here
// gather results
  // query part for: “amenity=restaurant”
  node["amenity"="restaurant"](around:{{radius}},{{geocodeCoords:Platz der Republik 1 10557 Berlin}});
  way["amenity"="restaurant"](around:{{radius}},{{geocodeCoords:Platz der Republik 1 10557 Berlin}});
  relation["amenity"="restaurant"](around:{{radius}},{{geocodeCoords:Platz der Republik 1 10557 Berlin}});
// print results
out body;
out skel qt;

But may you review that, please and tell me if it's correct for what I need? It seems to, but I'm not 100 % sure about that.

asked 11 Jul '21, 22:29

alpham8's gravatar image

accept rate: 0%

edited 12 Jul '21, 23:58

That looks good to me! If you want, you can shorten it using nwr instead of node, way and relation:

(nwr["amenity"="restaurant"](around:100,{{geocodeCoords:Platz der Republik 1, 10557 Berlin}});) -> .results;
.results out center;

On, the geocoding part is briefly outlined: geocodeCoords gives the coordinates of the centre of the first result which the search of the name resulted in. That might cause some problems if the name of the place is not well specified.

permanent link

answered 07 Sep '21, 13:15

G%C3%A5seborg's gravatar image

accept rate: 50%

If you want this information & know where you are but not the name of any localities, I've found this to be useful. {{center}} returns the co-ordinates of the centre of the OPT screen.

out center;
permanent link

answered 07 Sep '21, 20:43

DaveF's gravatar image

accept rate: 16%

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: 11 Jul '21, 22:29

question was seen: 2,948 times

last updated: 07 Sep '21, 20:43

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum