Overpass (OpenStreetMap) API
Free Overpass API with no key: query OpenStreetMap for any feature — shops, roads, amenities — by tag and bounding box. Immensely powerful. Tested example.
Endpoint tested and returned HTTP 200 on 2026-08-20
What is the Overpass (OpenStreetMap) API?
The Overpass API is a free, key-free query engine for OpenStreetMap data, letting you extract any mapped feature — shops, restaurants, roads, buildings, amenities — filtered by tags and geographic area.
Overpass turns OpenStreetMap from a map you look at into a database you can query. Want every pharmacy in a city, every bench in a park, or every building with solar panels? Overpass answers that, and no commercial API offers comparable coverage for free.
The cost is its query language, Overpass QL, which is genuinely unlike anything else. It is worth learning if you need OSM data at all, but expect the first few queries to be frustrating — and always constrain by bounding box, since unbounded queries will time out.
Quick facts
- Base URL
https://overpass-api.de/api/interpreter- Authentication
- No API key required.
- Rate limit
- Shared public instance with a query timeout and slot system; heavy users should self-host.
- Pricing
- Free. OSM data is ODbL licensed, requiring attribution and share-alike for derived databases.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Overpass (OpenStreetMap) API
Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.
1. Query OpenStreetMap features in an area
GET https://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%3Bnode%5Bamenity%3Dfuel%5D(31.5%2C74.3%2C31.52%2C74.35)%3Bout%201%3B
curl 'https://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%3Bnode%5Bamenity%3Dfuel%5D(31.5%2C74.3%2C31.52%2C74.35)%3Bout%201%3B'const res = await fetch("https://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%3Bnode%5Bamenity%3Dfuel%5D(31.5%2C74.3%2C31.52%2C74.35)%3Bout%201%3B");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%3Bnode%5Bamenity%3Dfuel%5D(31.5%2C74.3%2C31.52%2C74.35)%3Bout%201%3B", timeout=20)
res.raise_for_status()
print(res.json()){
"version": 0.6,
"generator": "Overpass API 0.7.62.11 87bfad18",
"osm3s": {
"timestamp_osm_base": "2026-08-19T21:09:30Z",
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
},
"elements": [
{
"type": "node",
"id": 272369604,
"lat": 31.5199163,
"lon": 74.3253966,
"tags": {
"amenity": "fuel"
}
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
data | string | Required | An Overpass QL query, URL-encoded. [out:json];node[amenity=fuel](31.5,74.3,31.52,74.35);out 1; |
[out:json] | syntax | Optional | Output format directive at the start of the query. [out:json] |
[timeout:n] | syntax | Optional | Query timeout in seconds. [timeout:25] |
(bbox) | syntax | Optional | Bounding box as south,west,north,east. (31.5,74.3,31.52,74.35) |
Response fields
version / generatornumber|string- Overpass API version information.
osm3s.timestamp_osm_basestring- How current the underlying OSM data is.
elementsarray- Matching OSM features.
elements[].typestring- node, way or relation.
elements[].idinteger- OSM object id.
elements[].lat / lonnumber- Coordinates, on nodes.
elements[].tagsobject- All OSM tags on the feature — name, opening_hours and so on.
What you can build with the Overpass (OpenStreetMap) API
- Find all amenities of a type within an area
- Extract points of interest for a local guide
- Analyse urban infrastructure and accessibility
- Build custom maps with filtered OSM features
Common errors and how to fix them
504 or timeout
The query is too broad or has no bounding box.
Fix: Always constrain with a bounding box and set [timeout:25]; unbounded queries hit the global dataset.
429 too many requests
The public instance uses a slot system.
Fix: Wait and retry, or self-host Overpass for sustained use.
Empty elements array
Wrong tag key or value.
Fix: OSM tagging is conventional, not enforced — check the OSM wiki for the correct tag, e.g. amenity=fuel not amenity=petrol.
Overpass (OpenStreetMap) API — frequently asked questions
Is the Overpass API free?
Yes, free with no API key. OSM data is ODbL licensed, so attribution is required and derived databases must be shared alike.
What can I query with it?
Anything mapped in OpenStreetMap — shops, restaurants, roads, buildings, benches, cycle paths, power lines. Coverage is far broader than any commercial POI API offers for free.
Why do my queries time out?
Almost always because there is no bounding box, so the query runs against global data. Always constrain geographically and set an explicit [timeout:25].
Is Overpass QL hard to learn?
It is unlike SQL or any common query language, so expect a learning curve. The OSM wiki has good examples, and Overpass Turbo provides an interactive query builder.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
URL Encoder
Percent-encode text for URLs instantly. Switch between encodeURIComponent and encodeURI modes, see live output and copy the result. Free URL encoder.
Overpass (OpenStreetMap) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.