Open boogheta opened 6 years ago
quick experiments seem to indicate no rate limit on this route (???) and between 1.5 and 2 calls of 15 urls per second, hence a resolving rate of about 25 bitlink per second, seems legit.
d0=$(date +%s)
count=0
while true; do
count=$((count+1))
curl -X POST "https://api-ssl.bitly.com/v3/expand" -d access_token=$BITLY_API_TOKEN -d hash=2pKPIqQ -d hash=2RK2Mtc -d hash=2pKPIqQ -d hash=2RK2Mtc -d hash=2pKPIqQ -d hash=2RK2Mtc -d hash=2pKPIqQ -d hash=2RK2Mtc -d hash=2pKPIqQ -d hash=2RK2Mtc -d hash=2pKPIqQ -d hash=2RK2Mtc -d hash=2pKPIqQ -d hash=2RK2Mtc -d hash=2pKPIqQ
echo $count $(( $(date +%s) - d0))
done
So it seems to be confirmed: it ran 2 hours (7216 seconds), calling in total the API 12437 times for 15 urls each time without returning an error once, meaning we can call it 1.7 times per second, so resolving indeed about 25 bitlinks per second (approx 90k per hour). Niiiice :)
Noice
The API v3 says we can resolve them 15 by 15 : https://dev.bitly.com/links.html#v3_expand
Although we should check what the rate limit is as it ain't clear for this specific route https://dev.bitly.com/rate_limiting.html