% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geo-address-lookup.R
\encoding{UTF-8}
\name{geo_address_lookup}
\alias{geo_address_lookup}
\title{Look up OpenStreetMap objects}
\usage{
geo_address_lookup(
  osm_ids,
  type = c("N", "W", "R"),
  lat = "lat",
  long = "lon",
  full_results = FALSE,
  return_addresses = TRUE,
  verbose = FALSE,
  nominatim_server = "https://nominatim.openstreetmap.org/",
  custom_query = list()
)
}
\arguments{
\item{osm_ids}{A numeric vector of OSM identifiers, for example
\code{c(12345, 67890)}.}

\item{type}{A character vector containing the OSM object type associated
with each value in \code{osm_ids}. Possible values are node (\code{"N"}), way
(\code{"W"}) and relation (\code{"R"}). A single value is recycled.}

\item{lat}{A character string specifying the name of the latitude column in
the output. Defaults to \code{"lat"}.}

\item{long}{A character string specifying the name of the longitude column
in the output. Defaults to \code{"lon"}.}

\item{full_results}{A logical value indicating whether to return all
available fields from the Nominatim API. If \code{FALSE}, only query metadata,
location data and requested address columns are returned.}

\item{return_addresses}{A logical value indicating whether to include
single-line addresses in the results.}

\item{verbose}{A logical value indicating whether to display detailed
messages in the console.}

\item{nominatim_server}{A character string specifying the base URL of the
Nominatim server. Defaults to
\code{"https://nominatim.openstreetmap.org/"}.}

\item{custom_query}{A named list of additional API parameters, for example
\code{list(countrycodes = "US")}. See \strong{Details}.}
}
\value{
A \code{\link[dplyr:tibble]{tibble}} with the results that match the query.
}
\description{
Looks up addresses and other details for one or more OpenStreetMap (OSM)
objects, such as nodes, ways or relations. Results are returned as a
\link[dplyr:tibble]{tibble}. Use \code{\link[=geo_address_lookup_sf]{geo_address_lookup_sf()}} to return an
\code{\link[sf:st_sf]{sf}} object instead.
}
\details{
See \url{https://nominatim.org/release-docs/latest/api/Lookup/} for additional
parameters to pass to \code{custom_query}.
}
\examples{
\dontshow{if (nominatim_check_access()) withAutoprint(\{ # examplesIf}
\donttest{
ids <- geo_address_lookup(osm_ids = c(46240148, 34633854), type = "W")

ids

several <- geo_address_lookup(c(146656, 240109189), type = c("R", "N"))
several
}
\dontshow{\}) # examplesIf}
}
\seealso{
\code{\link[=geo_lite]{geo_lite()}} for finding objects when their OSM identifiers are unknown.

Address lookup functions:
\code{\link[=geo_address_lookup_sf]{geo_address_lookup_sf()}}
}
\concept{lookup}
