Currently using
async function getAllUrls(urls) {
try {
var data = await Promise.all(
urls.map(
url =>
fetch(url).then(
(response)
)));
return (data)
} catch (error) {
console.log(error)
throw (error)
}}
But urls is often array of 20+ links which doesnt make the api rate limiter very happy, what am looking for is way to limit how many requests it can send at once, for example limit it to 5 requests at once, after its done go for the other 5