Reputation: 10191
I learned that if I search Google Maps with a certain keyword I get hits of Place IDs that seem to fit the keyword I entered. Now I wondered if it is possible to get all information stored to a certain Google Maps Place ID like for example ChIJk5rNr3KuEmsRwWgFX9zzBaQ
. Preferably in JSON format.
Is that possible with the Google Maps API v3?
Edit: I found the possibility to get a list for certain information by doing this request
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=cruise&key=YOUR_API_KEY
but there are definitely not all information listed.
Upvotes: 0
Views: 4732
Reputation: 5383
If you are using Google Places API itself, your docs reference is here. Example:
https://maps.googleapis.com/maps/api/place/details/json?placeid=PLACE_ID&key=YOUR_API_KEY
If you are using PlacesService of Google Maps JS API, check these docs (section "Demos and sample code", tab "PLACE DETAILS"). Example:
var service = new google.maps.places.PlacesService(map);
var request = {
placeId: PLACE_ID
};
service.getDetails(request, function (place, status) {
if (status == google.maps.places.PlacesServiceStatus.OK) {
console.log(place);
}
});
Upvotes: 3