Get google+ reviews using Google Places API - google-maps

I'm trying to debug something very weird.
I want to get reviews using Google Places API from this url:
Henderson Nisan
What I did?
First I search for Google Place ID via this URL
And the result for the Place ID was: ChIJoV7T0hjRyIAR24qv5IfRcWM
Than I fetch all information about Place with the next link:
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=MY_API_KEY
I'm getting those reviews: http://prntscr.com/8q7bsd
Problem is that those reviews which you can see on above printscreen are not corresponding to the reviews that are on the page of Henderson Nisan
Any kind of help will be acceptable. What I miss? Did I use wrong Place ID?
Thanks

I've done what you've done:
searched for Henderson Nissan in https://developers.google.com/places/place-id , the returned place-id was ChIJlfPkKh_RyIARWKYl-XpSyAQ (not ChIJoV7T0hjRyIAR24qv5IfRcWM )
used this place-id to fetch results: https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJlfPkKh_RyIARWKYl-XpSyAQ&key=mykey
the reviews there are related to the particular google+ page
it's not clear how you got the place-ID ChIJoV7T0hjRyIAR24qv5IfRcWM, but it's clear that the detailsRequest to https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=MY_API_KEY uses a completely different place-ID: ChIJN1t_tDeuEmsRUsoyG83frY4 (for Google-Sydney )

Related

Is it possible to build a Google maps url from a lat/lng position to a place id?

I can use this to get directions between 2 lat/lngs:
https://maps.google.com/maps?saddr=0,0&daddr=50,40
And I can use this to view a particular place by place id:
https://www.google.com/maps/place/?q=place_id:PLACE_ID_HERE
Is it possible to do somethig similar to this?
https://maps.google.com/maps?saddr=0,0&daddr=PLACE_ID_HERE
I want to get the directions from any lat/long position to a particular Google place
Thanks to the useful link posted my Mr Upsidedown (its the docs for Google Maps URLs specifically, rather than places/maps API), I found that this is possible by constructing the url like this
https://www.google.com/maps/dir/?api=1&origin=51.315903303198624,-0.5612461159895105&destination=51.5007293621435, -0.1246254894957886&destination_place_id=ChIJ2dGMjMMEdkgRqVqkuXQkj7c
So we need these params in order to achieve it:
origin (lat/lng)
destination (lat/lng)
destination_place_id (placeId)
Following the url above will show directions between the 2 co-ordinates, but will also indicate the actual place we are travelling to (Big Ben), where as excluding the destination_place_id will just try and show the area being travelled to (e.g. Westminster).

Google autocomplete place API not suggesting few popular places

I am using https://maps.googleapis.com/maps/api/place/autocompete?key=MyKey&input=MySearchText api for auto place suggestion , but I am not getting few popular cities in response and the same place I can easily search on google map application. Can anyone please help me on this what I am doing wrong and what can be the reason google place api is not suggesting this location? I am searching for below location :
4 horner square london e1 6ew
Thanks,
When I search the '4 horner square london e1 6ew' with Geocoding API I can get this address.
https://maps.googleapis.com/maps/api/geocode/json?address=4%20horner%20square%20london%20e1%206ew&key=YOUR_API_KEY
The place ID is ChIJs2foBLQcdkgRHljoVNXS89g
The fact that this place doesn't appear in Place autocomplete is really weird. I also have ZERO_RESULTS:
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=4%20horner%20square%20london%20e1%206ew&key=YOUR_API_KEY
I think you have to file an issue in the public issue tracker.

google static maps api returns blue image

I try to get the satellite example to work:
https://developers.google.com/maps/documentation/static-maps/
The url for the request is (with the correct API key...):
https://maps.googleapis.com/maps/api/staticmap?maptype=satellite¢er=37.530101,38.600062&zoom=14&size=640x400&key=API_KEY
This is the result:
Where the expected result is:
I checked the coordinates: 37.530101,38.600062 with google earth and they should bring me to the expected result.
If I look in the google developer console then I can see the requests are made.
If I try this one for example (with the key).
http://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=14&size=512x512&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318&markers=color:red%7Ccolor:red%7Clabel:C%7C40.718217,-73.998284&sensor=false&key=
Then I do get an image.
Why doesn't the first one work?
I got it.
In the url google provides it says:
?maptype=satellite¢er=37.530101,38.600062
Where
¢er
Should be:
&center
I guess someone at google had a hangover.

are plaetze (squares) included in the google places api

I am using the Google Places Api in order to show a list of nearby places to the user. I am trying to include in the list the plaetze (squares) like Paradeplatz in Zurich:
https://maps.google.com/maps?q=Paradeplatz,+Z%C3%BCrich,+Schweiz&hl=el&ie=UTF8&ll=47.36996,8.539225&spn=0.001817,0.004823&sll=37.0625,-95.677068&sspn=34.808514,79.013672&oq=paradeplatz&hq=Paradeplatz,+Z%C3%BCrich,+Schweiz&t=m&z=18
No matter if i include all the supported Places types from here:
https://developers.google.com/places/documentation/supported_types
the Paradeplatz does not appear. Do you have any clue why this is happening?
Paradeplatz does appear in the Places data. Looks like it is in approximately the right place, not sure how to search for only "plaetze".
If you are interested specifically in displaying squares, perhaps try searching via name parameter with a value like Platz (square) instead of using the types parameter. Searching by category (types parameter) might return fewer (or none) results than expected if Google hasn't yet added the actual categories to the items in its Places API database.

The Rotten Tomatoes star rating in Google results

I would simply like to know how to display a star rating taken from individual pages to be displayed in google results ala rotten tomatoes or metacritic or imdb. If you search for 'Drive Rotten Tomatoes' in google it returns a link that also contains a rating % as well as Directed by and staring Actors links.
Where do i insert this information to have similar results. Does it go in the metadata for each page? How does it work?
See Google rich snippets and schema.org - Ratings