This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Nominatim amenity bar search request results are most pubs

0

I wanted to search for bars in a viewbox, but most of them are pubs. This is my search request: https://nominatim.openstreetmap.org/search?q=[bar]&format=json&bounded=true&viewbox=6.408,51.197,6.474,51.231&limit=50

asked 06 Feb '20, 08:35

Arthurle's gravatar image

Arthurle
36335
accept rate: 0%


2 Answers:

0

The syntax is https://nominatim.openstreetmap.org/search?q=[amenity=bar]&format=json&bounded=true&viewbox=6.408,51.197,6.474,51.231&limit=50 and it works only for a selection of tags, see https://wiki.openstreetmap.org/wiki/Nominatim/Special_Phrases

I agree with SomeoneElse though, Overpass API is the best tool for bounded/nearby POI searches.

answered 06 Feb '20, 12:03

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

0

If you want to search for something that is explicitly tagged as amenity=bar, I'd suggest using Overpass for that. There's plenty of information on the wiki, but a quick way to find what it will return for a particular area is to click through to it from taginfo. In this case the query looks similar to this, depending on your search area.

answered 06 Feb '20, 11:40

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Source code available on GitHub .