Learn R Programming

googleway (version 2.0.0)

google_place_details: Google place details

Description

Once you have a place_id from a Place Search, you can request more details about a particular establishment or point of interest by initiating a Place Details request. A Place Details request returns more comprehensive information about the indicated place such as its complete address, phone number, user rating and reviews.

Usage

google_place_details(place_id, language = NULL, simplify = TRUE, key)

Arguments

place_id

string A textual identifier that uniquely identifies a place, usually of the form ChIJrTLr-GyuEmsRBfy61i59si0, returned from a place search

language

string The language code, indicating in which language the results should be returned, if possible. Searches are also biased to the selected language; results in the selected language may be given a higher ranking. See the list of supported languages and their codes https://developers.google.com/maps/faq#languagesupport

simplify

logical Indicates if the returned JSON should be coerced into a list

key

string A valid Google Developers Places API key

See Also

google_places

Examples

Run this code
# NOT RUN {
## search for a specific restaurant, Maha, in Melbourne, firstly using google_places()
res <- google_places(search_string = "Maha Restaurant, Melbourne, Australia",
                     radius = 1000,
                     key = key)

## request more details about the restaurant using google_place_details()
google_place_details(place_id = res$results$place_id, key = key)

# }

Run the code above in your browser using DataLab