Hi,

I am struggling to understand the behavior of 
the KeywordPlanIdeaService.GenerateKeywordIdeas. For some reason, it 
returns a 429 Error with message ` 429 Resource has been exhausted (e.g. 
check quota). [type_url: 
"type.googleapis.com/google.ads.googleads.v17.errors.GoogleAdsFailure"`. 
The request works fine when I comment out the line that sets the page_size. 
I am using a Google Ads Test account, if that changes anything.
Does anyone know the cause for this behavior, or is it a bug on Google's 
side?

For now, my solution would be to just strip the unwanted results in python, 
but that's obviously not the best solution.

Best Regards
Artem


Code: 
```
from google.ads.googleads.client import GoogleAdsClient
def get_keyword_ideas(number_of_results: int): 
    try:
        client: GoogleAdsClient = get_google_ads_client() #helper function 
that gets the client
        keyword_plan_idea_service = 
client.get_service("KeywordPlanIdeaService")
        request = client.get_type("GenerateKeywordIdeasRequest")
        request.customer_id = get_customer_id(0) #helper function that gets 
a google ads client id
        request.language = "languageConstants/1001" #example language
        request.keyword_seed.keywords.extend(["Google"]) #example keywords
        # When the below line is removed, the code works but returns a 
large payload
        request.page_size = number_of_results
        # ^ issue here

        keyword_ideas = keyword_plan_idea_service.generate_keyword_ideas(
            request=request,
        )
    # rest of function code

#function call    
print(get_keyword_ideas(10))
```

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/3d5b0351-daab-4f2a-bc5e-3646204ffefcn%40googlegroups.com.

Reply via email to