Banned from overpass-api.de
The public server at overpass-api.de bans IP addresses that keep querying after a 429 or 406, or that send many bad requests. During a ban, connections from that address are refused or time out.
Signs of a ban
Connection refusedor a connect timeout from both addresses of overpass-api.de, while other websites answer.- The status page does not load from that network either.
- The same query works from another network, for example a phone hotspot.
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='overpass-api.de', port=443): Max retries exceeded with url: /api/interpreter (Caused by NewConnectionError(… [Errno 111] Connection refused'))
A 406 Not Acceptable is a different block: the server refuses your user agent or your referrer, not your address. The 406 guide covers it.
What gets an address banned
The operators of overpass-api.de describe the rules in the OpenStreetMap forum. Since April 2026:
- Ignoring 429. “If you get a 429, wait at least 30s before sending the next query.” Clients that get 429 or 406 again and again are banned sooner, and so are apps with a high share of 429 answers.
- Bad requests at a high rate. A script that sends a broken query in a loop gets 400 after 400, and then a ban.
- Several scripts at once. The rule is one user, one script. Spreading queries over threads, servers or cloud workers to get more slots counts against you.
- Apps on platforms for AI-generated apps. In August 2026 the operators wrote that many of these platforms are banned, for example lovable.app and netlify.app.
An app or website counts as one user: the policy on the OpenStreetMap wiki adds up the requests of all its visitors. It counts up to about 10,000 queries and 1 GB a day, with at most 10 minutes of run time in total, as fine for one-off use. For anything that runs regularly, divide by 100: about 100 queries and 10 MB a day.
How long a ban lasts
Bans of IP addresses are automatic and “will disappear after a while”, in the words of an operator. There is no published duration and no form to lift one. Requests sent during the ban do not help, so stop the script and every service on that address that calls Overpass. Bans of a user agent or referrer are set by hand; for those, ask in the help section of the forum.
When the server is full
When every query slot of the server is busy, overpass-api.de answers 502 with this text (seen on 4 November 2026):
This Overpass API server is currently at capacity. All query workers are busy and the request queue is full.
The text asks for exponential backoff and says the server is meant for browser-based and human-operated tools. For a script, the answer is fewer queries. A 504 Gateway Timeout and the runtime errors are explained in the errors guide.
Retries that keep you within the rules
Retry only answers that mean “later”: 429, 502, 503 and 504. Do not retry 400 (the query is wrong) or 406 (you are blocked). Start at 30 seconds and double the wait:
import time
import requests
URL = "https://overpass-api.de/api/interpreter"
HEADERS = {"User-Agent": "shop-map/1.2 (+https://example.com/contact)"}
def overpass(query, tries=4):
wait = 30
for attempt in range(tries):
r = requests.post(URL, data={"data": query}, headers=HEADERS, timeout=200)
if r.status_code == 200:
return r.json()
if r.status_code in (429, 502, 503, 504) and attempt < tries - 1:
time.sleep(wait)
wait *= 2
continue
r.raise_for_status()
Call it from one place, one query after the other, and keep the answers: the same query an hour later returns almost the same data.
What the libraries do on their own
- OSMnx reads the status page before each query and waits for a free slot. After a 429 or 504 it waits 55 seconds and tries again, with no limit on the number of tries.
- osmdata (R) checks the status page too, then sends the query with up to 10 tries. The waits between them come from httr2 and start at one or two seconds, well under 30.
- overpy retries only when you set
max_retry_count, and then retries every error the same way, 400 and 406 included.retry_timeoutis the pause, 1 second by default; set it to 30 or more. - Retry libraries such as tenacity, urllib3
Retryand axios-retry pause for a second or less by default. Set the first pause to 30 seconds.
Another server
If your application needs Overpass every day, the public server cannot carry it: its policy allows about 100 queries a day for anything that runs regularly, and sends commercial users to their own or a paid server. The alternatives guide compares the options.
On overpass.ch, limits are per API key, published on the pricing page, and returned in the X-RateLimit-* headers. At a limit you get a 429 with a Retry-After header that says how many seconds to wait. Only the URL changes:
https://overpass-api.de/api/interpreter
→ https://api.overpass.ch/v1/YOUR_API_KEY/interpreter