Overpass API (OpenStreetMap)
overpass-api.de · Location
Query OpenStreetMap data — find nearby amenities, roads, buildings, and geographic features using the Overpass Query Language. Free, no API key.
Authentication
No authentication requiredFree to use with no key needed.
Sample Requests
GET
Find nearby cafes
Find cafes within 500m of the Eiffel Tower area.
https://overpass-api.de/api/interpreter?data=[out:json];node["amenity"="cafe"](around:500,48.8566,2.3522);out body;
Hover any highlighted part to learn what it does
curl -X GET "https://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%3Bnode%5B%22amenity%22%3D%22cafe%22%5D(around%3A500%2C48.8566%2C2.3522)%3Bout%20body%3B"
import requests
params = {
"data": "[out:json];node["amenity"="cafe"](around:500,48.8566,2.3522);out body;"
}
response = requests.get(
"https://overpass-api.de/api/interpreter",
params=params,
)
print(response.json())const url = new URL('https://overpass-api.de/api/interpreter');
url.searchParams.set('data', '[out:json];node["amenity"="cafe"](around:500,48.8566,2.3522);out body;');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://overpass-api.de/api/interpreter")
q := baseURL.Query()
q.Set("data", "[out:json];node["amenity"="cafe"](around:500,48.8566,2.3522);out body;")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://overpass-api.de/api/interpreter")
uri.query = URI.encode_www_form({
"data" => "[out:json];node["amenity"="cafe"](around:500,48.8566,2.3522);out body;"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://overpass-api.de/api/interpreter?" . http_build_query([
"data" => "[out:json];node["amenity"="cafe"](around:500,48.8566,2.3522);out body;"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- No API key needed
- Use Overpass Query Language (OverpassQL)
- Find nearby amenities: ?data=[out:json];node["amenity"="restaurant"](around:1000,lat,lon);out body;
- Test queries first at overpass-turbo.eu
- Common amenities: cafe, restaurant, hospital, pharmacy, bank, parking
What can you build with Overpass API (OpenStreetMap)?
Overpass API (OpenStreetMap) is a Location API. Developers commonly use location APIs for:
- tracking assets and vehicles in real time
- building delivery and logistics apps
- finding nearby businesses or services
- geo-fencing and location-based notifications
- address validation and autocomplete
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Overpass API (OpenStreetMap) is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide