I am using the Google Places API with Python to build a collective intelligence app for food. e.g. what restaurants are around, what ratings they have, what are their timings, etc.
I am doing the following in Python:
from googleplaces import GooglePlaces, types, langAPI_KEY = ''google_places = GooglePlaces(API_KEY)query_result = google_places.nearby_search(location='Mumbai', keyword='Restaurants',radius=1000, types=[types.TYPE_RESTAURANT])if query_result.has_attributions:print query_result.html_attributionsfor place in query_result.places:print place.nameprint place.geo_locationprint place.place_id
And it returns me something like this:
Subway
{u'lat': Decimal('19.1156005'), u'lng': Decimal('72.9090715')}
ChIJV2JWaObH5zsRt-FrEb8lrtM
Aroma's Cafe
{u'lat': Decimal('19.116867'), u'lng': Decimal('72.90982199999999')}
ChIJSWijB-bH5zsRVLE5ipsxvHU
Chili's
{u'lat': Decimal('19.1161942'), u'lng': Decimal('72.90909789999999')}
ChIJ4_2UcubH5zsRWMemt2WTsLc
Mainland China
{u'lat': Decimal('19.1154358'), u'lng': Decimal('72.90858159999999')}
ChIJ88dcaObH5zsRWLT4KyCLkI8
The Yellow Chilli
Now I want to have the details of each restaurant (like their ratings, reviews, timings). How can the information be retrieved with place_id
?