overpass-api.de: “429 Too Many Requests”
The public server at overpass-api.de gives each IP address a few query slots and answers HTTP 429 Too Many Requests when they are all taken.
The rate limit of overpass-api.de
overpass-api.de is run by volunteers of the FOSSGIS association and is free for everyone. To share it fairly, it limits every client by IP address:
- You get a few slots. Each running query occupies one.
- After a query finishes, its slot stays blocked for a cool-down that grows with the run time of the query.
- A query that arrives while all your slots are blocked is rejected with HTTP 429.
The documentation of overpass-api.de gives a rule of thumb: you don't disturb other users with fewer than about 10,000 queries and 1 GB of downloads per day. Regular, heavy or commercial use is not what the public instance is for.
Check your slots
The status endpoint shows your rate limit and when your next slot frees up:
curl https://overpass-api.de/api/status
The answer lists your client ID, the Rate limit (your number of slots), how many slots are available now, and, for blocked slots, the time at which each becomes free again. Wait until then before sending the next query.
Common causes
- Parallel requests. A script that sends queries from several threads, or a loop over hundreds of places, uses up all slots in a second.
- Long queries. A query that runs for a minute blocks its slot for a long time afterwards.
- Retrying immediately. Retries without a pause get more 429s and keep the slots blocked.
- A shared IP address. Office networks, universities, cloud functions and CI runners share one public IP. Queries from your colleagues count against your slots.
- Overpass Turbo and a script at the same time, from the same network.
Fixes
- Send one query at a time, without thread pools or parallel downloads.
- Wait for a free slot before you retry. Read
/api/status, or back off: wait 10 seconds, then 20, then 40. Our errors guide has ready-made retry code. - Make queries cheaper: search a bounding box or area instead of the whole planet, filter by tags first, and use
out center;orout tags;when you don't need full geometry. - Combine queries. One query with a union is cheaper than five separate ones, and a for loop can compute statistics for many groups in one request.
- Store answers and reuse them; map data rarely changes within an hour.
- For whole countries, download a regional extract (for example from Geofabrik) and process it locally.
Other servers
If your application depends on Overpass, the public server cannot give it guaranteed capacity, because everyone shares it. Your options are another public instance, your own server, or a hosted one. Our alternatives guide compares them.
On overpass.ch, limits are per API key, so other people on your IP address don't count against them. They are stated on the pricing page and returned in the X-RateLimit-* headers of every response. When you do hit a limit, you get a Retry-After header that says how long to wait. To switch, you only change the server URL.
https://overpass-api.de/api/interpreter
→ https://api.overpass.ch/v1/YOUR_API_KEY/interpreter