Python: Google Ads API Error (TargetingIdeaService INVALID_SEARCH_PARAMETERS)
I am trying to access the Google Adwords API, as described in their help-file via following sample code:
from googleads import adwords client = adwords.AdWordsClient.LoadFromStorage() targeting_idea_service = client.GetService('TargetingIdeaService', version='v201809') selector = {'ideaType': 'KEYWORD', 'requestType': 'IDEAS', 'requestedAttributeTypes': ['KEYWORD_TEXT', 'SEARCH_VOLUME', 'CATEGORY_PRODUCTS_AND_SERVICES'], 'paging': {'startIndex': '0', 'numberResults': '100' }, 'searchParameters': [{'xsi_type': 'RelatedToQuerySearchParameter', 'queries': ['cats']}] } page = targeting_idea_service.get(selector) print(page)
However, when I try to call the API, following error occures:
zeep.exceptions.Fault: [TargetingIdeaError.INVALID_SEARCH_PARAMETERS @ selector.searchParameters.searchParameters[0]; trigger:'RelatedToQuerySearchParameter']
Any idea what could cause this error? In my googleads.yaml file (which is called properly, following parameters are set:
# AdWordsClient configurations adwords: developer_token: client_id: client_secret: refresh_token: