Swift
Swift

Reputation: 21

node.js axios & http , any way to bypass rate limit somehow?

So I'm currently trying to access an API every second. This works fine with 1 item but I want to be able to check a few items a second. But there is a rate limit of like 60 requests a minute.. any way to bypass this somehow? I'm trying not to slow it down by scaling down to less requests a minute cause of the rate limit Hope someone can help!

Upvotes: 1

Views: 2040

Answers (1)

Arun Kamalanathan
Arun Kamalanathan

Reputation: 8593

We had a look at using bottleneck library for nodejs at work. its used for api rate limiting. The basic configuration allows you to set the amount of concurrent requests and how many milliseconds to wait before sending another request.

const limiter = new Bottleneck({
  maxConcurrent: 1,
  minTime: 333
});

I think this is good enough for you.

Reference: https://www.npmjs.com/package/bottleneck

Upvotes: 1

Related Questions