I need to query OSM through OverpassTurbo to get all the bike cafés throughout the world.
Based on the wiki, I tried the following, but both failed:
[out:json][timeout:25];
(
node["shop"="bicycle"];node["amenity"="cafe"]({{bbox}});
);
out body;
>;
out skel qt;
=> Query Error. An error occured during the execution of the overpass query! This is what overpass API returned: runtime error: Query timed out in “query” at line 3 after 26 seconds.
[out:json][timeout:25];
(node["shop"="bicycle"];node["amenity"="cafe"];);
out body;
>;
out skel qt;
=> Query Error. An error occured during the execution of the overpass query! This is what overpass API returned: runtime error: Query timed out in “query” at line 2 after 26 seconds.
Increasing the “25” in the first line might help. Especially when you are querying a large area. Or query a smaller area.
The 25 means that you think it will take at most 25 seconds to run the query. After 26 seconds the server tells you it takes longer and stops.
Thanks, but it still doesn’t work: I zoomed in on one street where I know there’s one with the right tags (“Look Mum, No Hands!” on Old Street in London), but the query still times out:
[out:json][timeout:25];
(
node["shop"="bicycle"];node["amenity"="cafe"]({{bbox}});
way["shop"="bicycle"];way["amenity"="cafe"]({{bbox}});
);
out body;
>;
out skel qt;
There’s probably no more than a hundred such places around the world: Is there an other way to query OSM?