Guides
The guides cover the Overpass API, map tiles, geocoding and elevation data. For ready-to-run queries, see the query examples.
Errors and limits
Errors and limits of the public Overpass servers, their causes and fixes, and the alternatives.
overpass-api.de: “429 Too Many Requests”
Why the public server rejects your queries, how its slots work, and how to stay within its limits.
overpass-api.de: “406 Not Acceptable”
Why the public server refuses scripts with a default user agent, and how to set your own in Python, R, curl and JavaScript.
Banned from overpass-api.de
Connection refused after too many 429s: what gets an address banned, how long it lasts, and retries within the rules.
Overpass API errors explained
429, 504, “runtime error: Query timed out”, “out of memory”, empty results: causes and fixes, with retry code.
Overpass API alternatives
Public instances, self-hosting and six hosted services compared, with prices and history data, and when you need which.
Overpass speed: overpass-rust and Overpass API compared
Response times for overpass-rust and Overpass API 0.7.62 on the same hardware, and what makes the Rust engine faster.
Tools and libraries
Point your tools at another Overpass server, step by step.
Overpass Turbo: use another Overpass server
Where the server setting is, the URL format, and what to check when Turbo shows an error.
QuickOSM (QGIS): change the Overpass server
Add a server in the QuickOSM settings, or in custom_config.json on older versions, and use it in Processing.
OSMnx: custom Overpass server and node elevations
Set overpass_url, avoid a 60-second pause before every query, and add node elevations without a Google key.
osmdata (R): use another Overpass server
set_overpass_url() in the R package osmdata, with the key kept out of your scripts.
Overpass API in Claude, ChatGPT and Cursor (MCP)
Connect an AI assistant to the Overpass API, geocoding and elevation with one URL, and what it can then answer.
Overpass API in Python
requests, overpy and overpass: query any Overpass server from Python, with retries and GeoJSON.
History and changes
The map at a past date, what changed in an area between two dates, every version of one object, and the error that diffs give with JSON output.
Overpass history queries: [date:], [diff:] and [adiff:]
Query OpenStreetMap as it was on a past date, or the changes between two dates, back to September 2012.
OpenStreetMap changes in an area between two dates
Which restaurants opened, closed or changed in a part of Zurich from 2023 to 2025, with one adiff query and a short Python script.
Version history of an OpenStreetMap object
Every version of a node, way or relation since 2012, with date, user and changed tags, from timeline and retro.
Overpass: “does not support the diff or adiff mode”
Why [diff:] and [adiff:] fail with [out:json] or CSV, and two ways to get the changes anyway.
Elevation
Heights and depths for points, routes and GPX tracks, and how the elevation APIs compare.
A Google Elevation API alternative
The same request and response format as Google, prices compared, and results you may store and show on any map.
Alternatives to Open-Elevation and Open Topo Data
What the free public elevation APIs allow, what self-hosting takes, and how to switch.
Add elevation to a GPX file
Distance, ascent and descent of a track with one curl command, and a Python script that writes the heights into the file.
Elevation for your website
Code for a tour profile, the summits seen from your hotel, the sun side of a property and places above the snow line, one page for each.
An elevation profile for your tour pages
A map of the route with its profile below: distance, metres up and down, highest point and walking time. The heights are looked up once per tour.
Draw the summits seen from your hotel
The skyline seen from a terrace, a restaurant or a mountain station, with the name and height of each summit, as a picture for your website or for print.
Height, slope and sun side for property listings
For each flat or house: the metres above sea level, the slope and the side the ground faces, from five lookups when you save the listing.
Which of your places get snow
Heights for your chalets, stops or customers in one request, compared with the snow line of the forecast, and a map that turns white above it.
Maps for your website
Code to copy for your shop on a map, a store locator, a delivery area and property listings, filled with your own places.
Add a map with your location to your website
A marker with your address, opening hours and a directions link, for the contact page, in one block of HTML and without a Google account.
A store locator map for your website
All your shops from a spreadsheet: a list beside the map, “near me” sorted by distance, and markers that group when you zoom out.
Show your delivery area on a map
Zones around your shop with their delivery fee, or an area you draw, and a check for any place a customer clicks.
Property listings on a map
Price labels on the map, a popup with a link for each flat or house, and filters for rent, buy and rooms.
Map libraries
Our vector map tiles in MapLibre, OpenLayers, Leaflet, React and QGIS, and moving from Mapbox GL JS to MapLibre.
MapLibre GL JS tutorial: your first map
A map with a style URL, markers and popups, your GeoJSON as a layer, other styles and languages, and controls. With script tags or Vite.
Vector map tiles in OpenLayers
A vector map with a MapLibre style in OpenLayers: ol-mapbox-style with script tags or Vite, markers and GeoJSON on top, and MapLibre as a layer for every style.
Vector map tiles in Leaflet
Vector maps in Leaflet through maplibre-gl-leaflet: script tags or a bundler, markers and GeoJSON on top, other styles, and protomaps-leaflet without WebGL.
MapLibre vs Leaflet vs OpenLayers
How each draws, vector tiles, 3D, projections, formats and download size, the same map in all three, and when to use which.
react-map-gl with MapLibre
A map component with react-map-gl 8 and MapLibre 6: style, markers, popups, 3D terrain, the key in an environment variable, Next.js.
Vector tiles and terrain in QGIS
Add a vector tile layer with a style URL, which styles QGIS can draw, terrain heights as a raster, and contour lines.
From Mapbox GL JS to MapLibre GL JS
The code changes, what does not have a counterpart, plugins, styles and tiles, and the setWorkerUrl call that MapLibre 6 needs with a bundler.
Map tiles
Errors of map tile services and map libraries, and what map tiles cost.
Map tile API errors explained
401, 403, 429, “Access blocked” on OpenStreetMap tiles, blank and grey maps: causes and fixes for MapLibre, Leaflet and Google Maps.
Fixing “Access blocked” on OpenStreetMap tiles
Why tile.openstreetmap.org blocks tiles, which settings remove the Referer (Helmet, Django, nginx), and the fix for Leaflet, OpenLayers and MapLibre.
MapLibre “Unable to parse the tile”: causes and fixes
Gzip tiles without Content-Encoding, double compression and HTML pages: how to tell them apart, with nginx, Apache, Caddy and S3 fixes.
Fixing “This page can't load Google Maps correctly”
What RefererNotAllowedMapError, ApiNotActivatedMapError and BillingNotEnabledMapError mean, the fix for each, and what a map costs without Google.
Map tile API prices compared
Mapbox, MapTiler, Stadia Maps, OpenFreeMap and VersaTiles at 100,000, 2 million and 10 million tiles a month, with the sources.
Maps step by step
3D terrain, hillshading, contour lines, trails and sea depths in MapLibre.
3D terrain in MapLibre GL JS
Terrain from one style parameter or in code, exaggeration, sky and camera, heights under the mouse, and what 3D costs in tiles.
Hillshading in MapLibre GL JS
A hillshade layer under the roads, its colours for light and dark maps, and the five shading methods of MapLibre.
Contour lines in MapLibre GL JS
Contour lines as vector tiles: line and label layers, major and minor lines, labels in feet, and computing them in the browser instead.
A hiking map in MapLibre GL JS
Trails coloured by SAC grade, a popup with the trail name, huts and stops, 3D terrain, and your own route on top.
A nautical map with depths and sea marks
The sea coloured by depth, depth contours, buoys and lights in their colours, in one style or added to your own.
Geocoding
Errors and limits of Nominatim, Google and other geocoding services, and what to do about them.
Geocoding API errors explained
“Access blocked”, 403, 429 and 509 on Nominatim, OVER_QUERY_LIMIT and REQUEST_DENIED on Google, geopy errors and empty results.
Nominatim: “Access blocked”, 403 and 429
Why nominatim.openstreetmap.org blocks scripts and apps, what its usage policy allows, and requests it accepts.
geopy: GeocoderInsufficientPrivileges and other errors
What each geopy exception means, the user_agent check of the Nominatim geocoder, and the settings for RateLimiter.
Google Geocoding: REQUEST_DENIED and OVER_QUERY_LIMIT
Every status of the Google Geocoding API with its cause and fix, the error_message texts, and what geocoding costs without Google.
Follow the guides with your own key
One key for the full-planet Overpass API, map tiles, geocoding and elevation. The free plan is enough for every guide except the history guides, which need Pro or Business.