Quantcast
Channel: Active questions tagged feed - Stack Overflow
Viewing all articles
Browse latest Browse all 542

How to fix "Too many requests" error for news api in java

$
0
0

I am using news api of version 2 i.e.,

https://newsapi.org/v2/everything?pagesize=100&apiKey=***&q=covid&lang=en

My trails :- tried to minimise the requests by keeping a sleep of 20sec after every request

There is a rate limit of 1000 requests for 24hours. I tried to minimise the requests by keeping a sleep of 20sec after every request. Also I am using 10 different keys with various accounts as I am working this for an organization and the keys are also generated as per organisation standards only.

But still I am getting "too many requests" error within 2-3 hours of time although I am using 10 keys where I am making 9000 calls. I tried to limit no. of records per call to 50 instead of 100(default & Maximum).

Is there any other alternative way on how to limit the calls so that i wont get this error again.


Viewing all articles
Browse latest Browse all 542

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>