nominatimlite

July 11, 2026 · View on GitHub

CRAN
status CRAN
results Downloads Nominatim-version R-CMD-check codecov CodeFactor r-universe Project Status: Active – The project has reached a stable, usable
state and is being actively
developed. DOI status

nominatimlite provides a lightweight interface to the Nominatim API. It supports free-form and structured address searches, reverse geocoding, amenity lookup and address lookup by OpenStreetMap (OSM) object identifier. Results are returned as tibbles or sf objects.

The full site with examples and vignettes is available at https://dieghernan.github.io/nominatimlite/.

What is Nominatim?

Nominatim searches OpenStreetMap data by name and address (geocoding) and reverse geocodes geographic coordinates.

Why nominatimlite?

nominatimlite accesses the Nominatim API without requiring the curl package. This makes the package useful in environments where curl is not available. API requests use base R functions instead.

Related packages provide broader interfaces to geocoding services and OpenStreetMap data:

Installation

Install nominatimlite from CRAN:

install.packages("nominatimlite")

See the documentation for the development version at https://dieghernan.github.io/nominatimlite/dev/.

You can install the development version of nominatimlite with:

pak::pak("dieghernan/nominatimlite")

Alternatively, you can install nominatimlite using the r-universe:

# Install nominatimlite in R:
install.packages(
  "nominatimlite",
  repos = c(
    "https://dieghernan.r-universe.dev",
    "https://cloud.r-project.org"
  )
)

Usage

sf output

Use functions with the _sf suffix to return results as sf objects:

library(nominatimlite)

# Search for Pizza Hut locations in California.

CA <- geo_lite_sf("California", points_only = FALSE)

pizzahut <- geo_lite_sf(
  "Pizza Hut, California",
  limit = 50,
  custom_query = list(countrycodes = "us")
)

library(ggplot2)

ggplot(CA) +
  geom_sf() +
  geom_sf(data = pizzahut, col = "red")

Pizza Hut locations in California returned by nominatimlite.

Set points_only = FALSE to return polygon and line geometries when they are available from the Nominatim API:

# A building, returned as a polygon.
sol_poly <- geo_lite_sf("Statue of Liberty, NY, USA", points_only = FALSE)

ggplot(sol_poly) +
  geom_sf()

Statue of Liberty geometry returned by nominatimlite.

# Default, returned as a point.
dayton <- geo_lite_sf("Dayton, OH")
# A US state, returned as a polygon.
ohio_state <- geo_lite_sf("Ohio, USA", points_only = FALSE)
# A river, returned as a line.
ohio_river <- geo_lite_sf("Ohio river", points_only = FALSE)

ggplot() +
  geom_sf(data = ohio_state) +
  geom_sf(data = dayton, color = "red", pch = 4) +
  geom_sf(data = ohio_river, color = "blue")

Different features named Ohio returned by nominatimlite.

Address search and reverse geocoding

The examples in this section are adapted from the tidygeocoder package.

Use geo_lite() to search for addresses with free-form queries:

# Create a data frame with addresses.
some_addresses <- dplyr::tribble(
  ~name, ~addr,
  "White House", "1600 Pennsylvania Ave NW, Washington, DC",
  "Transamerica Pyramid", "600 Montgomery St, San Francisco, CA 94111",
  "Willis Tower", "233 S Wacker Dr, Chicago, IL 60606"
)

# Geocode the addresses.
lat_longs <- geo_lite(
  some_addresses$addr,
  lat = "latitude",
  long = "longitude",
  progressbar = FALSE
)

By default, geo_lite() returns the query, latitude, longitude and address columns. Set full_results = TRUE to return all available fields from the Nominatim API.

querylatitudelongitudeaddress
1600 Pennsylvania Ave NW, Washington, DC38.89764-77.03655White House, 1600, Pennsylvania Avenue Northwest, Ward 2, Washington, District of Columbia, 20500, United States
600 Montgomery St, San Francisco, CA 9411137.79519-122.40279Transamerica Pyramid, 600, Montgomery Street, Financial District, South of Market, San Francisco, California, 94111, United States
233 S Wacker Dr, Chicago, IL 6060641.87874-87.63596Willis Tower, 233, South Wacker Drive, Financial District, Loop, Chicago, South Chicago Township, Cook County, Illinois, 60606, United States

Table 1: Geocoded addresses.

Use reverse_geo_lite() to reverse geocode latitude and longitude coordinates. The lat and long arguments use the results from the address search above. The address argument specifies the name of the output column that contains each single-line address.

reverse <- reverse_geo_lite(
  lat = lat_longs$latitude,
  long = lat_longs$longitude,
  address = "address_found",
  progressbar = FALSE
)
address_foundlatlon
White House, 1600, Pennsylvania Avenue Northwest, Ward 2, Washington, District of Columbia, 20500, United States38.89764-77.03655
600, Montgomery Street, Financial District, South of Market, San Francisco, California, 94111, United States37.79541-122.40257
SkyDeck Chicago Willis Tower, 233, South Wacker Drive, Financial District, Loop, Chicago, South Chicago Township, Cook County, Illinois, 60606, United States41.87850-87.63589

Table 2: Reverse-geocoded addresses.

See the Nominatim search API documentation for additional parameters to pass to custom_query.

Citation

Hernangómez D (2026). nominatimlite: Interface to the Nominatim API. doi:10.32614/CRAN.package.nominatimlite. https://dieghernan.github.io/nominatimlite/.

A BibTeX entry for LaTeX users is shown below.

@Manual{R-nominatimlite,
  title = {{nominatimlite}: Interface to the {Nominatim} {API}},
  doi = {10.32614/CRAN.package.nominatimlite},
  author = {Diego Hernangómez},
  year = {2026},
  version = {0.6.0.9000},
  url = {https://dieghernan.github.io/nominatimlite/},
  abstract = {Provides a lightweight interface to the Nominatim API <https://nominatim.org/release-docs/latest/>. It supports free-form and structured address searches, searches for addresses from coordinates, amenity lookup and address lookup by OpenStreetMap object identifier. It returns results as tibble data frames or sf objects.},
}

References

Cambon, Jesse, Diego Hernangómez, Christopher Belanger, and Daniel Possenriede. 2021. “tidygeocoder: An R Package for Geocoding.” Journal of Open Source Software 6 (65): 3544. https://doi.org/10.21105/joss.03544.

Hernangómez, Diego. 2024. arcgeocoder: Geocoding with the ArcGIS REST API Service. Version 0.1.0. https://doi.org/10.5281/zenodo.10495365.

Padgham, Mark, Robin Lovelace, Maëlle Salmon, and Bob Rudis. 2017. “osmdata.” Journal of Open Source Software 2 (14): 305. https://doi.org/10.21105/joss.00305.