m-wrzr / populartimes

MIT License
815 stars 167 forks source link

populartimes.get() should have a check #83

Closed vishalmhjn closed 4 years ago

vishalmhjn commented 4 years ago

One has to be very careful while using the populartimes.get() method, as it might cause large number of requests within a few seconds, and cost you a lot. If there was a check which can warn if the query will cause such issues, it would be great.

andrewmartel commented 4 years ago

Yes it can - so take my warning here! When I ran it there was a connectivity issue where it kept retrying until it timed out, and it ended up pulling in 14913 calls to the "Nearby Search" API at $0.032 USD each for a total of $477.22 in about 2 minutes time.!

vishalmhjn commented 4 years ago

Happened with me as well. When I realized that the program is taking too long, I forcibly ended the running processes. But it was too late and already made around 12000 requests, which almost exhausted my free credits.