I'm having some issues matching the output from AdwordsAPI TargetingIdeaService to the Keyword planner UI in Adwords.
I played around with Network search parameter and location/language, but it doesn't seem to be matching either.
Can you please take a look at my code? I've also attached the output for both code and web UI.
from googleads import adwords
PAGE_SIZE = 100
adwords_client = adwords.AdWordsClient.LoadFromStorage()
targeting_idea_service = client.GetService(
'TargetingIdeaService', version='v201806')
selector = {
'ideaType': 'KEYWORD',
'requestType': 'STATS'
}
selector['requestedAttributeTypes'] = [
'KEYWORD_TEXT', 'SEARCH_VOLUME',]
offset = 0
selector['paging'] = {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
}
selector['searchParameters'] = [{
'xsi_type': 'RelatedToQuerySearchParameter',
'queries': ['kitchenaid','beverage-air']
}]
selector['searchParameters'].append({
'xsi_type': 'NetworkSearchParameter',
'networkSetting': {
'targetGoogleSearch': True,
'targetSearchNetwork': False,
'targetContentNetwork': False,
'targetPartnerSearchNetwork': False
}
})
page = targeting_idea_service.get(selector)
for result in page['entries']:
attributes = {}
for attribute in result['data']:
attributes[attribute['key']] = getattr(attribute['value'], 'value', '0')
print(attributes)