可以向Google Maps API提出多少请求而不被禁止? [英] How many requests can be made to Google Maps API without being banned?

查看:106
本文介绍了可以向Google Maps API提出多少请求而不被禁止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过Google地图API为地址使用了自动建议,希望尽可能快。



目前,我为我添加了10毫秒的延迟脚本以避免被太多请求禁止。这是必要的吗?可以做多少次请求而不被禁止?

我真的很喜欢一些适当的标签,我真的不能想出任何好的东西。

我不是当然如果我完全理解你的问题。但在任何情况下,像大多数其他API一样,Google地图对每天允许执行的请求数量有限制:您有每天每次请求2,500次的限制IP用于由regualr用户进行的地址解析请求,请参阅此处
如果您是首要用户,则每个IP每天的限制为每天100,000个请求,但是,使用JavaScript API或Flash Maps API时,您的每日限制为15,000个请求,请参阅此处



至于许多请求在同一时间,因为它取决于谷歌允许在他们的服务器上(这可能会改变)的负载我建议你做什么谷歌建议在上面的文件。



尽可能多地查询并收到 620错误代码将您的请求速度降低。如果你这样做,你将能够动态地确定他们允许你在任何给定时间内做多少次请求。



除非有人能够为你提供硬限制。 ..
我知道在首要用户faq中指定的硬限制被称为10个请求/秒:

这些限制适用于每个Maps API Premier客户端ID,并且必须跨所有共享应用程序和IP地址使用给定的客户端ID每秒10个请求的速率限制适用于所有Google Maps API Web服务
如果您需要更高的使用限制,请联系您的Maps API Premier帐户经理购买信息。


I'm using an autosuggestion for addresses through Google Maps API that I want to be as fast as possible.

Currently, I have added a 10ms delay to my script in order to avoid being banned for too many requests. Is this necessary? How many requests can be made without getting banned?

P.S. I'd love some appropriate tags for this, I really can't come up with anything good.

解决方案

I'm not sure if I fully understand your question. But in any case Google Maps like most other APIs has a limit on the number of requests you are allowed to perform daily:

You have a limit of 2,500 requests per day per IP for geocoding requests made by a regualr user, see here. If you are a premier user the limit is 100,000 requests per day per IP, however, you have a 15,000 requests/day limit when using the Javascript API or the Flash Maps API, see here.

As for too many requests at the same time, since it depends on the load google allow on their servers (which may change) I recommend you do what google suggested in the above document.

Query as much as you can and when you receive a 620 error code throttle back the speed of your requests. If you do that you will be able to dynamically determine how many requests they will allow you to do in any given time.

Unless someone can provide you with a hard limit... I know the hard limit specified in the premier user faq is said to be 10 requests/second:

"These limits apply to each Maps API Premier client id and must be shared across all applications and IP addresses using a given client id. There is also a rate limit of 10 requests per second that applies to all Google Maps API Web Services. If you need higher usage limits, please contact your Maps API Premier Account Manager for purchase information."

这篇关于可以向Google Maps API提出多少请求而不被禁止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆