% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geo-lite.R
\encoding{UTF-8}
\name{geo_lite}
\alias{geo_lite}
\title{Search for addresses with free-form queries}
\usage{
geo_lite(
  address,
  lat = "lat",
  long = "lon",
  limit = 1,
  full_results = FALSE,
  return_addresses = TRUE,
  verbose = FALSE,
  nominatim_server = "https://nominatim.openstreetmap.org/",
  progressbar = TRUE,
  custom_query = list()
)
}
\arguments{
\item{address}{A character vector of single-line addresses, for example
\code{"1600 Pennsylvania Ave NW, Washington"} or
\code{c("Madrid", "Barcelona")}.}

\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{limit}{A positive integer specifying the maximum number of results to
return per query. Nominatim returns at most 50 results per query.}

\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{progressbar}{A logical value indicating whether to display a progress
bar when processing multiple queries.}

\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{
Searches for addresses supplied as a character vector and returns matching
results as a \link[dplyr:tibble]{tibble}. Use \code{\link[=geo_lite_sf]{geo_lite_sf()}} to return an
\code{\link[sf:st_sf]{sf}} object instead.

This function performs the \strong{free-form address search} described in the
\href{https://nominatim.org/release-docs/latest/api/Search/}{API endpoint}.
}
\details{
See \url{https://nominatim.org/release-docs/latest/api/Search/} for additional
parameters to pass to \code{custom_query}.
}
\examples{
\dontshow{if (nominatim_check_access()) withAutoprint(\{ # examplesIf}
\donttest{
geo_lite("Madrid, Spain")

# Search for multiple addresses.
geo_lite(c("Madrid", "Barcelona"))

# Restrict the search to the United States and return all fields.
geo_lite(c("Madrid", "Barcelona"),
  custom_query = list(countrycodes = "US"),
  full_results = TRUE
)
}
\dontshow{\}) # examplesIf}
}
\seealso{
\code{\link[=reverse_geo_lite]{reverse_geo_lite()}} for reverse geocoding coordinates,
\code{\link[=geo_address_lookup]{geo_address_lookup()}} for looking up known OpenStreetMap identifiers and
\code{\link[=geo_amenity]{geo_amenity()}} for searching amenities within a bounding box.

Address search functions:
\code{\link[=geo_lite_sf]{geo_lite_sf()}},
\code{\link[=geo_lite_struct]{geo_lite_struct()}},
\code{\link[=geo_lite_struct_sf]{geo_lite_struct_sf()}}
}
\concept{geocoding}
