Right now, we have a flow, where we import Google reviews on sign up and then update them daily. We get the user's company name and location address:
$requestUri = 'https://maps.googleapis.com/maps/api/place/autocomplete/json?key={key}&input=A Closer Look Residential Inspections, LLC, 9230 Fowler Ln, Lanham, MD 20706, United States';
From autocomplete we can get placeId and search for reviews by placeId:
$requestUri = 'https://maps.googleapis.com/maps/api/place/details/json?key={key}&place_id=ChIJmyUG8bfBt4kRqqn8jPZYhDo';
And this worked fine.
Issue
We have a new user which dont have location address, so we can't get placeId. The user has reviews on Google if to search for them in the search bar.
Company name is: "Westside Home Inspections Inc.". Google Map shows that they works in whole LA (not address, but area). Then i tried to get a placeId here: https://developers.google.com/maps/documentation/places/web-service/place-id . But with no luck.
Question:
Is this possible to get Google reviews only by company name?
CodePudding user response:
If company has no address, then it's SAB (service area business).
And looks like Google Places API excluded support for SABs from their Places Api:
The Places API team has reviewed this feature request and decided against including Service Area Businesses results in API responses. Places API mission is to enable developers to help users find relevant places to visit. Since Service Area Businesses are not places users can visit, and therefore do not belong in the Places API.
More details here: https://issuetracker.google.com/issues/35828187#comment20
And if to get reviews we need to use placeId, then its not possible to get reviews.
Answer: No, its not possible to get Google reviews for SAB, because Google removed support of SAB in Google Places Api.
PS: I think, it's possible that we can get reviews for SAB in the "Google Business Profile", but this is not our case and is a different story.
Thanks to @MrUpsidown for helpful link in comments.