how to get total number of reviews from google reviews

爱⌒轻易说出口 提交于 2019-12-14 00:51:34

问题


With the google places api, it is possible to get details related to user reviews of a place. Looking at the documentation and it seems that I can get the following details:

  • rating: 0-5 based on user rates and this is the average of all submitted reviews
  • last 5 user ratings

However, there doesn't seem to be any reference to

  • total number of reviews
  • count total for each rating ie, 5/5: 5 reviews, 4/5: 23 reviews, ...

Anyone have an idea on where to get this information?


回答1:


There is a new, yet to be documented, details result key user_ratings_total. I believe this is the number of ratings that have contributed to the overall rating.

I don't believe the API currently provides count totals for each rating value. You could request this enhancement (if it hasn't been already) at gmaps-api-issues.




回答2:


it is possible now to get total number of reviews using Place Details Place APIs call: https://developers.google.com/places/web-service/details#fields

as of Jan 2019, it returns user_ratings_total field: https://developers.google.com/maps/documentation/javascript/releases#335



来源:https://stackoverflow.com/questions/21941648/how-to-get-total-number-of-reviews-from-google-reviews

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!