How to label a list of vms in Compute Engine without knowing zone before

How to label a list of vms in Compute Engine without knowing zone before? I have around 200 vms with separate zones. I dont have the zone of each vm, just the list of ip addresses. 

The api to update label is this - https://cloud.google.com/compute/docs/reference/rest/v1/instances/setLabels 

Which api to call to get first zone of that vm, then use that zone to update label?

0 0 99