Click here to Skip to main content
15,886,857 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Consuming an API having some rate limit of 120 requests per minute. Can you suggest what additional parameters do i include in API Call to avoid the error "Too many requests" if rate limit reaches.

Can you share any articles wrt code for an API having rate limit.

API Call
$.ajax({
type: "GET",
dataType: "application/json",
url: "",
success: function(data){
//reading the data and constructing the UI elements
}
});

What I have tried:

I tried but getting 420 error, when rate limit for an API Call is exceeding
Posted
Updated 25-Mar-22 6:14am

1 solution

There is nothing you can do about that in your code. That is a limitation imposed by the server you're calling, possibly because you're using a "free" service and the limit may be lifted by a "paid" subscription to the service.

You'll have to check with the API owner to find out.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900