Get reviews from google map api

I have to get reviews from Google map API. details are on this page.

the details will fetch from this page:-

My problem is I can't find what is reference in request. and how I find this parameter value from my Google plus page.


A more recent way to do this:{place_id}&key={api_key}


  "html_attributions": [],
  "result": {
    "rating": 4.6,
    "reviews": [
        "author_name": "John Smith",
        "author_url": "",
        "language": "en",
        "profile_photo_url": "",
        "rating": 5,
        "relative_time_description": "in the last week",
        "text": "Great time! 5 stars!",
        "time": 1508340655

Reviews are limited to the 5 latest.

For fetching a google review you need reference id for the place.In order to get this reference key you can use google places search api request.

Its response will have reference id which you can use in your request.

    <name>Koshy's Restaurant</name>
    39, St Marks Road,Shivajinagar,Bangalore, Karnataka, 560001, India
    <a href="">Ujaval Gandhi</a>

$reqUri .= '&sensor=false&radius=500';
$reqUri .= '&location=38.908310,-104.784035&name='.urlencode(LOCATION NAME);
$reqUri .= '&keyword='.urlencode(WEBSITE PHONE);

I made it through PHP, Now call like this URL and you get original result with reference key.

Then parse it like:

$data = cURL($reqUri);
$data = json_decode($data);
echo $data ->results[0]->reference;

Hope it will help you

***Note: location=38.908310,-104.784035 this var is not auto you must have it.

Using Python and Google Places APIs, you can retrieve business details and reviews (up to 5 reviews) as follows:

api = GooglePlaces("Your API key")

places = api.search_places_by_coordinate("40.819057,-73.914048", "100", "restaurant")

for place in places:
    details = api.get_place_setails(place['place_id'], fields)
        website = details['result']['website']
    except KeyError:
        website = ""

        name = details['result']['name']
    except KeyError:
        name = ""

        address = details['result']['formatted_address']
    except KeyError:
        address = ""

        phone_number = details['result']['international_phone_number']
    except KeyError:
        phone_number = ""

        reviews = details['result']['reviews']
    except KeyError:
        reviews = []
    print("Name:", name)
    print("Website:", website)
    print("Address:", address)
    print("Phone Number", phone_number)
    for review in reviews:
        author_name = review['author_name']
        rating = review['rating']
        text = review['text']
        time = review['relative_time_description']
        profile_photo = review['profile_photo_url']
        print("Author Name:", author_name)
        print("Rating:", rating)
        print("Text:", text)
        print("Time:", time)
        print("Profile photo:", profile_photo)

For more details about this code and Google Places API, you can check this tutorial:

Need Your Help

What does `{0:X2}` mean in this code sample?


In the below code sample, what does {0:X2} mean? This is from the reflection section of the MCTS Application Development Foundation book (covering dynamic code, etc.).

How to change Firebug' font?

firefox fonts firebug

I liked my Firebug's font on FF3.6 . After installing FF4 and appropriate Firbug 1.7 font has changed. How can I chose font for Firebug?