Fix Amazon API script

It works ok but if I put more than about 300-400 in the file it usually stops and won’t finish. So I have had to split the files up. I rather not though.
It’s possible that the API sometimes doesn’t respond so it needs to resend that call and continue. I think that right now it stops if there is no response.But I am sure that it can be fixed in some way.
I want only applicants who have worked Amazon API.