Retrieve Google place id using Google+ URL - google-places-api

I am looking for a way to retrieve a place_id with just a url to a business like so. I have the URL, which has a google plus ID inside the URL string, but I need the place id. I've tried searching via Google+ People:Get, which returns the business, but not the place id. I've searched extensively through the Places API for a solution, and have found nothing.
Is this possible through Google's APIs? They have two separate references and ids to the same place, and I'm not really sure why. I feel like it should be possible, and maybe I'm just missing something.

Related

Google People API: Any relation between Metadata and resourceName on a Person object

When use new Google People API to get a Person object, is there a relation between Person.Metadata.Sources[0].id and Person.ResouceName? like the resouceName is calculated from the Person.Metadata.Sources[0].id
The reason why I asked this is in the old Google Contacts API, we store the contact URL like https://www.google.com/m8/feeds/contacts/[email]/full/3c8fcc428ca19658 which I noticed the suffix string 3c8fcc428ca19658 is the same as the Person.Metadata.Sources[0].id in new Google People API, so we can easily know the old URL match which resouceName?
Yes, you can calculate a resourceName from a contact-ID but it's not documented and cannot be trusted to work, however a Google engineer privately guaranteed this should work in the next month.
See original answer here: https://stackoverflow.com/a/46355535/819355
and discussion in comments here: Is there any way to get Google People API resource ID from Google Contacts contact Id?

Searching for Google+ Attachment

Google plus allows for the sharing of a url; and this gets added an activity as an attachment in the activity data. Is there a way when using Activities.Seach() to target the search to the attachment url? I can share a url on g+ and if the url is part of the comment of my post then I can then pull that post when using the activities.search; however if the url is only contained in the attachment, I can't pull any activities with that url. Is there something I'm missing? Any suggestions?
This is actually a known issue with google plus, one that has been requested quite a bit from the development community. https://code.google.com/p/google-plus-platform/issues/detail?id=57
The only real option at this time it to get an aggregate count of +1s and shares as shown here: http://www.helmutgranda.com/2011/11/01/get-a-url-google-count-via-php/

Possible to post URL and phone number to Google Places via API?

at www.movylo.com we're trying to integrate Google Places. We let merchants create a mobile store and want to post the store via APIs to Google Places. IT seems we can't post more than name of direction, so not possible to send URL, phone number, ...Anyone can help?
I looked into the same thing in the past but it looks like the only items you can add are the location, name and type, at least for now that is.

Trying to get Google Plus comments for an activity

I've been trying to use the Google Plus API (how they managed to make this difficult is beyond me), and I'm trying to get all of a user's comments (or at least the most recent ones).
Unfortunately, Google has decided to make this inaccessible through one call, so I've been trying to access all of a user's activities, and the list of comments for each. To do this, I've been using the google_plus gem.
I can pull up a user, no problem. However, for each user I pull up, their activities seem to be nil. Moreover, if I try to fetch an activity by id, that also returns nil. For example, I've tried to hit this activity using an id of 107200121064812799857, but I get nothing.
I've even tried using Google's API testing tool to try to hit this activity (using the aforementioned ID), and it can't even seem to find it.
Can someone explain what's going on here? Maybe I'm not using the right ID, or something.
I've even tried using Google's API testing tool to try to hit this activity (using the aforementioned ID)
The comments.list API requires an activity id, but you're passing the Google+ profile id.
You will need to pass a valid activity id when using the comments.list api.
For this post on Google+: https://plus.google.com/107200121064812799857/posts/GkyGQPLi6KD
The user id is: 107200121064812799857
The activity id (used by the API) is: z13qd5zouuebcpauy23tuftwdsylxflvs
Here's how you can list comments for that activity id:
https://developers.google.com/apis-explorer/#p/plus/v1/plus.comments.list?activityId=z13qd5zouuebcpauy23tuftwdsylxflvs&alt=json

Google Places API Email/Website

Is there a way to get Email/Website of a particular place using Google Places API? If this is not possible is there a way other than using Google API?
To retrieve a places website address using Google Places API, you could perform a Places Autocomplete Request with the input parameter value set to the name of the place: e.g.input=Amoeba
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Amoeba&sensor=false&key=your_api_key
Then using the reference from the response you could perform a Places Details Request: e.g.
reference=ClRMAAAAVzPUTLym999EXs4mKkpTqEmzX0a2kfXCUs4enTvWMHDd06VLvlzsGOdfrRd2QvkiRWs4sNkraAAJlMdytt4O4kYGoJZn4ENL5Ig5QYyeJmMSECDOGMO1MnDFtqzdqD8oDk0aFJr8_s-Y946QOz24YubPUsmoC2vl
https://maps.googleapis.com/maps/api/place/details/json?reference=ClRMAAAAVzPUTLym999EXs4mKkpTqEmzX0a2kfXCUs4enTvWMHDd06VLvlzsGOdfrRd2QvkiRWs4sNkraAAJlMdytt4O4kYGoJZn4ENL5Ig5QYyeJmMSECDOGMO1MnDFtqzdqD8oDk0aFJr8_s-Y946QOz24YubPUsmoC2vl&sensor=false&key=you_api_key
This would return the details for Amoeba including if available, the parameter website which would contain the places website address.
Google Places API provides Details requests and responses using your API key.
The tag allows for the google places url for that places
e.g.
http://maps.google.com/maps/place?cid=10704550479004381649
If you wish to harvest website, fax and opening hours information, it can only be done here.
There is no direct api in the Google Places API that will provide that info.
Just as addressComponents are part of the Details response, i assume tags will be added to the Place Details responses from the API to address this problem.
I have been trying to use Google Places API, and I have successful queries, fetching Places details, which has all the address information for the place I want to find, but ironically, there is NO WEBSITE attribute in the returned JSON!
The first version of Local search was MUCH better, and always accurate for searches when you know the business name.

Resources