Infusionsoft API Calls timing out

I am calling infusionsoft apis in loop to get emails for contacts that we have in our CRM. API calling sequence is like below


I am calling 2 and 3 in loop because we don’t have any direct API to get contact emails, Please let me know if there is any.

The problem now is after certain API calls the request is getting time out or response is not received in time.