OverpassAPI: url interpreter and geocodeArea
Hi,
I try to get all restaurants by cities in a region. In Overpass Turbo, I have : (http://overpass-turbo.eu/s/S9W)
[out:json][timeout:300];
{{geocodeArea:"Le Puy-en-Velay Auvergne-Rhône-Alpes France"}}->.searchArea;
(
node["amenity"="restaurant"](area.searchArea);
way["amenity"="restaurant"](area.searchArea);
relation["amenity"="restaurant"](area.searchArea);
);
out center;
This is working fine.
But I have hundred of cities in my region (all recovered from Wikidata) and I want to get restaurants for all cities.
I don't want to do it manually in overpass-turbo.eu tool, so I tried to export my "query" as an url. This is the generated url:
> http://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%5Btimeout%3A300%5D%3B%0Aarea%283600120067%29-%3E.searchArea%3B%0A%28%0A%20%20node%5B%22amenity%22%3D%22restaurant%22%5D%28area.searchArea%29%3B%0A%20%20way%5B%22amenity%22%3D%22restaurant%22%5D%28area.searchArea%29%3B%0A%20%20relation%5B%22amenity%22%3D%22restaurant%22%5D%28area.searchArea%29%3B%0A%29%3B%0Aout%20center%3B
As you can see in the generated url, **the geocodeArea is converted to an area with ID 3600120067.**
Is there a way to keep generated url with the geocodeArea as string, so I can write a script which will generate url for all cities ?
And, if not, where can I get this area ID ?
Thanks.