what is the rate limit for Google translate API V2?

大兔子大兔子 提交于 2019-12-09 13:39:49

问题


I am using the Google translate API V2 very intensely and after about 2000 requests I start getting this in the returning JSON:

Array
(
    [error] => Array
        (
            [errors] => Array
                (
                    [0] => Array
                        (
                            [domain] => usageLimits
                            [reason] => userRateLimitExceeded
                            [message] => User Rate Limit Exceeded
                        )

                )

            [code] => 403
            [message] => User Rate Limit Exceeded
        )

)

Any idea what the rate limit is? and do you have a smart way of regulating the requests rate?


回答1:


I finally found out so I will answer my own question. The rate limit for the API can be set at the admin panel for your API's (https://code.google.com/apis/console) under the quotas section in the left hand menu. I did not find a full documentation of the possible errors that can be returned by an API.




回答2:


HTTP status 403 is returned whenever the quota is exceeded.

Remark I've been playing around with very low quotas to test whether this really works as expected. It seems that the quota settings are not applied immediately, since it took some time (~10-20 minutes) until the API finally stopped working (and returned the mentioned error code).



来源:https://stackoverflow.com/questions/7646112/what-is-the-rate-limit-for-google-translate-api-v2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!