Running users/lookup API in a loop



Here is my problem:

I am running users/lookup API in a loop. In every iteration i fetch
100 profiles against their ids. But problem is that after 18 iterations
this API does not return data against profiles ids even its rate limit
is 180 per 15 minutes. Is anyone knows why this happening?



Is the twitter response after 18 iterations a rate limit notice or some other error?

Might be an idea to check the ratelimit before you start with to make sure the ratelimit reset to 180 in the current 15 minute window.


Hi IgorBrigadir,

Actually after 18 iterations, i am getting empty response neither any data nor any error from twitter.