Android - Google Places API - No “reviews” Array

后端 未结 3 1858
没有蜡笔的小新
没有蜡笔的小新 2020-12-22 07:39

So I\'m running the following Google Places API call:

https://maps.googleapis.com/maps/api/place/search/json?location=34.0467359,-118.441764&rankby=distanc

相关标签:
3条回答
  • 2020-12-22 07:43

    Allright the problem is that place API doesen't include reviews. But if u want to get reviews then u have to make place detail request.

    eg: this is sample place request

    https://maps.googleapis.com/maps/api/place/nearbysearch/json?
    location=34.0467359,-118.441764&radius=1000&sensor=true
    &key=YOUR_PLACE_API_KEY&types=restaurant
    

    this is sample place details request

    https://maps.googleapis.com/maps/api/place/details/json?
    reference=REFERENCE_STRING_OF_THE_PLACE&sensor=true&key=YOUR_PLACE_API_KEY
    
    0 讨论(0)
  • 2020-12-22 07:55

    Instead of search use near by search as follows:-

    and also include radius :

     https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=34.0467359,-118.441764&radius=50000&sensor=true&key=MY_API_KEY&types=restaurant
    
    0 讨论(0)
  • 2020-12-22 08:00

    You can get review array by place detail API

    https://maps.googleapis.com/maps/api/place/details/json?placeid={place_id}&key={api_key}

    where place id is results id field from your response,

    Ex. "id" : "03ed19ca32b20080897e31095e6eed2715cde819",

    0 讨论(0)
提交回复
热议问题