I want to get campaign criteria by selector fields using python code.
I am using the paging method:
page = campaign_criterion_service.get(selector)
selector = {
'fields': ['CampaignId', 'Id', 'CriteriaType', 'PlatformName',
'LanguageName', 'LocationName', 'KeywordText','IsNegative','KeywordMatchType',
'UserListId','UserListName','BidModifier','CampaignCriterionStatus','BaseCampaignId'],
'paging': {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
},
'predicates': [{
'field': 'CampaignId',
'operator': 'IN',
'values':campaignidlist
},{
'field': 'IsNegative',
'operator': 'EQUALS',
'values': str(isNegative)
},
{
'field': 'CriteriaType',
'operator': 'EQUALS',
'values': CriteriaType
}]
}
Now I want to migrate those to Google Ads API. I know that the report service has a resource mapping document. However, the service only has a corresponding service without a mapping selector form.
I used SearchGoogleAdsStreamRequest to get the data frame and construct them to operations. for a service call.
Like I know for GAQL campaign id is
campaign.id, Id in this file is campaign_criterion.criterion_id.
If I want to use SearchGoogleAdsStreamRequest to get the form with those selectors,
is there an easier way to map the corresponding GAQL?
Thank you