I've stumbled upon something when using Google's Places API to retrieve info about a place.
When I retrieve the info for one specific place using the Place Details API request, I get a different total rating than when opening the same place (with the same id) using Google Maps.
Why is this?
The only qualification for the API data, clearly stated in the documentation, is that not all but a maximum of five reviews are returned using the API.
I cannot find anything anywhere saying that the API data is not expected to be the same as what is visible in the UI -- and, in fact, in all other cases than this, it has been the same.
Example:
This place has an overall rating of 5.0 based on "19 reviews", of which 17 contain text and 2 just the star ratings.
Using the same ID, here's what the API call returns:
{ html_attributions: [],
result:
{ address_components:
[ [Object], [Object], [Object], [Object], [Object], [Object] ],
adr_address:
'Chandlery Building, Hamble Point Marina, <span class="street-address">School Lane, Hamble</span>, <span class="extended-address">Hamble-le-Rice</span>, <span class="locality">Southampton</span> <span class="postal-code">SO31 4NB</span>, <span class="country-name">UK</span>',
business_status: 'OPERATIONAL',
formatted_address:
'Chandlery Building, Hamble Point Marina, School Lane, Hamble, Hamble-le-Rice, Southampton SO31 4NB, UK',
formatted_phone_number: '023 8045 7008',
geometry: { location: [Object], viewport: [Object] },
icon:
'https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png',
international_phone_number: '+44 23 8045 7008',
name: 'Inspiration Marine Group Ltd',
opening_hours: { open_now: false, periods: [Array], weekday_text: [Array] },
photos: [ [Object], [Object], [Object], [Object] ],
place_id: 'ChIJQ0_yxRpwdEgRziRrjoX0cUM',
plus_code:
{ compound_code: 'VM2P+CV Southampton, UK',
global_code: '9C2WVM2P+CV' },
rating: 4.9,
reference: 'ChIJQ0_yxRpwdEgRziRrjoX0cUM',
reviews: [ [Object], [Object], [Object], [Object], [Object] ],
types: [ 'point_of_interest', 'store', 'establishment' ],
url: 'https://maps.google.com/?cid=4859934327366689998',
user_ratings_total: 19,
utc_offset: 0,
vicinity:
'Chandlery Building, Hamble Point Marina, School Lane, Hamble, Southampton',
website: 'http://www.inspirationmarine.co.uk/' },
status: 'OK' }