If I have a list of Google Place IDs, is there a way to loop through them in one session and get details without calling the API multiple times? For example, I read from a database that has 200 rows. I loop through them and use the google place ID for each one, and use the code below to get details.
Problem is, it creates 200 API calls on each page load. Is there a way to batch them somehow?
$ch = curl_init();
/curl_setopt($ch, CURLOPT_URL,
"https://maps.googleapis.com/maps/api/place/details/json?&key=[API-
KEY]&placeid=$GooglePlacesId&callback=?");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$array = curl_exec($ch);
$json = json_decode($array, true);
$open_now = $json["result"]["opening_hours"]["open_now"];