Detailed place information from google maps api [duplicate] - google-maps

When you search for a restaurant in Google places and go to the business profile (i.e.:
https://plus.google.com/107507038669791289691/about?hl=en) the restaurant has a tag (in this case Mexican Restaurant). But when using the Google places api all I can see is a types list
"types" : [ "restaurant", "food", "establishment" ]
Anyone know if it's possible to get the tag "Mexican Restaurant" somehow?
I know about the supported types (https://developers.google.com/places/documentation/supported_types). It is not super helpful.

I was also working in a project which need to get more details about a place using Google Maps and Google Places APIs, and I really spent many hours trying to find something that can help ( Google Places API, Google Maps API, google+ APIs, ... ) but nothing ... the only things that I found is theses 2 issues ( feature requests ) which I hope that Google will add to their APIs someday :
Issue N° 5260 with 13 stars.
Issue N°7878 with 4 stars.
I hope with this SO question that we get more interested persons to get the feature in a soon future version of Google Map or Google Places APIs.
For the Google Places for Work API, I didn't find any information to confirm or not that it contains such feature, but I don't think so.
Hope that can help.

I think you would probably have to revert to the text search method on the api..
https://developers.google.com/places/documentation/search#TextSearchRequests
So your request would end up looking something like the below, restricted down to a specific area
https://maps.googleapis.com/maps/api/place/textsearch/json?query=Mexican+Restaurant&sensor=true&location=40.846,-73.938&radius=20&key=yourKeyHere
However this will return all other Mexican restaurants in the area, so if you just want to return the one result I would use the Place Details request instead.

Separate your place types by PIPE symbol "|"
try like this :
String types = "cafe|restaurant|museum" // Listing places only cafes, restaurants and museums.

Related

Google Maps API - Number of customers for places

I'm reading the documentation of GM-APIs, I found the section relative to "Places", but I can't find anything to get the information about the per-hour number of customers for a certain place.
Do you know whenever you search a place on GMaps, there is an indication of the frequency of customers, in that way you can know if the place will be busy or empty.
Is there any way to retrieve that information through Google Maps API?
Currently, there is no available feature in Google Maps API that could get the exact number or the of people in an establishment to determine its busiest time of the day.
However, there is an existing Feature Request in Google Map Platform's Public issue tracker to expose the place's popular times which seems to be related to the feature you are looking for.
Here's the link to that feature request: https://issuetracker.google.com/35827350. You can star/favorite this feature request and feel free to leave a comment there regarding your use case for additional information as well.

Google Places API - downloading user reviews and star ratings

TL;DR - I need help using Google Places API to download star ratings and user reviews of multiple stores and I am too dumb to figure out what I am suppose to be doing. Please help!
For the life of me, this has been hard to find any sort of useful info or documentation in terms of trying to download user ratings and star reviews from multiple locations. Just to give you a bit of info, I work for a company that has three major brands with over 500 stores across the country. We have multiple listings and our senior stakeholders are wanting to get their hands on what our customers are saying about our brand and particularly see who are top performing stores are (and who are NOT are top performers) in the form of star ratings and user reviews.
Now to get those sorts of insights is pretty easy to do for one location, but for multiple? It seems Google doesn't have that feature on hand.
According to the Google Community, I would need to use Google My Business API (see thread 1) However Google Support told me that for what I am looking to do required Google Places API. So after heading over there, I found this which makes this the most possible way I can get what I need Google Places API
Now I am stuck at the part about loading libraries. Darnit, surely there is a way I can just make an API request to get what I want, no?
I am throwing myself on the mercy of you smart people (I have the basic knowledge and I am a person who learns by doing) so your assistances will be deeply appreciated.
Using Places API web service you can get up to 5 reviews when you execute a place detail request. Rating is also available in the response.
Please have a look at the documentation:
https://developers.google.com/places/web-service/details#PlaceDetailsResults
Currently, there is no way to get more than 5 reviews in Places API. You can see a feature request in the public issue tracker, however, it looks like Google didn't set a high priority on this task:
https://issuetracker.google.com/issues/35825957
If you are the owner of the place in Google My Business, you can use Google My Business API to retrieve a list of all reviews for your place:
https://developers.google.com/my-business/content/review-data
Hope it helps!

Google Places API search for only carparks (not bikeparks)

I'm trying to get parking places around a venue by using the Google Places API (https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=52.364119,4.870929&type=parking&rankby=distance&key=MYKEY.
I get back a results with parkings for cars and also with parking for bikes. I cannot find any difference in de details to make a distinction between both.
On the other hand when I lookup thise places on Google Maps it says that de car-parking is a Parking and the bike-parking is indicated as a Bikeparking.
Anyone knows how to do this?
There is a feature request in the public issue tracker. Please have a look at issue 5260 where this problem was raised.
It looks like Google is working on it, however they don't expose any ETA.
Please star this public issue to add your vote and receive future updates from Google.

How do I get a direct link to a place on google maps with the Place Id

I have the Place Id of a place on google maps in my app. Is there a way to put the place Id in a URL and have it directly link to the page? Or does it have to be done through the URL?
I can't seem to find anything detailing this in the docs. I've tried below, but it just gets me the standard google maps page:
https://maps.google.com/maps?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4
Recently, in May 2017, Google launched the new Google Maps URLs API. You can read about this API in the official documentation
https://developers.google.com/maps/documentation/urls/guide
So, from now on you can construct a URL for Google Maps using the place ID. In your particular case this URL will be
https://www.google.com/maps/search/?api=1&query=Google&query_place_id=ChIJN1t_tDeuEmsRUsoyG83frY4
Hope this helps!
Not directly, using the placeID you can get a variety of information in JSON or XML format, among them there are also the lat lng of the place and its address with which you can easily locate the map
google developer doc
The URL for a specific Google Place is returned by the places details API endpoint.
If for example you query:
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJV2BQ4laeekgRFauLvdXbFXE&key=YOUR_API_KEY
You will see that in the returned JSON there is a key 'url' which points to https://maps.google.com/?cid=8148660811851344661
The correct format, at this time, to produce a general link that goes directly to correct google place is: https://maps.google.com/?cid=[place_id]&t=[maptype]
The map type parameter "t" is apparently necessary. Without it, google maps seems to perform a more general search when the link opens that is sometimes successful and sometimes not. With it, maps opens to correct place each time whether it opens in browser or in app on mobile.
Set this parameter to "m" for a street map and "k" for a satellite map.
A lot of answers on SO show the following syntax which often pulls unwanted results if two locations of the same name are nearby e.g.:
https://www.google.com/maps/place/Starbucks/#43.088554,-88.06579,17z/
If you are already using google places api, then you have the place_id, so i recommend using it to avoid ambiguity.

Is there any Google API to check if an input is a city or not?

Is there any Google API / classes, that can be used to check if a text input is a city or not a city?
I'm developing a real estate iOS app. My app uses GoogleMapSDK for iOS v1.8.1.
if you are just after US cities , there are many places on the internet that you can get every city and zip code for free - like the US Post Office. If you can't store all that or don't want to and really want to use Google - then the exact API you are looking for does not exist. BUT you can actually get the info you want out of the Google API, it will just take some work. It is easy to send the input to Google Geocoding API, then parse the response and see if the response city matches what the user entered. I know... this is not ideal, but there are ways to make it look like it's working the way you want from the user's point of view even though the exact API doesn't exist.
Use place/autocomplete/json API:
It gives a list of response based on query
Simply add "types=(cities)" to your query and Google will return you a list of cities
Use geocode/json API
Good tool to get GPS location from an address (eg. New York)
Simply check the "types" field returned from API, check if it's "locality" or "administrative_area_level_3"
Note: two exceptions are Hong Kong and Macau, MO both are treated as "country" but they are cities