Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocationIQ query rate is too high (for the free tier) #166

Closed
mathesong opened this issue Mar 10, 2022 · 3 comments
Closed

LocationIQ query rate is too high (for the free tier) #166

mathesong opened this issue Mar 10, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@mathesong
Copy link

Thanks for the incredible package!!

I was running queries through several of the APIs, and everything worked perfectly except for LocationIQ, for which I would hit rate limits. Their documentation states that 2 queries per minute are allowed on the free tier, but only 60 requests per minute. So I was getting 60 successful queries followed by 60 failures each time I used this service.

I suppose it makes sense to query the full 2 per second if you only have a few queries, but slower if there are many - or perhaps just waiting out the rest of the minute after each 60. Anyhow, I thought I would alert you to this. Happy to submit a PR to this effect if you'd like.

All the best,
Granville

@mathesong mathesong added the bug Something isn't working label Mar 10, 2022
@jessecambon
Copy link
Owner

Hi @mathesong, thanks. For the next release, I'll plan on changing the default min_time (minimum number of seconds per query) value from 0.5 to 1 (code link). In the mean time, you can use the min_time argument to override the default (ie. geocode(..., min_time = 1)) .

jessecambon added a commit that referenced this issue Mar 10, 2022
@mathesong
Copy link
Author

Ah, great! I figured there was an input argument somewhere to modify, but it wasn't a problem as I just ran another service to geocode the rest. But your updating the default min_time is great: I was looking through the code and just never found where it was.

Thanks again for a stellar package!

@clarelgibson
Copy link

Thanks so much for posting this. I was looking for an argument called "delay" or similar and completely skipped over the "min_time". This really helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants