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.
amenity=toilet
, country=NZ
, city=Auckland
instead of the generic search
?My goal is to improve the precision of my requests.
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;
(I still don't get how to insert way
and rel
into the call)
Bad News: apparently there are no cinemas in Italy:
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;