RESOURCE EXHAUSTED errors from the Google Ads Historical Metrics API

97 views
Skip to first unread message

Jason Tiscione

unread,
Mar 11, 2022, 1:35:24 AM3/11/22
to Google Ads API and AdWords API Forum
I'm trying to use the Google Ads API to gather historical metrics on keywords in all fifty states.

Using the Python wrapper library, for each of the 51 locations (states + District of Colombia), I'm doing this:
- I create a KeywordPlan
- I create a KeywordPlanCampaign specific to the location, using the KeywordPlan
- I create a KeywordPlanAdGroup using the KeywordPlanCampaign
- I create a KeywordPlanAdGroupKeywords using the KeywordPlanAdGroup, for 100 keywords
- I call generate_historical_metrics() on the KeywordPlanService

This runs through all 51 locations successfully and I get all the data.

If I try it again with another 100 keywords, it fails halfway through with RESOURCE_EXHAUSTED errors. "Resource has been exhausted (e.g. check quota)."

As soon as that happens, I'm locked out for 24 hours.

I tried having it wait an hour before starting again, and got locked out for 24 hours.

The day after that I tried having it wait for two hours, along with a 5 minute wait between each of the 51 queries, and got locked out for another 24 hours.

According to the API quotas page https://developers.google.com/google-ads/api/docs/best-practices/quotas I should not be seeing these errors at all. I have no idea what quota I'm hitting or how to address it.

Google Ads API Forum Advisor

unread,
Mar 11, 2022, 6:34:52 AM3/11/22
to tisc...@gmail.com, adwor...@googlegroups.com

Hi Json,

Thanks for reaching out to the Google Ads API Forum.

Could you provide us with the complete request and response logs with the request-id generated where we can see the RESOURCE_EXHAUSTED errors, so our team can check better?

If you’re using a client library, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead by adding reference of this thread. 

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2XnYGn:ref
Message has been deleted

Google Ads API Forum Advisor

unread,
Apr 1, 2022, 5:15:12 AM4/1/22
to tisc...@gmail.com, adwor...@googlegroups.com
Hi Jason,

Thank you for your reply.

However, I had to delete your recent response as it contained your logs. When sending over these details, you may do so via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Moving forward, could you confirm if your implementation of the planning services feature is following the 1 QPS is calculated as 60 requests per 60 seconds limit? I asked because this is one of the main causes of encountering the RESOURCE_EXHAUSTED issue when using this feature.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2XnYGn:ref
Reply all
Reply to author
Forward
0 new messages