Documentation

overpass.ch runs the standard Overpass API, so queries in Overpass QL run unchanged. Only the URL differs, and it carries your API key.

Quick start

  1. Create a free account and confirm your e-mail address.
  2. Create an API key on the API keys page.
  3. Send a query:
curl https://api.overpass.ch/v1/YOUR_API_KEY/interpreter \
  --data-urlencode 'data=[out:json][timeout:25];node["amenity"="drinking_water"](47.36,8.53,47.38,8.55);out;'

The response is a normal Overpass result. Its osm3s.timestamp_osm_base field tells you how fresh the data is.

The query examples explain 99 common queries in Overpass QL line by line, with live results.

Endpoints

Your personal base URL is https://api.overpass.ch/v1/<API_KEY>/.

MethodPathDescription
GET, POST/v1/<KEY>/interpreterRun a query. GET with ?data=; POST with a form-encoded data= field or the raw query as body. Overpass QL and XML are both accepted.
GET, POST/v1/<KEY>/translateTurn a sentence like “cafés in Zürich” into an Overpass query, and with run=1 run it. See Queries from words.
GET/v1/<KEY>/statusYour free query slots, in the same plain-text format as /api/status on overpass-api.de, which OSMnx, OSMPythonTools and other clients read before a query. With ?format=json: your plan, limits, usage this month, running queries and the data timestamp.
GET/v1/<KEY>/timestampThe timestamp of the current data (like /api/timestamp).
GET, POST/v1/<KEY>/elevationHeight or depth of locations, or of points along a path. See Elevation API.
GET, POST/v1/<KEY>/elevation/profileElevation profile of a route or GPX track, with distance, ascent and descent.
GET/v1/<KEY>/maps/…Map tiles, styles and terrain. See Map tiles.
GET/v1/<KEY>/geocode/…, /v1/<KEY>/nominatim/…Search, autocomplete and reverse geocoding. See Geocoding.
POST/v1/<KEY>/mcpMCP server for AI assistants such as Claude and ChatGPT. See AI assistants.
POST/mcpThe same MCP server for apps that sign in to an overpass.ch account (OAuth), without a key in the URL.
GET/healthzService health without authentication: HTTP 200 when the service is up and the data is current. elevation, maps and geocoding read ok or unavailable; with one unavailable, status is degraded and the answer stays 200.

On overpass.ch, /status shows the slots of your key: one for each query your plan can run at the same time. When you have used up the per-minute rate, it shows when the next request is allowed. Reading /status does not count towards the rate. The upstream /api/kill_my_queries endpoint is not available, because it would affect other customers.

Authentication

Put the key in the path, as above. That's the only option for tools that let you set a server URL but no headers. Alternatively, send it in a header:

curl https://api.overpass.ch/v1/interpreter -H "X-API-Key: YOUR_API_KEY" \
  --data-urlencode 'data=node(3470507586);out;'

Treat keys like passwords. For keys used in a browser, restrict them to your websites under API keys → Allowed referers. Requests from other sites then get HTTP 403. Revoked keys stop working immediately.

Limits & plans

Limits apply per account and are shared by all its keys.

PlanRequests / monthRequests / minParallelMax. timeoutMax. maxsizeElevation lookups / monthMap tiles / month
Free10'00030160 s256 MiB1 million100'000
Starter100'000unlimited2180 s512 MiB125 million100'000
Pro1'000'000unlimited6300 s1 GiB500 million100'000
Business3'000'000unlimited10600 s2 GiB1.5 billion100'000
Elevation (without Overpass)–––––50 million100'000
Maps Free (added to any plan)–––––1 million100'000
Maps Starter (added to any plan)–––––50 million2 million
Maps Pro (added to any plan)–––––200 million10 million
Maps Business (added to any plan)–––––500 million40 million
  • Requests per month count successful (HTTP 2xx) interpreter calls, cache hits included. Every allowance runs for a month from the day you bought its plan (on a free plan, from the day you signed up) and starts again on that day of each month at 00:00 UTC, in shorter months on their last day. The dashboard shows the date.
  • Every account has a Maps plan as well, Maps Free unless you subscribe to another one. For map tiles and elevation lookups, the larger allowance of the two plans applies.
  • Requests per minute: on the free plan, a token bucket: you can send a full minute of requests at once, then it refills continuously. Paid plans do not have a per-minute limit; the parallel-query limit applies.
  • Parallel is the number of queries that may run at the same time.
  • Priority: when the server is busy, paid plans are served first. Free accounts can use at most half of the query slots on the server and wait at most 3 seconds for one; otherwise they get HTTP 503 server_busy and should retry a little later.

Every response includes X-RateLimit-Limit and X-RateLimit-Remaining. When a limit is hit you get HTTP 429 with a Retry-After header.

Timeout & maxsize

Overpass lets a query request a run time and memory budget with [timeout:…] and [maxsize:…] (or the timeout and element-limit attributes of <osm-script> in XML). We apply your plan as follows:

  • Values above the plan maximum are lowered to it. The query still runs.
  • If you do not set a value, we use the default timeout of your plan and a maxsize of 512 MiB (or the plan maximum, if lower).
  • Other settings such as [out:…], [bbox:…], [date:…] and [diff:…] pass through unchanged.

The values that applied are returned in the X-Effective-Timeout (seconds) and X-Effective-Maxsize (bytes) response headers. The settings block must be the first statement of the query. A second settings block is rejected with HTTP 400.

Errors

Errors from Overpass itself (syntax errors, timeouts, “runtime error” remarks) are passed through unchanged; Overpass errors explained covers their causes and fixes. Errors from overpass.ch are JSON: {"error": "rate_limited", "message": "…"}.

StatuserrorMeaning
400bad_queryThe settings block could not be parsed. The message says why.
400(Overpass)Syntax error in the query, with the HTML error page from Overpass.
400bad_request, too_many_locationsElevation API: malformed locations or path, or more locations than your plan allows per request.
401unauthorizedMissing, unknown or revoked API key.
403forbidden_refererThe key is restricted to other websites.
403plan_without_overpassThe Elevation plan does not include the Overpass API.
403history_not_in_planA history query on a plan without history. Pro and Business have it.
400bad_sentencetranslate without q=, or with a sentence over 500 characters.
422not_understood, needs_locationtranslate could not read the sentence (the message says why), or a sentence like “near me” with run=1 and without me=.
413payload_too_largeThe query is larger than 1 MiB.
429rate_limitedToo many requests per minute (free plan). Wait Retry-After seconds.
429concurrency_limitToo many parallel queries for your plan.
429quota_exceededThe monthly quota is used up. Upgrade, or wait until it starts again on the day shown in the dashboard.
503server_busyThe server is at capacity (on the free plan this happens sooner, because paid plans have priority). Retry after the Retry-After seconds.
504(either)The query did not finish in time. Narrow it down or raise [timeout:] within your plan.

Queries from words

/v1/KEY/translate turns a sentence into an Overpass query: what you are looking for, and where. It reads English, German, French and Italian and looks up place names with our geocoding API. The same sentence always gives the same query. The translator page shows it on a map.

curl -G https://api.overpass.ch/v1/YOUR_API_KEY/translate \
  --data-urlencode 'q=cafés in Zürich'
{
  "text": "cafés in Zürich",
  "understood": "Cafe, inside the boundary of Zurich",
  "query": "[out:json][timeout:60];\n// Zurich (relation 1682248)\narea(3601682248)->.searchArea;\n…",
  "exact": true,
  "alternatives": [{ "label": "Coffeehouse", "what": "amenity/cafe/coffee_shop" }, …],
  "places": [{ "label": "Zurich", "detail": "Kansas, United States · village", "place": "relation/129836" }, …]
}
ParameterMeaning
qThe sentence, up to 500 characters.
run=1Run the query and answer with the Overpass result, as interpreter does, in place of the JSON above. Plan limits, the timeout and elevation=1 apply as there.
bboxwest,south,east,north: the map view, for sentences without a place (“cafés nearby”); places in it count first.
withinwest,south,east,north: only places in this box count, for callers that know the region, such as an AI assistant. “Huts in Wallis” within Switzerland is the canton, where the name alone is a village in Texas. Sentences without a place search in it, as with bbox.
melat,lon: the position of the user, for “near me” and “nearest”. Without it, wants_location in the answer is true.
langen, de or fr: the language of place names in the answer.
what, place, place2, regionAnother reading: the what of an alternative, or the place of one of the places, sent back with the same sentence.

understood is the sentence as the translator read it: show it to your users so they can check it. exact is false when the query finds more than the sentence asks for, and notes says what: opening times, for example, are not part of Overpass QL.

Each call counts as one Overpass request: it uses the monthly allowance and the rate per minute of your Overpass plan, on every plan including Free. A call with run=1 counts once.

History queries

The Pro and Business plans can query the map as it was at a past date and the changes between two dates, back to 12 September 2012, when OpenStreetMap changed its licence: the settings [date:], [diff:] and [adiff:], the statements timeline, retro and compare, and the filter (changed:). Other plans get 403 history_not_in_plan. Diffs come as XML only; [out:json] with [diff:] gets an error from Overpass. A history query on a small area takes 1 to 2 seconds. The history examples show each kind with its result, and the guide Overpass history queries explains them.

Saved queries

Pro and Business plans store queries under a name: we run them on a schedule, serve the last answer at /v1/KEY/q/name (0.15 s for a result of 19 MB), and send an e-mail or a webhook when the result changes. See saved queries and change alerts.

Caching

Identical queries within 60 seconds are answered from a cache (X-Cache: HIT). Only successful responses up to 5 MiB are cached. To force a fresh result, send Cache-Control: no-cache.

Clients

Any Overpass client works with overpass.ch. Use https://api.overpass.ch/v1/<KEY>/ for tools that add interpreter themselves, and https://api.overpass.ch/v1/<KEY>/interpreter where a full endpoint is expected.

Overpass Turbo

Open overpass-turbo.eu → Settings → General → Server and enter:

https://api.overpass.ch/v1/YOUR_API_KEY/

Keep the trailing slash. If you restrict the key to referers, add overpass-turbo.eu. More in the Overpass Turbo guide.

JOSM

Edit → Preferences → Download (enable expert mode if needed) → Overpass server URL:

https://api.overpass.ch/v1/YOUR_API_KEY/

JOSM does not send a referer. Use a key without referer restrictions.

QGIS (QuickOSM)

QuickOSM → Parameters → Add a custom Overpass server: add https://api.overpass.ch/v1/YOUR_API_KEY/ (with the trailing slash; QuickOSM appends interpreter) and select it. Older versions read it from custom_config.json: see the QuickOSM guide.

Python, R, JavaScript

Step-by-step guides: Python (requests, overpy, overpass), OSMnx, osmdata for R.

import requests

URL = "https://api.overpass.ch/v1/YOUR_API_KEY/interpreter"
query = """
[out:json][timeout:60];
area["name"="Zürich"]["admin_level"="8"]->.a;
nwr(area.a)["shop"="bakery"];
out center;
"""
r = requests.post(URL, data={"data": query}, timeout=120)
r.raise_for_status()
for el in r.json()["elements"]:
    print(el.get("tags", {}).get("name"))

AI assistants (MCP)

overpass.ch is an MCP server (Model Context Protocol). Claude, ChatGPT, Cursor, VS Code and other AI assistants that support MCP can run Overpass queries, find places and look up heights while they answer. In Claude, add overpass.ch from the Claude directory. Assistants that sign in to an overpass.ch account take this URL as a remote MCP server (Streamable HTTP):

https://api.overpass.ch/mcp

Assistants that do not sign in take the URL with a key, https://api.overpass.ch/v1/YOUR_API_KEY/mcp, or https://api.overpass.ch/v1/mcp with the key in X-API-Key or Authorization: Bearer. Create a separate key for each assistant on the API keys page, so that you can revoke it on its own, and leave its allowed referers empty.

In Claude (web, desktop and mobile apps): open overpass.ch in the Claude directory and add it, then sign in to overpass.ch and click Allow. In a Team or Enterprise organisation, an owner first adds it under Organization settings → Connectors. With a key: Customize → Connectors → + Add → Add custom connector, the URL with your key, Authentication No sign in.

ToolWhat it doesCounts as
overpass_queryRuns an Overpass QL or XML query. The answer starts with the number of elements and the data timestamp, then one element per line. Answers over 30,000 characters are cut, and the assistant can ask for the next part.1 request
overpass_examplesFinds tested queries from the query examples for a topic.free
overpass_tagsHow often a key or tag is used in the world, the most used values of a key and the tags found on the same objects; English words such as “charging station” find their tags. Counts from taginfo, updated weekly.free
overpass_translateTurns a sentence such as “cafés with outdoor seating in Zürich” into an Overpass query, without running it, with the reading of the sentence; see Queries from words.1 request
geocode_searchFinds places and addresses by name, each with an overpass_area_id for area(id:…) in a query.1 geocoding request
geocode_reverseThe address, street, city or country at a point.1 geocoding request
elevation_pointsHeights of points.1 lookup per point
elevation_profileDistance, ascent, descent and heights along a path.1 lookup per sample
account_statusPlan, use this month and data timestamp.free

Tool calls count against the limits of your plan like the same calls of the REST API. Listing the tools is free and works without a key. Overpass queries through MCP stop after 120 s at most, after 25 s when the query does not set [timeout:], and the plan may allow less. A refusal (per-minute rate, parallel queries, allowance) reaches the assistant as text that names the wait. In Claude and ChatGPT, results with coordinates also show on a map in the chat; its tiles count against the map tiles of your plan. More in the guide to MCP.

Elevation API

Height above sea level on land and depth at sea, for any point on Earth, with the same API key. Every plan includes it, and the Elevation plan has it without the Overpass API. The answers follow the format of the Google Elevation API and Open Topo Data, so clients written for those work after changing the URL.

curl 'https://api.overpass.ch/v1/YOUR_API_KEY/elevation?locations=46.0207,7.7491|35.95,-5.6'
{
  "status": "OK",
  "results": [
    { "elevation": 1603, "location": { "lat": 46.0207, "lng": 7.7491 },
      "surface": "land", "dataset": "swissalti3d", "resolution": 2 },
    { "elevation": -678.3, "location": { "lat": 35.95, "lng": -5.6 },
      "surface": "sea", "dataset": "gebco-2026", "resolution": 460 }
  ],
  "lookups": 2
}
  • locations: lat,lon|lat,lon|… or a Google encoded polyline as enc:…. For many locations, POST JSON instead: {"locations": [[lat, lon], …]} (objects with lat and lon or lng work too). Up to 10'000 locations per request on paid plans, 1,000 on Free.
  • path with samples: points evenly spread along a line, as in the Google API. Each result then also has its distance from the start in metres.
  • elevation is in metres, rounded to 0.1 m; negative at sea. It is null where there is no data. surface is land or sea; lakes and rivers count as land and return their water level.
  • Usage: one lookup per location or sample, counted only for successful requests, against the monthly allowance of your plan (separate from Overpass requests). The X-Lookups and X-Lookups-Remaining headers show the count for this request and what is left this month.

Heights in Overpass results

Add elevation=1 to the URL of an Overpass query and every node, centre and geometry point of a JSON result gets an elevation field, right after its lon:

curl 'https://api.overpass.ch/v1/YOUR_API_KEY/interpreter?elevation=1' \
  --data-urlencode 'data=[out:json];nwr["tourism"="alpine_hut"](46.0,7.6,46.2,7.9);out center;'

It uses one lookup per point, on top of the Overpass request. The X-Elevation header says added, or why the result came back unchanged: output other than JSON, more than 200,000 points, an answer larger than 32 MiB, or not enough lookups left this month.

Route profiles

/elevation/profile takes a path (as above, or as a GPX file in the POST body) and samples it every 90 m by default. Set interval (metres, at least 10) or samples to change that; interval=30 follows the 30 m grid of the data and uses three times the lookups. Long routes are sampled more coarsely so that they fit into one request. Besides the points, the answer has a summary:

"profile": { "distance_m": 5087, "ascent_m": 508.4, "descent_m": 338.4,
             "min_m": 2417.2, "max_m": 2913.1, "samples": 58, "interval_m": 89.2 }
curl https://api.overpass.ch/v1/YOUR_API_KEY/elevation/profile --data-binary @track.gpx

Ascent and descent ignore changes of less than 2 m, which filters out noise in the data. To write heights into a GPX file, see add elevation to a GPX file; for profiles of OpenStreetMap routes, the elevation examples.

Elevation data and accuracy

  • Land: Copernicus DEM GLO-30, a worldwide grid of 1 arc-second (about 30 m) from the TanDEM-X radar mission, measured from 2011 to 2015. Heights are above the EGM2008 geoid, which is close to mean sea level. Copernicus gives the absolute vertical accuracy as better than 4 m for 90% of points. We store the heights in steps of 0.5 m, which changes a value by at most 0.25 m. Armenia and Azerbaijan are not in the copy of GLO-30 we use: there the 90 m grid answers, with "dataset": "copernicus-glo90" and "resolution": 90.
  • Switzerland and Liechtenstein: swissALTI3D of swisstopo, a terrain model on a 2 m grid, the newest release of every 1 km tile (2019 to 2026). It describes the ground without vegetation and buildings. swisstopo gives its accuracy as 0.3 to 0.5 m where it comes from laser scanning and 1 to 3 m above 2,000 m, where it comes from stereo images (one standard deviation). We convert it from the Swiss height system LN02 to EGM2008, which moves heights by up to about 0.8 m, and store it on a grid of 0.1 arc-second (about 3 by 2 m) in steps of 0.1 m. Results say "dataset": "swissalti3d" and "resolution": 2; the Matterhorn reads 4,477 m on its summit. Terrain and contour tiles use the 30 m grid.
  • Copernicus is a surface model (DSM), swissALTI3D a terrain model (DTM). In the Copernicus data, buildings, infrastructure and vegetation are part of the height, so in forests and towns it gives the height of the trees and roofs. Where a route crosses the Swiss border in a forest or a town, heights drop by that amount. Values are interpolated between the points of the 30 m grid, so sharp summits read lower and narrow valleys higher than the real terrain. On needle-like peaks the difference is a few hundred metres: Everest reads 8,711 m instead of 8,849 m. In villages, valleys and rolling terrain it is typically within a few metres.
  • Fields of a result: dataset is copernicus-glo30, swissalti3d, copernicus-glo90 or gebco-2026, and resolution the spacing of its grid in metres: 30, 2, 90 or 460.
  • Sea: the GEBCO grid (about 460 m) wherever Copernicus marks the ocean. Depths far from surveyed areas are estimates.
  • Suitable for altitude bands, regional analysis, long routes, maps and adding heights to places; not for engineering, aviation, drones or navigation.

Map tiles

Vector map tiles of the whole world, ready-made MapLibre styles and terrain tiles, with the same key. Every plan includes 100,000 map tiles a month, and the Maps plans have more, with a subscription of their own. For a web page, create a key of the type “Maps only” and set its allowed referers: such a key works only for map tiles and geocoding.

PathAnswerCounts as
/v1/<KEY>/maps/styles/<style>.jsonMapLibre style; <style> is outdoor, marine, relief, driving, light, dark, white, grayscale or black. Parameters: lang (label language, default en), hillshade=1 (shading), terrain=1 (shading and 3D terrain), buildings=1 (3D buildings from zoom 13, all styles but relief).free
/v1/<KEY>/maps/vector.jsonTileJSON of the vector tiles: URL template, zoom range, layers with their fields, and the date of the data.free
/v1/<KEY>/maps/vector/{z}/{x}/{y}.mvtVector tile (Mapbox Vector Tile, gzip), zoom 0 to 15.1 map tile
/v1/<KEY>/maps/terrain.jsonTileJSON of the terrain tiles.free
/v1/<KEY>/maps/terrain/{z}/{x}/{y}.webpTerrain tile, 512 × 512 px, zoom 0 to 10, lossless WebP. .png gives the same tile as PNG.1 map tile
/v1/<KEY>/maps/contours.jsonTileJSON of the contour lines.free
/v1/<KEY>/maps/contours/{z}/{x}/{y}.mvtContour lines as a vector tile (layer contours, fields ele in metres and level, 1 on the major interval), zoom 10 to 14: every 200 m at zoom 10, 100 m at 11, 50 m at 12, 20 m from zoom 13.1 map tile
/v1/<KEY>/maps/trails.jsonTileJSON of the trails.free
/v1/<KEY>/maps/trails/{z}/{x}/{y}.mvtTrails and points from the live OpenStreetMap data of our Overpass server, zoom 11 to 13 (maps enlarge zoom 13). Layer trails: grade 1 to 6 from sac_scale (1 hiking, 2 mountain hiking, 3 demanding mountain hiking, 4 alpine hiking, 5 demanding alpine, 6 difficult alpine; 0 for paths without a grade, from zoom 12), kind, name, ref, visibility. Layer points (zoom 13): bus and tram stops, stations, ferry terminals, cable car stations, drinking water and springs, with kind and name. A tile is at most 7 days old.1 map tile
/v1/<KEY>/maps/bathymetry.json, …/isobaths.json, …/seamarks.jsonTileJSON of the sea depths, the depth contours and the sea marks.free
/v1/<KEY>/maps/bathymetry/{z}/{x}/{y}.webpSea depths in the Terrain-RGB format of the terrain tiles, from GEBCO at sea and Copernicus on land, zoom 0 to 9, also as .png. For colouring the sea by depth (MapLibre color-relief) and shading the sea floor.1 map tile
/v1/<KEY>/maps/isobaths/{z}/{x}/{y}.mvtDepth contours as a vector tile (layer contours, ele in metres below 0, level 1 at 100 m and every 1,000 m), zoom 5 to 12: 200 m and every 1,000 m down to zoom 7, then also 20, 50, 100 and 500 m, and from zoom 10 also 5 and 10 m.1 map tile
/v1/<KEY>/maps/seamarks/{z}/{x}/{y}.mvtSea marks from the live OpenStreetMap data of our Overpass server (the seamark:* tags), zoom 9 to 13. Layer seamarks: kind (lighthouse, light, lateral, cardinal, danger, safe_water, special, marina, harbour, anchorage, wreck, rock, mooring), colour, category, name and light in chart notation, such as Fl(2) R 6s. Lighthouses, harbours, marinas and anchorages from zoom 9, the rest from zoom 11. A tile is at most 7 days old.1 map tile
/maps/assets/fonts/…, /maps/assets/sprites/…Fonts and icons of the styles, without a key.free
new maplibregl.Map({
  container: "map",
  style: "https://api.overpass.ch/v1/YOUR_API_KEY/maps/styles/light.json?lang=de&terrain=1",
  center: [7.6586, 45.9763], zoom: 12, pitch: 60
});
  • Outdoor colours trails by their SAC grade, as on Swiss signposts: yellow for hiking trails (T1), red for mountain trails (T2 and T3), blue for alpine trails (T4 to T6); graded trails show from zoom 11. It also shows tracks, via ferratas, huts, campsites, viewpoints, stations and stops, drinking water, peaks with their height, rock, glaciers and cliffs, with hillshading and contour lines.
  • Marine colours the sea by depth and shades the sea floor, with depth contours, the coastline, ferry routes, lighthouses and lights, buoys and beacons in their colours, harbours, marinas, anchorages, wrecks and rocks; protected areas are outlined, since many reach out to sea. Its depths come from a grid of about 460 m and are not for navigation.
  • Driving has wider roads and shows fuel stations, charging stations and car parks.
  • Relief colours the land by height, with hillshading and contour lines, and needs MapLibre GL JS 5.6 or later, as marine does.
  • Light, dark, white, grayscale and black are the Protomaps styles; white, grayscale and black do not have points of interest.
  • Outdoor, marine and driving load a second set of icons, as MapLibre allows.
  • Label languages for lang: ar, bg, cs, da, de, el, en, es, et, fa, fi, fr, ga, he, hi, hr, hu, id, it, ja, ko, lt, lv, mr, mt, ne, nl, no, pl, pt, ro, ru, sk, sl, sv, tr, uk, ur, vi, zh-Hans and zh-Hant. A region code such as de-CH uses its language. Places without a name in that language show their local name.
  • The vector tiles follow the Protomaps basemap schema, version 4, with the layers boundaries, buildings, earth, landuse, places, pois, roads and water. They also contain a landcover layer for zooms 0 to 7, which our styles leave out; if you show it, credit ESA WorldCover (CC BY 4.0). The data comes from OpenStreetMap and Natural Earth and is updated every week; data_date in the TileJSON gives the date.
  • Vector tiles go up to zoom 15, with house numbers, shops and restaurants; maps enlarge zoom 15 for closer views. Terrain tiles go up to zoom 10, drawn from the 30 m grid.
  • MapLibre GL JS reads the tiles in a single worker, except on Safari. Calling maplibregl.setWorkerCount(2) before the first map enables two workers to share the work and views with many tiles load sooner.
  • Terrain tiles store the height in the Mapbox Terrain-RGB format: height = −10000 + (R × 65536 + G × 256 + B) × 0.1 m; the heights are whole metres. The sea is 0 m and lakes have their water level. MapLibre, Mapbox GL, deck.gl and maplibre-contour read this format; in your own style, add {"type": "raster-dem", "url": "https://api.overpass.ch/v1/KEY/maps/terrain.json"} as a source.
  • Every vector or terrain tile answered with HTTP 200 counts as one map tile against the monthly allowance of your plan, which is separate from Overpass requests and elevation lookups. Tiles are sent with Cache-Control (one day for vector tiles, 30 days for terrain) and an ETag, so browsers keep them; a revalidation answered with 304 is free. A tile without data answers 204 and is free too.
  • The free plans allow up to 1,200 tiles a minute; paid plans do not have a per-minute limit. When the monthly allowance is used up, tiles get HTTP 429 quota_exceeded until the allowance starts again or until an upgrade. We send an e-mail at 80% and at 100% of each allowance.
  • Other errors: 403 forbidden_referer (the website is not among the allowed referers of the key), 403 key_scope (a maps key used for Overpass or elevation), 403 no_map_tiles, 404 above the highest zoom, and 503 maps_unavailable or server_busy with Retry-After. Errors of map libraries and other tile services are explained in the guide Map tile API errors.

Code for Leaflet, OpenLayers and QGIS, and a live map, are on the map tiles page. The guides for MapLibre, Leaflet and OpenLayers cover markers, GeoJSON and the limits of each library.

Geocoding

Search for addresses and places, search as you type, and reverse geocoding, on OpenStreetMap data. Two forms of the API answer from the same data: the API of Photon and the API of Nominatim. Every plan includes 100,000 geocoding requests a month, and the Geocoding plans have more. A key of the type “Maps only” works for geocoding too, so a search box in a web page can use the key of its map. Live examples are on the geocoding page.

PathAnswerCounts as
/v1/<KEY>/geocode/api?q=…Search, also while the user types. Parameters: q, limit (up to 50), lang (en, de, fr; without it the Accept-Language header, then local names), lat and lon with zoom and location_bias_scale (results near the point first), bbox (west,south,east,north), osm_tag (key:value, key, :value, !key:value; may repeat), layer (house, street, locality, district, city, county, state, country, other; may repeat), countrycode, dedupe.1 request
/v1/<KEY>/geocode/structured?…An address in fields: street, housenumber, postcode, city, district, county, state, countrycode, and the parameters of /api.1 request
/v1/<KEY>/geocode/reverse?lat=…&lon=…The objects nearest to a point. Parameters: radius (km), limit, lang, layer, osm_tag.1 request
/v1/<KEY>/geocode/statusDate of the data, the plan and its use this month.free
/v1/<KEY>/nominatim/search?…Nominatim search: q, or the fields street, city, county, state, country, postalcode, amenity; format (json, jsonv2 by default, geojson), limit (up to 40), addressdetails, namedetails, accept-language, countrycodes, viewbox (without bounded: places near its middle first, weighted with the Photon parameters zoom, 0–18, and location_bias_scale, 0–1), bounded, featureType.1 request
/v1/<KEY>/nominatim/reverse?lat=…&lon=…Nominatim reverse: zoom (18 the nearest object, 16–17 a street, 13–15 a suburb or village, 10–12 a town, 8–9 a county, 5–7 a state, 3–4 a country), format, addressdetails (1 by default), namedetails, accept-language.1 request
/v1/<KEY>/nominatim/statusOK, or with format=json the status JSON of Nominatim.free
curl 'https://api.overpass.ch/v1/YOUR_API_KEY/geocode/api?q=Bundesplatz%203%2C%20Bern&limit=3'
curl 'https://api.overpass.ch/v1/YOUR_API_KEY/nominatim/reverse?lat=46.9465&lon=7.4443&format=jsonv2'
  • Answers of /geocode/… are GeoJSON as Photon sends them. Each feature has name, street, housenumber, postcode, city, district, county, state, country, countrycode, osm_type (N, W, R), osm_id, osm_key, osm_value, type and extent (west, north, east, south), as far as the place has them.
  • The Nominatim answers have place_id, licence, osm_type, osm_id, lat, lon, class (json) or category (jsonv2), type, place_rank, importance, addresstype, name, display_name, address, namedetails and boundingbox. place_id is made from the OSM type and id, importance follows the order of the results, and the order is that of Photon. The XML format, polygons and extratags are not available; /lookup and /details answer 501. In a structured search, country filters only as a two-letter code.
  • Each answered request (HTTP 2xx) counts one geocoding request, also when it finds nothing. Errors and status requests are free. Answers carry Cache-Control: private, max-age=3600, so a browser does not ask twice for the same search.
  • The geocoding included in the other plans allows 300 requests a minute; the Geocoding plans allow more (see pricing). When the monthly allowance is used up, requests get HTTP 429 quota_exceeded. We send an e-mail at 80% and at 100%.
  • For search as you type, wait about 250 ms after the last keystroke, start at three letters, and drop answers that arrive after a newer request was sent.
  • Errors: 400 bad_request (a parameter the API does not accept; the message names it), 403 no_geocoding, 403 forbidden_referer, 429 rate_limited and quota_exceeded, 502 geocoding_unavailable and 503 busy with Retry-After.
  • The data comes from OpenStreetMap and is updated every week, with names in English, German, French and the local language. You may store the results; show “© OpenStreetMap contributors” where you use them.

Attribution

The data is © OpenStreetMap contributors and available under the Open Database Licence. If you display or publish data obtained through overpass.ch, credit it as “© OpenStreetMap contributors” with a link to openstreetmap.org/copyright, and respect the share-alike terms for derived databases. We do not remove the copyright notice from responses.

Elevation data: when you publish or display elevation results, credit the sources. Use this notice:

Produced using Copernicus WorldDEM™-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved. Switzerland and Liechtenstein: © swisstopo. Sea depths: GEBCO Compilation Group (2026) GEBCO 2026 Grid.

The organisations in charge of the Copernicus programme by law or by delegation do not incur any liability for any use of the Copernicus WorldDEM™-30. Neither they nor swisstopo or GEBCO endorse overpass.ch or your use of the data.

Results with "dataset": "copernicus-glo90" (Armenia and Azerbaijan) come from the Copernicus WorldDEM™-90: for them, write WorldDEM™-90 instead of WorldDEM™-30 in the notice and in the sentence above. Results with "dataset": "swissalti3d" come from swissALTI3D of the Federal Office of Topography swisstopo, which asks for the credit “© swisstopo”.

Map tiles: our styles and TileJSON carry the credits (overpass.ch, © OpenStreetMap), and MapLibre or Leaflet shows them in a corner of the map. Keep them visible. Maps with terrain or contour lines add “Copernicus”, which links to the Copernicus notice above (WorldDEM™-90 in Armenia and Azerbaijan); the sea in terrain tiles is flat, so GEBCO is not used there. The marine style and the sea depth tiles add “GEBCO · not for navigation”, which links to the GEBCO credit above. The vector tiles are built with the tools of Protomaps.

Fair use

  • Use one account per person or organisation; do not create accounts to get around limits.
  • Do not resell raw API access or expose your key publicly in unrestricted form (if you use a key in a public web page, set Allowed referers for it and tick “Reject requests without a referer”; do not publish keys anywhere else, for example in code repositories).
  • Prefer bounding boxes and areas over planet-wide scans. For bulk exports of whole countries, planet extracts (for example from Geofabrik) are usually a better fit.

The full rules are in the terms of service.