Error when I am using KeywordPlanIdeaService

368 views
Skip to first unread message

M i

unread,
Nov 13, 2023, 7:44:59 PM11/13/23
to Google Ads API and AdWords API Forum
I am using Google AdsAPI from Python.
When I make a request I get the following error

Method name: google.ads.googleads.v14.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics
429 Resource has been exhausted (e.g. check quota). [type_url: \"type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure\"\"}nvalue: \"\n-\\\002X\002\002\022\\'Too many requests. Retry in 30 seconds.\\022\026rM939K2Wct9csMku1UdQ2A\"\n]

If you call it once after some time has passed, you will get a normal response in rare cases, but if you call it again, you will get an error.
Once this happens, a normal response will not be returned until you wait several minutes.

I don't think I am calling enough to reach the request limit.

For your information, I am attaching the number of method calls within 24 hours from now.
The only one we are calling is google.ads.googleads.v14.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics.
photo.png
Thank you for your confirmation.

Nick

unread,
Nov 13, 2023, 8:33:27 PM11/13/23
to Google Ads API and AdWords API Forum
Exact same thing happening to me

Google Ads API Forum Advisor

unread,
Nov 14, 2023, 2:43:49 AM11/14/23
to nanana...@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 getting the error “429 Resource has been exhausted” in the Google Ads API. I would kindly request you to provide us with the complete API logs (request and response with request-id and request header) generated at your end along with the uncropped UI screenshot 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.

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:!00D1U01174p.!5004Q02qCAPu:ref"

Thanks,
 
Google Logo Google Ads API Team

 

Google Ads API Forum Advisor

unread,
Nov 14, 2023, 2:53:06 AM11/14/23
to nickol...@gmail.com, adwor...@googlegroups.com
Hi,

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

I see that you have already raised this concern on another thread with "Error when I am using KeywordPlanIdeaService" and we have already responded there for this issue. To avoid multiple threads on the same issue, please take a look at that thread and continue the discussion on the same for further updates on the issue.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qCAkF:ref"


Thanks,
 
Google Logo Google Ads API Team

 

M i

unread,
Nov 21, 2023, 1:53:06 AM11/21/23
to Google Ads API and AdWords API Forum
The threshold at which a 429 error occurs is no longer abnormally low.

Please allow me to ask a few questions as we continue to use the Google Ads API.


1. about the cause
I was definitely below both the number of requests per day and the number of QPS per day, but the following error occurred.
Method name: google.ads.googleads.v14.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics
429 Resource has been exhausted (e.g. check quota). [type_url: \"type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure\"\"}nvalue: \"\n-\\002X\002\002\002\022\\'Too many Retry in 30 seconds.\\022\026rM939K2Wct9csMku1UdQ2A\"\"\n]


In what cases does this situation occur?


2. how to prevent it from happening?
Can you please suggest a way to prevent the 429 error from occurring?
If you have more than one method, we would appreciate it if you could provide us with each of them. 3.

3. how to deal with the problem if it occurs
If the 429 error does occur, is there any way to resolve it in as little time as possible?

Thank you in advance for your cooperation in confirming the above.

2023年11月14日火曜日 16:53:06 UTC+9 Google Ads API Forum Advisor:

M i

unread,
Nov 21, 2023, 1:53:07 AM11/21/23
to Google Ads API and AdWords API Forum
The threshold at which a 429 error occurs is no longer abnormally low.

Please allow me to ask a few questions as we continue to use the Google Ads API.


1. about the cause
I was definitely below both the number of requests per day and the number of QPS per day, but the following error occurred.
Method name: google.ads.googleads.v14.services.KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics

429 Resource has been exhausted (e.g. check quota). [type_url: \"type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure\"\"}nvalue: \"\n-\\002X\002\002\002\022\\'Too many Retry in 30 seconds.\\022\026rM939K2Wct9csMku1UdQ2A\"\"\n]


In what cases does this situation occur?


2. how to prevent it from happening?
Can you please suggest a way to prevent the 429 error from occurring?
If you have more than one method, we would appreciate it if you could provide us with each of them. 3.

3. how to deal with the problem if it occurs
If the 429 error does occur, is there any way to resolve it in as little time as possible?

Thank you in advance for your cooperation in confirming the above.

2023年11月14日火曜日 16:53:06 UTC+9 Google Ads API Forum Advisor:
Hi,

Google Ads API Forum Advisor

unread,
Nov 21, 2023, 5:02:09 AM11/21/23
to nanana...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your query, I understand that you are getting the error "RESOURCE_EXHAUSTED", which means that a system frequency limit has been exceeded. Kindly prevent sending too many requests in a short period of time and also ensure to set up short delays between requests or combine more operations in fewer requests. Also, please check this sample code for how to Handle a Rate Exceeded Error for more information.

Additionally, we also have daily API operation limits where requests that violate these limits are rejected with the error: RESOURCE_EXHAUSTED. You may check out API Limits and Quotas for more information.

Also, you can try making a request to the Method: customers.generateKeywordHistoricalMetrics endpoint to see the results.

If you are still encountering an error, kindly provide us with the updated complete API logs (request and response with request-id and request header) generated at your end to assist you better.


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.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 

冨田英祐(pokotyamu えーちゃん)

unread,
Dec 5, 2023, 5:53:10 AM12/5/23
to Google Ads API and AdWords API Forum
Hi,

I am also facing the same issue when using KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics, so please let me ask a question.


> You may check out API Limits and Quotas for more information.
> 15,000 API operations per day

I have read the article about this API limit and quotas.
I think that with GenerateKeywordHistoricalMetrics, you can specify up to 10,000 words at the same time as keywords in one request.(https://developers.google.com/google-ads/api/reference/rpc/v15/GenerateKeywordHistoricalMetricsRequest)

Does this consume 1 operation? Or does it consume 10,000 operations?
And 1 QPS's Query means equal operation?
I need an answer for this as it is necessary for calculating when imposing limit restrictions.


Thank you for your confirmation.

2023年11月21日火曜日 19:02:09 UTC+9 Google Ads API Forum Advisor:

Google Ads API Forum Advisor

unread,
Dec 5, 2023, 5:22:07 PM12/5/23
to tom...@feedforce.jp, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

Please find the response to your queries respectively.


Does this consume 1 operation? Or does it consume 10,000 operations?

A maximum of 10,000 keywords can be used in a request. So, it will only consume 1 operation.


And 1 QPS's Query means equal operation?

Please note that 1 QPS is calculated as 60 requests per 60 seconds.

Hope this helps. If you have any more queries, please feel free to get back to us.

冨田英祐(pokotyamu えーちゃん)

unread,
Dec 6, 2023, 2:06:25 AM12/6/23
to Google Ads API and AdWords API Forum

Thank you for your answer.

I was able to understand how to calculate the operation.
And I'll try implementing it.

If I find any unclear points, I'll question again.

Thank you again for your help.
2023年12月6日水曜日 7:22:07 UTC+9 Google Ads API Forum Advisor:
Reply all
Reply to author
Forward
0 new messages