About EasyMorph Tutorials & Examples Web-help

Rate limiting with API requests [DONE]

Hi,

A lot of APIs put a limit as to how many requests can be made within a minute.

It would be really helpful if there was a parameter that we could set on the iterate web request task whereby we could put the maximum number of calls per minute.

Thanks

Shaheed

That’s a good point. We’ve already discussed it internally. However, there are different throttling strategies. What’s the rate limit in the API you’re trying to access?

150 requests per minute. I have tried adding a wait task but because the task only accepts whole seconds it’s slowing things down

Correct me if I am wrong @dgudkov but you have added this feature so you can close this one out?

That’s correct. It’s in the “Options” tab of the “Web location” connector:

image

Note that throttling works in the “burst” mode, i.e. it sends as many requests as allowed as quickly as possible and then waits until the “cool down” period is over. Then repeats.

Throttling per connector is handled on the project level, which means that if two or more actions send requests using the same connector in a project, throttling will be applied to all of them to avoid API overload. However, throttling is not applied across projects. For instance, if two projects (e.g. Server tasks) run simultaneously and use the same connector, their requests will be throttled independently which may lead to API overload. Similarly, if two projects run on two different computers but use the same connector, their requests will be throttled independently.

Simply speaking, throttling “knows” about all web requests made using the same connector in one project, but it doesn’t “know” about web requests in other projects on the same computer, or other computers, even if they’re made using the same shared “Web location” connector.

To learn more about EasyMorph visit easymorph.com.