Getting Started with Nominatim for Geocoding and Reverse Geocoding
- Anvita Shrivastava

- 1 hour ago
- 5 min read
Geospatial applications typically require conversion between human-readable addresses and geographic coordinates. Nominatim is one of the most widely used geocoding services based on OpenStreetMap (OSM) data, and it can perform both geocoding and reverse geocoding.
Nominatim is widely used in GIS applications, web mapping tools, location-based services, Python workflows, and spatial data processing.
This technical guide will help readers understand how Nominatim works, how to implement geocoding and reverse geocoding, and how developers can utilize it in GIS and Python-based applications.

What Is Nominatim?
Nominatim is a free tool for searching and mapping places that utilizes the OpenStreetMap database. The word Nominatim is derived from the Latin word "nominatim," which means "by name."
Nominatim facilitates two major functions:
Forward geocoding: Transforms the text of an address or place into geographical coordinates.
Reverse geocoding: Converts latitude and longitude into a natural language location.
How Nominatim Works
Nominatim is a tool for indexing geospatial information from OpenStreetMap and creating a search engine for finding such data by address, name, or geographic coordinates.
The general process is this:
Input → Nominatim API → OpenStreetMap data → Geocoded information
In forward geocoding functionalities of the application uses a descriptive query concerning the location at stake. Nominatim searches through its OSM database to retrieve the results.
In cases of reverse geocoding, the application provides the latitude and longitude. In this case, Nominatim identifies geographic features and retrieves the address from the nearby OSM mapping facilities.
The performance of Nominatim depends on the quality and completeness of data provided by OpenStreetMap.
Forward Geocoding with Nominatim
Forward geocoding is useful when you have an address or place name but need its geographic coordinates.
A basic API request can use the following structure:
The q parameter contains the location query, while format=jsonv2 requests a JSON response.
A response can contain information such as:
[
{
"place_id": 123456,
"lat": "40.7127281",
"lon": "-74.0060152",
"display_name": "New York, United States",
"type": "city"
}
]The exact results and identifiers can change as OpenStreetMap data is updated.
The most important fields for GIS applications are usually:
lat — latitude
lon — longitude
display_name — formatted location description
type — geographic feature type
osm_type — OpenStreetMap object type
osm_id — OpenStreetMap object identifier
boundingbox — approximate geographic extent
Reverse Geocoding with Nominatim
Reverse geocoding starts with coordinates and returns information about the corresponding location.
For example:
In Python:
import requests
url = "https://nominatim.openstreetmap.org/reverse"
params = {
"lat": 40.7128,
"lon": -74.0060,
"format": "jsonv2",
"zoom": 18
}
headers = {
"User-Agent": "MyGISApplication/1.0"
}
response = requests.get(url, params=params, headers=headers)
response.raise_for_status()
data = response.json()
print(data.get("display_name"))The response may contain a structured address object with fields such as:
{
"road": "Example Street",
"city": "New York",
"state": "New York",
"postcode": "10001",
"country": "United States",
"country_code": "us"
}This makes reverse geocoding particularly useful for applications that collect GPS coordinates from mobile devices, vehicles, drones, field surveys, or IoT sensors.
Nominatim Parameters You Should Know
Nominatim provides several parameters that help control search behavior.
q
The primary free-form search query.
q=Chicago, Illinoisformat
Specifies the response format.
format=jsonv2JSON is convenient for web and Python applications.
limit
Controls the maximum number of search results returned.
limit=5This is useful when a query could match multiple locations.
countrycodes
Restricts results to specific countries using ISO 3166-1 alpha-2 country codes.
countrycodes=usFor example, this can help prevent ambiguous place names from returning results in multiple countries.
viewbox
Defines a geographic search area and can help prioritize results within a particular bounding box.
bounded
Can be used with a viewbox when you want results restricted to that geographic area.
addressdetails
Requests a structured breakdown of the returned address.
addressdetails=1zoom
For reverse geocoding, zoom can influence the level of detail returned, from broader geographic areas to more specific features.
Nominatim and GIS Workflows
Nominatim becomes particularly useful when integrated with broader GIS processing pipelines.
A typical workflow could be:
CSV Addresses → Nominatim → Coordinates → GeoDataFrame → Spatial Analysis → GIS Visualization
For example, a dataset containing customer addresses can be geocoded and converted into point features.
Using GeoPandas, the resulting coordinates can be transformed into a spatial dataset:
import geopandas as gpd
from shapely geometry import Point
geometry = [
Point(float(item["lon"]), float(item["lat"]))
for item in results
]
gdf = gpdGeoDataFrame(
results,
geometry=geometry,
crs="EPSG:4326"
)The resulting GeoDataFrame can then be used for spatial joins, proximity analysis, mapping, clustering, buffer analysis, or export to formats such as GeoJSON and GeoPackage.
Nominatim vs. Commercial Geocoding APIs
Nominatim offers the benefits of working with OpenStreetMap data and is an open-source geocoding solution. However, it is crucial to make a distinction between Nominatim software and Nominatim public service.
The public service has its usage policies and is not meant to be unlimited or able to handle a high volume of geocoding requests.
Commercial geocoding solutions have some additional features they are capable of offering:
High volumes of geocoding
Service-level agreements
Dedicated infrastructure
Address validation
Privacy of databases
Better search ranking
Enterprise helpdesk
In case of development, testing, and handling small tasks, Nominatim can be a suitable option for use.
Nominatim Rate Limits and Usage Considerations
Developers shouldn't use the Nominatim public service as a bulk geocoding API.
When using the public service, applications need to:
Have an appropriate User-Agent.
Obey the usage policy of the service.
Not make a lot of requests.
Cache relevant results
Avoid duplicate requests
Consider setting up your edition of Nominatim if you need to complete big long-term works.
Accuracy and Data Quality
Nominatim makes no promises as to whether every address will lead to coordinates that indicate a specific structure.
Factors that influence the accuracy of geocoding include:
Completeness of OpenStreetMap
Address rendering
Quality of search request
Mapping coverage assurance
Geographic location
Type of object
Ambiguous place names
For example, while an addressed location can yield precise data in a well-mapped city, a rural locality with insufficient mapping will result in the whole locality or any of its major administrative divisions instead of the particular address.
Thus, the GIS systems need to take the information from the output fields into account, instead of simply assuming that every point marks the exact position of the given address.
Nominatim for Drone and Remote Sensing Applications
Nominatim offers an additional advantage to drone and remote sensing data capture.
It can be added to a UAV data pipeline that contains GPS information describing things like field studies, inspection sites, control surveys, and asset identification.
For example:
Drone GPS point → Reverse geocoding → Road / Locality / City / Town → Inspection report
The outcome is that one can work with massive inspection data sets with certainty.
However, Nominatim should not replace accurate survey coordinates, as reverse geocoding assists in gaining geographic context and does not enhance positional accuracy.
Using OpenStreetMap data, Nominatim offers an effective solution for including geocoding and reverse geocoding features in GIS applications. Developers can make use of it to translate addresses into latitude-longitude coordinates, convert coordinates into structured addresses, and use these results in Python, GeoPandas, web mapping, spatial databases, and remote sensing workflows.
In case of smaller applications and development projects, Nominatim can become a valid geocoding solution if used following its service policies. For high-volume production operations, caching and controlled request processing can be good options to look into besides self-hosting.
No matter whether you work on a Python-based application, web mapping platform, location intelligence workflow, drone inspection system, or geospatial data pipeline, it is good to understand Nominatim.
For more information or any questions regarding the LizardTech suite of products, please don't hesitate to contact us at:
Email: info@geowgs84.com
USA (HQ): (720) 702–4849
(A GeoWGS84 Corp Company)





Comments