How to fix "RateExceededError rateName=RATE_LIMIT" with test API token?

823 views
Skip to first unread message

tom.wa...@raisingit.com

unread,
Jul 19, 2018, 2:10:00 AM7/19/18
to AdWords API and Google Ads API Forum
Hello everyone,

I am experimenting with the Adwords API with a test token, using the Python googleads library v201806.

I want to test generating keyword ideas with the TargetingIdeaService and I'm using the example code get_keyword_ideas.py from here: https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/v201806/optimization/get_keyword_ideas.py
(Actually the Python 3 version from here.)

I've adapted the code so it queries new keywords for a specific test client account. But the script (usually, not always) fails with the error:

GoogleAdsServerFault: [RateExceededError <rateName=RATE_LIMIT, rateKey=null, rateScope=ACCOUNT, retryAfterSeconds=30>]

There doesn't seem to be any mention of the rateName "RATE_LIMIT" in the API documentation. I see it has been raised before: here, here and here - and as far as I can see no one has come up with an explanation of what it is.

Now I know that with a test token, the TargetingIdeaService just gives you back garbage anyway. Is there also some lower limit that applies to the test token, that means this error will clear up by itself once I'm using a proper developer token?

If not, is there any specific advice of how to deal with it, other than the rate-limiting strategies covered here?

Cheers,
Tom

Peter Oliquino (AdWords API Team)

unread,
Jul 19, 2018, 3:08:13 AM7/19/18
to AdWords API and Google Ads API Forum
Hi Tom,

If your developerToken's access level is only for test accounts then yes, you should not be able to encounter any rate limit related errors. This being said, one possible origin of the issue would be the TargetingIdeaService itself. This service is a little expensive one to use as compared to other services.

The volume of requests is not counted not just to your account, but to the overall usage of the said service by all other accounts at any given period. To avoid being completely blocked by this issue, you could, as you have also suggested, follow the error handling recommendations stated in this guide.

I hope this helps.

Thanks and regards,
Peter
AdWords API Team

tom.wa...@raisingit.com

unread,
Jul 19, 2018, 5:31:07 AM7/19/18
to AdWords API and Google Ads API Forum
Hello Peter,

Thanks for your reply on this.

Just to confirm my understanding:
  • the rate limits are the same for the test token as for the production token, so this problem won't solve itself.
  • the error is triggered by general traffic to that service, not just my account (which explains why sometimes I encounter this error at the very first call to the service).
In the case that I encounter this because of generally heavy traffic, not because I've made too many requests - do I really need to wait 30 seconds before retrying?

Cheers,
Tom

Peter Oliquino (AdWords API Team)

unread,
Jul 19, 2018, 6:25:18 AM7/19/18
to AdWords API and Google Ads API Forum
Hi Tom,

Below are my answers to the points you mentioned :

1. For this particular scenario, yes, the developerToken access level would not matter.
2. Yes, this is across all accounts, when a significant number of users are using the TargetingIdeaService during a certain period then this error would typically manifest itself.

As for error handling, yes, the 30 seconds is usually the time it takes for the RateExceeded error to automatically get resolved, so, it is the minimum recommended period before you should retry your requests.

tom.wa...@raisingit.com

unread,
Jul 20, 2018, 11:12:24 AM7/20/18
to AdWords API and Google Ads API Forum
Good stuff - thanks Peter!
Reply all
Reply to author
Forward
0 new messages