place_details.Rd
The /places/{placeId}
request returns details for a place.
Usage
place_details(
place_id,
requested_fields,
icon = NULL,
token = arc_token(),
.progress = TRUE
)
Arguments
- place_id
a character vector of place IDs as generated by
within_extent()
ornear_point()
.- requested_fields
Required. See API Reference for possible fields or refer to the
fields
vector.- icon
Default
NULL
. Must be one of"svg"
,"png"
"cim"
. Determines whether icons are returned and the type of icon to use with a place or category.- token
an object of class
httr2_token
as generated byauth_code()
or related function- .progress
Default
TRUE
. Whether a progress bar should be provided.
Details
To request details, you use the requested_fields
argument to specify the fields and the attributes you want from the Place, Address, Details and/or Location price groups.
It is always recommended to specify the fields you want, however, you can also use requested_fields=all
to return all of the attributes available. By default, The place_id
attribute is always returned in addition to the other attributes you requested.
The attributes available for places may vary. For example, opening hours may not be available (or applicable) for geographic places or landmarks.
You will only be charged for attributes that contain valid values for the requested fields. If no data is available for the requested field, null or an empty collection is returned and you are not charged. You are only charged once if one or more attributes with valid values are returned from a price group.
Examples
if (FALSE) {
place_ids <- c(
"37f1062ae1c3d37511003e382b08ca32",
"9cdd210841deedef0e3309bdd3fe47f1"
)
res <- place_details(place_ids)
}