Some information about how request and allowances is computed

122 views
Skip to first unread message

tsm...@gmail.com

unread,
Sep 13, 2023, 6:23:35 AM9/13/23
to Google Ads API and AdWords API Forum
Dear community, we are having the problem of having
"errorCode": {
"quotaError": "RESOURCE_EXHAUSTED"
},
"message": "Too many requests. Retry in 76343 seconds.",
"details": {
"quotaErrorDetails": {
"rateScope": "DEVELOPER",
"rateName": "Number of operations for basic access",
"retryDelay": "76343s"

When uploading campaign.

That is an essay of the request we performed

 google.ads.googleads.v13.services.AdGroupAdService.MutateAdGroupAds 43 2.33%
google.ads.googleads.v13.services.AdGroupCriterionService.MutateAdGroupCriteria 308 1.62%
google.ads.googleads.v13.services.AdGroupService.MutateAdGroups 47 0
google.ads.googleads.v13.services.CampaignBudgetService.MutateCampaignBudgets 50 0
google.ads.googleads.v13.services.CampaignCriterionService.MutateCampaignCriteria 150 0
google.ads.googleads.v13.services.CampaignService.MutateCampaigns 50 0

And also for the cost download and s2s
google.ads.googleads.v13.services.ConversionUploadService.UploadClickConversions 381 0.52%
google.ads.googleads.v13.services.GoogleAdsService.Search 2,374 0.21%

So WELL below the cap of https://developers.google.com/google-ads/api/docs/best-practices/quotas

Is it possible to have some kind of information on the quota that is left ?

To avoid the orrible problem of beeing locked out for 24 hour ?


Is it MAYBE possible that some operation have higher internal cost ? Say I upload 50keyword in a single AdGroupCriterionService operation, and is counted not as 1 operation but as 50 ?

We tried to also SLOW DOWN the frequency of those call as can be seen from the graph attached, those 650 operation where executed in about 30 minute,
Shall we tried to perform those on a longer period of time ?

Thank you
imagen.png

Google Ads API Forum Advisor

unread,
Sep 14, 2023, 2:31:43 AM9/14/23
to tsm...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are encountering a "RESOURCE_EXHAUSTED" error in the Google Ads API. I would kindly request you to avoid sending an excessive number of requests within a brief time frame. Please make sure to introduce short pauses between requests or consolidate multiple operations into fewer requests. 

If this doesn’t resolve your issue, could you please provide us with the complete API logs (request and response with request-id and request header) generated at your end to better assist you on this request.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
 
Please find the answers for your questions below:

1. Is it possible to have some kind of information on the quota that is left ? To avoid the orrible problem of beeing locked out for 24 hour ?
  • Unfortunately, there is no public Google Ads API quota checker available. To avoid being locked out for 24 hours, I would request you to slow down the frequency of your requests. Instead of making 650 requests in 30 minutes, try making 100 requests per hour. I would also recommend you to please refer to API Limits and Quotas for more information. 
2. Is it MAYBE possible that some operation have higher internal cost ? Say I upload 50keyword in a single AdGroupCriterionService operation, and is counted not as 1 operation but as 50 ?
  • Yes, it is possible that some operations have higher internal cost in the Google Ads API. I would suggest you to please refer to the Rate Sheet and Non-Compliance Fees document for more information.
3. We tried to also SLOW DOWN the frequency of those call as can be seen from the graph attached, those 650 operation where executed in about 30 minute,Shall we tried to perform those on a longer period of time ?
  • Yes, slowing down the frequency of your requests is a good way to avoid exceeding your quota. If you were able to execute 650 operations in 30 minutes, then you were making an average of 21 operations per minute. If you slow down the frequency of your requests to 10 operations per minute, you will be able to execute the same number of operations in 6.5 minutes.
Kindly get back to us if you have any further questions related to the Google Ads API.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:_00D1U1174p._5004Q2oksCZ:ref"

Thanks,
 
Google Logo Google Ads API Team


tsm...@gmail.com

unread,
Sep 14, 2023, 7:15:41 AM9/14/23
to Google Ads API and AdWords API Forum

Thank you for the response, upon closer review of the https://developers.google.com/google-ads/api/docs/rate-sheet

I think the
For a mutate request, each mutated item counts as one operation.

Should be intended NOT only as each mutate group (as expressed in the example) but more as each ELEMENT mutated, thus uploading 50Keyword, even if affect a single group is to be considered 50 operation.

About the missing ability to have a counter about the operation left, I would like to request this ability, of course such counter is present (else how can we be blocked), but is not exposed.

Google Ads API Forum Advisor

unread,
Sep 15, 2023, 4:45:55 AM9/15/23
to tsm...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Yes, for each mutated item in a mutate request counts as one operation, even if they are all part of the same group. This means that uploading 50 keywords in a single mutate request would count as 50 operations. Could you please provide more information about your query "About the missing ability to have a counter about the operation left"?. Are you looking for API Limits and Quotas?

tsm...@gmail.com

unread,
Sep 15, 2023, 5:04:00 AM9/15/23
to Google Ads API and AdWords API Forum
Thank you for the clarification about the mutated item.

About the counter a request to return something similar to facebook api https://developers.facebook.com/docs/graph-api/overview/rate-limiting/

x-ad-account-usage: { "acc_id_util_pct": 9.67, //Percentage of calls made for this ad account.
"reset_time_duration": 100, //Time duration (in seconds) it takes to reset the current rate limit score.
"ads_api_access_tier": 'standard_access' //Tiers allows your app to access the Marketing API. standard_access enables lower rate limiting. }

In their case is returned always as an header, but is fine just to call once in a while an endpoint like

google.ads.googleads.v13.services.rateLimit or something alike to have some information to avoid suddenly beeing locked out for 24 hour.

tsm...@gmail.com

unread,
Sep 17, 2023, 1:31:47 PM9/17/23
to Google Ads API and AdWords API Forum
Does anyone know if this limit is a fixed daily cap (and thus what is the reference timezone) or is a sliding window ?

Google Ads API Forum Advisor

unread,
Sep 19, 2023, 10:03:17 PM9/19/23
to tsm...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your query, I understand that you would like to avoid suddenly being locked out for 24 hours.To avoid being locked out for 24 hours, I would request you to slow down the frequency of your requests. I would also recommend you to please refer to API Limits and Quotas for more information. 

Also, the concern related to the limit, kindly refer to this Capping API usage help center article for more information on requests per second per user and requests per day. Also, you may refer to the Rate Limits for more information.
Reply all
Reply to author
Forward
0 new messages