perliedman / query-overpass

Make queries to OpenStreetMap's overpass API and output as GeoJSON
ISC License
156 stars 33 forks source link

Add option to set referrer/User Agent to possibly avoid 429 errors #38

Open carstenhag opened 5 years ago

carstenhag commented 5 years ago

As explained/documented at https://help.openstreetmap.org/questions/55828/overpass-returns-429-every-time-for-some-queries-but-not-for-others, it would be good for Overpass API consumers to include a referrer or an User Agent in order to not get blocked.

Also, with a referrer or some information about the client, the server maintainer could contact the client in order to solve the issue perhaps.

In the future, the Overpass API server could tell us why and when we should try again: https://github.com/drolbr/Overpass-API/issues/351

carstenhag commented 5 years ago

As far as I understand, we should change/add properties to reqOptions.

https://github.com/perliedman/query-overpass/blob/master/index.js#L27