Nominatim
| Nominatim | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Author: | osm-search/Nominatim/graphs/contributors GitHub | |||||||||||||||||||
| License: | GNU GPL3+ (Python code) and see README for other files | |||||||||||||||||||
| Status: | Active | |||||||||||||||||||
| Version: | 5.3.3 releases (2026-10-14) | |||||||||||||||||||
| Website: | nominatim.org / UI: nominatim.openstreetmap.org | |||||||||||||||||||
| Source code: | osm-search/Nominatim GitHub | |||||||||||||||||||
| Programming languages: | Python and SQL | |||||||||||||||||||
|
Open Source search based on OpenStreetMap data | ||||||||||||||||||||
| ||||||||||||||||||||
Nominatim (from the Latin, 'by name') is a tool to search OSM data by name and address (geocoding) and to generate synthetic addresses of OSM points (reverse geocoding). It can be found at nominatim.openstreetmap.org.
Nominatim is also used as one of the sources for the search box on the OpenStreetMap home page. Several companies provide hosted instances of Nominatim that you can query via an API; see section Alternatives below.
API/Usage instructions
The API documentation can be found at nominatim.org. This also contains hints how to formulate search queries with Nominatim. The web API offers these endpoints:
/search– search OSM objects by name, address or type, as free text or as structured fields/reverse– find the OSM object nearest to a coordinate and its address/lookup– address details for OSM objects given by their ID/status– server status/details– internal details of an object, for debugging only/deletableand/polygons– objects deleted in OSM but held back, and broken polygons
The search frontend is also available as a Python library, nominatim-api, which queries a local Nominatim database directly without going through HTTP. It is not meant for use against nominatim.openstreetmap.org or other web services.
Usage Policy
For the usage policy of nominatim.openstreetmap.org, please see Nominatim usage policy. It applies only to the OSMF server, not to instances run by others. In short:
- no more than 1 request per second for the whole application, summed over all its users
- identify the application with a custom User-Agent or HTTP Referer
- show the OSM attribution and cache results where possible
- no client-side autocomplete, and no periodic or bulk geocoding beyond small, one-off jobs
The policy text is authoritative and may change without notice.
Source Code
The source code is on GitHub at https://github.com/osm-search/Nominatim.
Nominatim stores its data in PostgreSQL with PostGIS. It works in three stages:[1]
- Import: osm2pgsql, using a flex output style shipped with Nominatim, reads OSM data into a
placetable. - Indexing: PL/pgSQL functions rank places by importance, link related objects and compute addresses and the search index.
- Search frontend: the Python package
nominatim-apiimplements the web API.
Installation
Full installation instructions are on nominatim.org, including step-by-step guides for Ubuntu. A current release needs PostgreSQL 13+, PostGIS 3.0+ (3.2+ recommended), osm2pgsql 1.8+ and Python 3.9+; continuous updates also need pyosmium.
The project also links to community-maintained setups it does not test or support, among them Docker images, Kubernetes and Helm deployments.
Other resources
There is also a list of country codes, special phrases per country, some experimental address formats per country and a list of abbreviations.
Bugs / Error reporting
Please report bugs and problems in the Nominatim issue tracker on GitHub, using one of its issue templates (there is also an archive of issues before 2018 originally reported on trac.openstreetmap.org).
When you report unexpected search results, please include the following in your bug report:
- the exact search term you were using
- links to the OSM objects you expect to find and, optionally, a link to the OSM object that was actually found
Questions about search results and the OSM data behind them belong on the OSM community forum. Questions about running your own installation belong in GitHub Discussions.
Alternatives / Third-party providers
For slightly larger requirements, you may be able to use one of the various third-party providers, though, of course, you will need to agree to their terms of service.
These OSMF corporate members offer commercial-grade geocoding services:
- Geofabrik (uses Nominatim, identical API)
- OpenCage Geocoder (uses Nominatim among others)[2]
- Stadia Maps Geocoding API (Geocoding and autocomplete search with data from OSM and other sources)
- LocationIQ
Other service providers (list has not been curated):
- Geoapify (uses Nominatim among others, provides a commercial access to Nominatim API)[3]
- Geocodify.com
- Geocoding API
- Maps.co Geocoding API
- Geocoding API for Europe
- OpenGeocoding (own engine, not Nominatim; built from OpenStreetMap, Overture Maps, OpenAddresses and GeoNames data; free tier)
You can also install your own instance of Nominatim.
API Client Libraries
Note: before adding any libraries here, you must make sure that it forces the user to set a custom user agent. It should also prominently point to the Nominatim usage policy.
Not endorsing the quality of these related projects, but consider using them as an alternative to writing your own. Please make sure you read the Nominatim usage policy before using these libraries. In particular, make sure you respect the limit of 1 request/s.
- C#: https://github.com/f1ana/Nominatim.API
- Python: https://geopy.readthedocs.io/en/stable/#nominatim
See also
See Geocoding for a list of OSM-based geocoding providers, including those who use different geocoding software than Nominatim.
- Photon – search-as-you-type geocoder that imports its data from a Nominatim database
- Mailwoman – self-hosted geocoder with its own engine and data, compatible with Nominatim's HTTP API
References
- ↑ Basic Architecture, Nominatim documentation, https://nominatim.org/release-docs/develop/develop/overview/
- ↑ Migrating from Nominatim, OpenCage website, https://opencagedata.com/guides/how-to-switch-from-nominatim, retrieved on 26 August 2021
- ↑ Geoapify Geocoding API website, https://www.geoapify.com/geocoding-api, retrieved on 27 September 2021