Get the google plus URL based on place_id of Googl

2019-06-26 07:22发布

问题:

How can I get the plus.google URL page of the corresponding google place based on the place_id I obtain from the json the maps.googleapis.com/maps/api/place returns?

回答1:

Perhaps you can use the Place Details api using the place_id?

https://developers.google.com/places/documentation/details



回答2:

This seems old post now but wanted to add some more details. 'places' details API provides google plus URL:

Quoting from https://developers.google.com/places/documentation/details:

url contains the URL of the official Google page for this place. This will be the establishment's Google+ page if the Google+ page exists,

You once you have place_id, use:

https://maps.googleapis.com/maps/api/place/details/json?key=your_key&placeid=interested_place_id

And look for 'url' key.

Its a different question if you want to extract details from that page. I do not know if google has API for this.