I'm using the
GoogleAds API with the
Python library.
My goal is to get 'SEARCH_VOLUME', 'TARGETED_MONTHLY_SEARCHES' for a given keyword.
However, when I'm using the GoogleAds API ( see code below) I'm not getting results for certain keywords.
E.g. if I search for 'virus' I get:
{
'totalNumEntries': 0,
'entries': []
}
but searching for 'germ' gives back results.
Access level: I'm using AdWords API token that has been approved for Basic Access.
My code:
from googleads import adwords
adwords_client = adwords.AdWordsClient.LoadFromStorage('googleads.yml')
targeting_idea_service = adwords_client.GetService('TargetingIdeaService', version='v201809')
selector = {
'ideaType': 'KEYWORD',
'requestType': 'IDEAS'
}
selector['requestedAttributeTypes'] = [
'KEYWORD_TEXT', 'SEARCH_VOLUME', 'TARGETED_MONTHLY_SEARCHES']
offset = 0
PAGE_SIZE = 1
selector['paging'] = {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
}
selector['searchParameters'] = [{
'xsi_type': 'RelatedToQuerySearchParameter',
'queries': [ 'virus']
}]
page = targeting_idea_service.get(selector)
print(page)