Search code examples
getweb-crawlerpostmanopenstreetmap

Open Street Map: how retrieve amenity in Postman?


Since Google Places API became a hell I'm trying to move to Open Street Map. I'm learning how to call amenity with Postman.

For example using this URL I try to retrieve all the toilets in Auckland:

http://nominatim.openstreetmap.org/search?format=json&q=toilet Auckland

But as result I have just 10 pleace_id and I'm using search.

I think I'm doing things wrong.

  1. How can I retrieve all toilets in Auckland?
  2. Is there any example about how to use amenity=toilet, country=NZ, city=Auckland instead of the generic search?

My goal is to improve the precision of my requests.


Solution

  • I have a good and a bad news.

    Good news: I finally found an example about how to query Overpass API and I could retrieve what I think are most of the cinemas in France:

    http://overpass-api.de/api/interpreter?data=area[name=France];node(area)[amenity=cinema];out;
    

    enter image description here

    (I still don't get how to insert way and rel into the call)

    Bad News: apparently there are no cinemas in Italy:

    enter image description here

    Tanks a million to @mmd which helped me dig deeper into Overpass API and REST calls.

    EDIT: I found how to add node, way and rel:

    http://overpass-api.de/api/interpreter?data=area[name="Heidelberg"]->.a;(node(area.a)[amenity=hospital];way(area.a)[amenity=hospital];rel(area.a)[amenity=hospital];);out;