Rate Limit Error: Rate Scope:Account - Is the rate limit at dev token or the account?

124 views
Skip to first unread message

srb

unread,
Mar 28, 2018, 5:05:58 PM3/28/18
to AdWords API Forum

Hello,

I am using the TargetingIdeaService (STATS) to check search volume on a set of keywords and I keep getting the rate limit error - 

<ns2:errorString>RateExceededError.RATE_EXCEEDED</ns2:errorString>

<ns2:ApiError.Type>RateExceededError</ns2:ApiError.Type>

<ns2:reason>RATE_EXCEEDED</ns2:reason>

<ns2:rateName>RATE_LIMIT</ns2:rateName>

<ns2:rateScope>ACCOUNT</ns2:rateScope>

<ns2:retryAfterSeconds>30</ns2:retryAfterSeconds>


We only have one dev token. 


Is the rate limit at the dev token level or at the account level? 

If it is at the account level, what other operations are being counted towards this limit and how can I monitor those requests?


Appreciate your help!

Milind Sankeshware (AdWords API Team)

unread,
Mar 29, 2018, 3:04:31 PM3/29/18
to AdWords API Forum
Hi,

Looks like rate scope is Account level. The rate limits with ACCOUNT scope occurs usually when there are too many requests per second on a single AdWords account in a short duration of time. You may need to slow down and make fewer requests against your account. The rate limit across Account rate scope is metered on all requests to a single AdWords account irrespective of developer token used. You will need to wait for the specified time in the "retryAfterSeconds" parameter and retry your request. You can refer to this guide to control the rate limit errors in your application. 
Please note there is no guarantee that after waiting for retryAfterSeconds your new request will succeed. You could apply a random multiplier (e.g., a float value between 1 and 2 inclusively) to retryAfterSeconds when determining seconds to wait. Please refer this guide. Let me know if you have further questions.

Thanks,
Milind, AdWords API Team.

Thomas Lutz

unread,
Mar 29, 2018, 6:45:41 PM3/29/18
to AdWords API Forum
We have the same problem. The error seems to be misleading, because the rateScope does not seem to be even account-related (but rather global for TargetingIdeaService) as I have read in another thread here. Can anyone from the Adwords API team help?

srb

unread,
Mar 29, 2018, 7:28:14 PM3/29/18
to AdWords API Forum
Yes the error message is misleading. Not sure how to track the account level requests.

<ns2:retryAfterSeconds>30</ns2:retryAfterSeconds>

is not clear either. I have tried waiting for different multiples of 30s and some times even after 5 mins I still get RateExceededError and on some other occasions I would run into
Error:socket hang up, code=ECONNRESET


How do I resolve the socket hang up and how long should I wait before I make another request?

Milind Sankeshware (AdWords API Team)

unread,
Mar 30, 2018, 11:17:36 AM3/30/18
to AdWords API Forum
Hi,

The TargetingIdeaService is a more expensive API service call while compared to the other services of the AdWords API. The rate limits for TargetingIdeaService are significantly more strict than for other API services. If you have multiple accounts against which you are making the API calls, you could consider Interleaving requests to different accounts as discussed here. There are other best practices too in-order to control the rate limits errors. Also, please note that a new AdWords account may have a significantly more restrictive rate limit (i.e., lower QPS) than established accounts. Unfortunately, the only workaround to handle the rate limit errors at ACCOUNT scope is to wait and retry the request at a later point of time.

Regarding the "socket hang up" error, could you share the complete error logs so that I can take a closer look? You can use reply privately to author or redact any sensitive information while sharing the logs.
Reply all
Reply to author
Forward
0 new messages