Since yesterday I get error 406 when I access https://overpass-api.de/api/interpreter with Python.
Does anybody know the reason?
Regards
Ragnar
My code
import requests
overpass_url = “https://overpass-api.de/api/interpreter”
coord = “around:1000,53.55,10.00” # Koordinaten
overpass_query = f’‘’[out:json][timeout:180];
(
nwr"memorial"=“stolperstein”;
);
out body;‘’’
headers = {
‘Accept’: ‘application/json’, # Explizit JSON fordern
‘Content-Type’: ‘text/plain’ # Query ist Plaintext
}
response = requests.post(overpass_url, data={‘data’: overpass_query}, headers=headers)
print(f"Status: {response.status_code}“)
print(f"Content-Type: {response.headers.get(‘content-type’)}”)
if response.status_code == 200:
data = response.json()
print(f"{len(data[‘elements’])} Stolpersteine gefunden!")
else:
print(“Fehler”, response.text)
Could be related to the new rules implemented yesterday:
Given that there is no improvement of the situation in sight in terms of users being a bit more mindful with their use of the Overpass API, I’ve started to put heavy banning rules in place on the servers. Large scale users will be cut off until the server is responsive again.
This may do some collateral damage. If you want to use the Overpass API, make sure to follow the same rules as for all the other free services around OSM:
When called from the browser, a HTTP referrer must be included in…
2 Likes
Thanks - setting the user-agent in the header solved the problem.
I’ve been having this same problem and tried the same thing, what user-agent did you use?
2 Likes
I use headers like
headers = {
'Accept': 'application/json',
'Content-Type': 'text/plain',
'User-Agent': 'PAWS (mydomain.de)',
'Referer': 'http://www.mydomain.de/'
}
ikonor
(Ikonor)
June 14, 2026, 12:54pm
6
achavi on overpass-api.de is getting 406 Not Acceptable HTTP error responses since around 3 days (see #64 achavi stopped working ).
An example request copied from Firefox:
curl 'https://overpass-api.de/api/interpreter?data=[adiff:%222026-06-13T15:20:12Z%22,%222026-06-13T15:20:14Z%22];(node(bbox)(changed);way(bbox)(changed););out%20meta%20geom(bbox);&bbox=9.4848314,47.6649556,9.4848314,47.6649556' \
--globoff \
-H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0' \
-H 'Accept: */*' \
-H 'Accept-Language: de,en-US;q=0.9,en;q=0.8' \
-H 'Accept-Encoding: gzip, deflate, br, zstd' \
-H 'DNT: 1' \
-H 'Sec-GPC: 1' \
-H 'Connection: keep-alive' \
-H 'Referer: https://overpass-api.de/achavi/?changeset=184060676' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin'
Is there anything wrong or missing?
edit:
also commented at Overpass-API#791 Overpass-Api Not working. Error: 406 Not Acceptable
1 Like
Pass the Overpass request in the body of the POST request, not the URL. You can see an example in wiki Overpass API - OpenStreetMap Wiki or in the browser console when making a request on https://overpass-turbo.eu
2 Likes
ikonor
(Ikonor)
June 14, 2026, 5:24pm
8
Thanks, apparently same-origin GET requests don’t send an Origin header, which seems to be the issue here, I added another comment at #791 .
1 Like
ikonor
(Ikonor)
June 15, 2026, 12:40pm
9
Achavi should be working again. Overpass had changed request checking, which is now reverted.
2 Likes
Hi, Norbert,
My joy was short-lived: the same problem again!
When I tried to check my last changeset, once again only your own “replacement page” achavi - Augmented OSM Change Viewer [attic] worked. The Overpass page (achavi - Augmented OSM Change Viewer [attic] ) loads (too) quickly and then only shows the CS…
Should I open a new issue on GitHub instead? Or is there a way I can contribute in some way, somewhere else?
Best regards from Herborn
Andreas
This is an odd graph.
Am I reading correctly that the number of completed Overpass queries has declined substantially over the last year?
ikonor
(Ikonor)
June 16, 2026, 7:16pm
13
I reopened the issue (achavi#64) .
For me, achavi works sometimes, then I get the usual “504 Gateway Timeout” error (“The server is probably too busy to handle your request.”), but also still these blocking “406 Not Acceptable” errors.
ikonor
(Ikonor)
June 16, 2026, 7:18pm
14
Gernerally, I would recommend to use OSMCha instead.
Yes, but one must be careful with conclusions.
Just imagine that there are more heavy and long queries. They start to take up time, and the number of completed queries decreases. After this, some users stop using the Overpass API, but the long queries remain and continue to consume CPU…
Let me remind that there is Achavi based on OSMCha data
Thanks for that. I’ve forked your version and modified it so it can correctly identify the OSMCha augmented diffs , which means you can add a shortcut in OSM Smart Menu or OSM Tools Quick Access in the form of https://frakgart.github.io/achavi/?url=https%3A%2F%2Fadiffs.osmcha.org%2Fchangesets%2F{osm_changeset_id}.adiff
This is much faster than an Overpass based version. For example:
compared with private.coffee:
achavi - Augmented OSM Change Viewer [attic]
Indeed. One must also be careful with hypotheses that are unsupported by data.
Ok, I tried to copy Achavi and just replaced the overpass backend (as per @TrickyFoxy s example ) as the public instance seems to be quite overloaded.
Please check if https://achavi.hopapi.net is working for you, e.g. achavi - Augmented OSM Change Viewer [attic]
The overpass backend instance used is currently only accessible via that achavi copy and computes areas once a day while otherwise it is run on minutely diffs (with global planet data).
And the main goal is not to use the overloaded public overpass instance.
2 Likes