API Directory › 🌍 Geo & Location › Nominatim (OpenStreetMap)
No authHTTPSCORS

Nominatim (OpenStreetMap) API

Free geocoding and reverse geocoding powered by OpenStreetMap data.

Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Nominatim (OpenStreetMap) docs ↗

What it does

Nominatim is the OpenStreetMap project’s geocoder: forward geocoding (search a place or address for coordinates) and reverse geocoding (coordinates to the nearest address), plus structured address breakdowns and bounding boxes, all from OSM data.

Base URL

https://nominatim.openstreetmap.org

Authentication

None — but the public instance has a strict usage policy: maximum 1 request per second, a genuine User-Agent or Referer identifying your app, no bulk or autocomplete-style usage, and you must cache results. Heavier use means self-hosting or a paid provider.

Code examples

curl
curl -s "https://nominatim.openstreetmap.org/search?q=Colosseum,Rome&format=jsonv2&limit=1" \
  -H "User-Agent: larzos-demo/1.0 (contact@example.com)"
Python (reverse)
import requests

r = requests.get("https://nominatim.openstreetmap.org/reverse",
    params={"lat": 41.8902, "lon": 12.4922, "format": "jsonv2"},
    headers={"User-Agent": "larzos-demo/1.0 (contact@example.com)"}, timeout=10)
print(r.json()["display_name"])

Rate limits & quotas

Public server: 1 request/second, absolute maximum, enforced with blocks. No API key means no higher tier — the way to scale is to run your own Nominatim (Docker images exist) against an OSM extract, or use a hosted OSM geocoder that permits volume.

Key response fields

lat / lonCoordinates (strings) of the top match
display_nameFull formatted address
addressStructured object: road, suburb, city, state, postcode, country
boundingbox[south, north, west, east]
importance / place_rankRelative prominence of the result

Common errors

403 / blockedYou exceeded 1 req/s or sent no identifying User-Agent.
[] (empty array)No match — try a less specific query or structured parameters.
429Rate limited by the public instance.

When to use it (and alternatives)

Fine for occasional lookups, prototypes and low-traffic sites that respect the 1 req/s rule. For anything real — autocomplete, batch jobs, high traffic — self-host Nominatim or use OpenCage / Mapbox, which are built on similar open data with proper SLAs.

FAQ

Can I use Nominatim for address autocomplete?

Not against the public server — per-keystroke queries violate its usage policy and will get you blocked. Self-host it or use a provider that offers a search-as-you-type endpoint.

Why am I getting blocked?

The two common reasons are exceeding 1 request/second and not sending a User-Agent that identifies your application with contact info. Both are mandatory.

Is the data any good?

It is only as complete as OpenStreetMap in that area — excellent in well-mapped cities, patchy in rural regions and parts of the global South. Check coverage for your target area.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

IP LookupDNS Lookup

Related Geo & Location APIs

← Back

More Geo & Location APIs · All 196 APIs