Hello Google Ads team, We have very similar tool as described in this thread: https://groups.google.com/g/adwords-api/c/jdSLSDnIF7c
We are also getting RESOURCE_EXHAUSTED (Too many requests) issue when calling KeywordPlanService.GenerateHistoricalMetrics. In our case we use library https://github.com/Opteo/google-ads-api Our plan is to use this service to fetch up to 10000 keywords with its historical metrics up to 4 years time range max. The first time when we tried to fetch 10000 keywords, we got a RESOURCE_EXHAUSTED error. We weren't aware of max message size (64 MB) that could cause the issue. Later we have called a service with 1 keyword and with 500 keywords (up to 3 years) and it has worked. But then when we tried to fetch with 1000 keywords, we got RESOURCE_EXHAUSTED. Before we weren't aware about Planning services <https://developers.google.com/google-ads/api/docs/best-practices/quotas#planning_services>, but later we've implemented a delay of 2 seconds between calls of following flow: - create a keyword plan - add a keyword plan campaign to keyword plan - add keyword plan Ad groups to keyword plan campaign - add keyword plan Ad group keywords to keyword plan Ad groups - call KeywordPlanService.GenerateHistoricalMetrics Even with a 2s delay, after another call with 500 keywords, we got "Too many requests": GoogleAdsError { error_code: ErrorCode { quota_error: 2 }, message: 'Too many requests. Retry in 74948 seconds.', details: ErrorDetails { quota_error_details: [QuotaErrorDetails] } } error detail: { "quota_error_details": { "rate_scope": "DEVELOPER", "rate_name": "Number of operations for basic access", "retry_delay": { "seconds": "74948" } } } Then we call a service with 1 keyword and we got 200 response. I've checked *API/Service details* page of our Google Cloud Platform account and we shouldn't exceeded a daily quota. Those are actual stats: google.ads.googleads.v10.services.KeywordPlanAdGroupKeywordService.MutateKeywordPlanAdGroupKeywords: 24 requests google.ads.googleads.v10.services.KeywordPlanAdGroupService.MutateKeywordPlanAdGroups: 24 requests google.ads.googleads.v10.services.KeywordPlanCampaignService.MutateKeywordPlanCampaigns: 24 requests google.ads.googleads.v10.services.KeywordPlanService.GenerateHistoricalMetrics: 14 requests google.ads.googleads.v10.services.KeywordPlanService.MutateKeywordPlans: 24 requests I see that only this method contains Errors (41,67%): google.ads.googleads.v10.services.KeywordPlanAdGroupKeywordService.MutateKeywordPlanAdGroupKeywords I don't know what we're missing here and in which point we are "hitting" a quota limit. I would appreciate any help to know what is a cause here. Thank you. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d6de94ea-06a1-4996-93c9-928b86a54d36n%40googlegroups.com.