Hello, 

The rate limits can fluctuate based on different variables, including 
server load. That said, it is not recommend to design with a fixed Queries 
Per Second (QPS) limit. Our suggestion is to have the application handle 
such errors by following the guidelines given here 
<https://developers.google.com/adwords/api/docs/guides/rate-limits#take_control>.
 
If you feel that you should still not be getting that error, please share 
the SOAP logs and your CID so that we can take a closer look. You can reply 
privately to the author while sharing the details. 

Regards,
Sai Teja, AdWords API Team.

On Thursday, September 27, 2018 at 9:19:08 AM UTC-4, Cameron Warren wrote:
>
> Hello,
>
> I am running the get_keyword_ideas.py example script using Python 3.6. The 
> script runs fine except for one issue - I can't seem to get the script to 
> complete. I'm getting the following error after running the script only a 
> couple of times - even when running for just 1 page of results. 
>
> googleads.errors.GoogleAdsServerFault: [RateExceededError 
> <rateName=RATE_LIMIT, rateKey=null, rateScope=ACCOUNT, 
> retryAfterSeconds=30>]
>
>
> My understanding from the rate sheet (
> https://developers.google.com/adwords/api/docs/ratesheet) is that I 
> should be able to run 10,000 operations per day. I should be running only 1 
> get request (for 1 page as seen in my code below). 
>
>
> Any assistance as to why this error is throwing would be greatly helpful. 
>
>
> Code:
>
>
>
> from googleads import adwords
> import logging
> import googleads
>
> # logging.basicConfig(level=logging.INFO, 
> format=googleads.util.LOGGER_FORMAT)
> # logging.getLogger('googleads.soap').setLevel(logging.DEBUG)
>
>
> # Optional AdGroup ID used to set a SearchAdGroupIdSearchParameter.
> AD_GROUP_ID = 'INSERT_AD_GROUP_ID_HERE'
> PAGE_SIZE = 1
>
> data_table = []
> def main(client, ad_group_id=None):
>   # Initialize appropriate service.
>   targeting_idea_service = client.GetService(
>       'TargetingIdeaService', version='v201806')
>
>   # Construct selector object and retrieve related keywords.
>   selector = {
>       'ideaType': 'KEYWORD',
>       'requestType': 'IDEAS'
>   }
>
>   selector['requestedAttributeTypes'] = [
>       'KEYWORD_TEXT', 'SEARCH_VOLUME', 'CATEGORY_PRODUCTS_AND_SERVICES']
>
>   offset = 0
>   selector['paging'] = {
>       'startIndex': str(offset),
>       'numberResults': str(PAGE_SIZE)
>   }
>
>   selector['searchParameters'] = [{
>       'xsi_type': 'RelatedToQuerySearchParameter',
>       'queries': ['space cruise']
>   }]
>
>   # Language setting (optional).
>   selector['searchParameters'].append({
>       # The ID can be found in the documentation:
>       # 
> https://developers.google.com/adwords/api/docs/appendix/languagecodes
>       'xsi_type': 'LanguageSearchParameter',
>       'languages': [{'id': '1000'}]
>   })
>
>   # Network search parameter (optional)
>   selector['searchParameters'].append({
>       'xsi_type': 'NetworkSearchParameter',
>       'networkSetting': {
>           'targetGoogleSearch': True,
>           'targetSearchNetwork': False,
>           'targetContentNetwork': False,
>           'targetPartnerSearchNetwork': False
>       }
>   })
>
>   # Use an existing ad group to generate ideas (optional)
>   if ad_group_id is not None:
>     selector['searchParameters'].append({
>         'xsi_type': 'SeedAdGroupIdSearchParameter',
>         'adGroupId': ad_group_id
>     })
>
>   more_pages = True
>   while more_pages:
>     page = targeting_idea_service.get(selector)
>
>     # Display results.
>     if 'entries' in page:
>       for result in page['entries']:
>         attributes = {}
>         for attribute in result['data']:
>           attributes[attribute['key']] = getattr(
>               attribute['value'], 'value', '0')
>         print ('Keyword with "%s" text and average monthly search volume '
>                '"%s" was found with Products and Services categories: %s.'
>                % (attributes['KEYWORD_TEXT'],
>                   attributes['SEARCH_VOLUME'],
>                   attributes['CATEGORY_PRODUCTS_AND_SERVICES']))
>       print
>     else:
>       print('No related keywords were found.')
>     offset += PAGE_SIZE
>     selector['paging']['startIndex'] = str(offset)
>     more_pages = offset < int(page['totalNumEntries'])
>
>
> if __name__ == '__main__':
>   # Initialize client object.
>   adwords_client = adwords.AdWordsClient.LoadFromStorage()
>
>   main(adwords_client, int(AD_GROUP_ID) if AD_GROUP_ID.isdigit() else None)
>
>
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/50be8793-b7b9-4ed7-8ec6-f9c0e135c350%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to