Reputation: 83
Now that Google deprecated the user_ratings_total variable in Google Places API, is there a way to get the total number of ratings for a particular business?
I see the answer here user_ratings_total No longer available in google places API. Alternative for getting total number of reviews? , but it suggests using Google My Business API, not Google Places API.
Thanks.
Upvotes: 8
Views: 12119
Reputation: 1
Get total review of Google:
const placeId = "YOUR_PLACE_ID";
const apiKey = "YOUR_GOOGLE_MAPS_API_KEY";
api = `https://maps.googleapis.com/maps/api/place/details/json?place_id=${placeId}&fields=user_ratings_total&key=${apiKey}`
Upvotes: 0
Reputation: 2735
Unfortunately, there's no means to retrieve total user reviews anymore. Below is a list of issue trackers requesting that user_ratings_total
be added. The oldest one appears to date back to 2011.
https://issuetracker.google.com/u/1/issues/35820858
https://issuetracker.google.com/u/1/issues/35821787
https://issuetracker.google.com/u/1/issues/35823510
https://issuetracker.google.com/u/1/issues/35828637
Not only has user_ratings_total
been removed. But there seems to be no explanation as to why it has been removed. Odds are that Google has no interest in fixing the issue.
EDIT: as of 2019, it's now available in the Google Places API. See answers above.
Upvotes: 6
Reputation: 671
As of Jan 2019 it is possible to get the total number of reviews using Place Details APIs call (user_ratings_total field): https://developers.google.com/places/web-service/details#fields
Upvotes: 3
Reputation: 215
Just reporting that this is fixed now. Reposting a comment from the Google Issue tracker:
The total amount of ratings is now generally available for all Places API clients as part of the Basic SKU:
https://developers.google.com/places/web-service/details#fields https://developers.google.com/places/web-service/place-data-fields#basic
Places API: user_ratings_total
Places SDK for Android: Place.Field.USER_RATINGS_TOTAL
Places SDK for iOS: GMSPlaceFieldUserRatingsTotal
Upvotes: 4