I am using the Google Maps API to get the reviews and ratings for a company.
Step 1: HTTP Request to get the reference Id.
$url = \'https://maps.googleap
Currently, Google provides up to five results only, they mentioned it in their documentation. If you want to get reviews for your own property/place or business you can go for my business but I think they made that API closed one.
Edit: If you still want to fetch all reviews you can use an HTML parser and parse all the reviews(i don't know about Google's data policy, but you can definitely scrape everything from a site)
You should need to use the Google My Business API if you want to get all the reviews.
It's another different API, and you should request from Google the property of the place.
https://developers.google.com/my-business/content/review-data#list_all_reviews
Other simple method to get the 5 last rewiews with the place_id of the location (you can find it here : https://developers.google.com/places/place-id)
$url = "https://maps.googleapis.com/maps/api/place/details/json?key=Yourkey&placeid=YourplaceID";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($ch);
$res = json_decode($result,true);
$reviews = $res['result']['reviews'];