AdvertisingChannelSubType not retrieved

18 views
Skip to first unread message

Biniam Asnake

unread,
Mar 7, 2018, 5:42:04 AM3/7/18
to AdWords API Forum
I am using the Python library and I want to retrieve campaigns with 'AdvertisingChannelType' and 'AdvertisingChannelSubType'.

But, it is not returned from google Adwords and 'budget' is returned even though I didn't request to get it.

Can you please tell me what the solution is?

# Initialize appropriate service.
campaign_service = adwords_client.GetService('CampaignService', version='v201802')

# Construct query and get all campaigns.
query = (adwords.ServiceQueryBuilder()
         
.Select('Id', 'Name', 'Status', 'AdvertisingChannelType', 'AdvertisingChannelSubType')
         
.OrderBy('Name')
         
.Limit(0, PAGE_SIZE)
         
.Build())

for page in query.Pager(campaign_service):
   
if 'entries' in page:
       
for campaign in page['entries']:
           
print(campaign)

Result:
(Campaign){
   id = 12345665
   name = "CampaignName"
   status = "ENABLED"
   budget = ""
   advertisingChannelType = "SEARCH"
 }



Dhanya Sundararaju (AdWords API Team)

unread,
Mar 7, 2018, 1:27:52 PM3/7/18
to AdWords API Forum
Hi Biniam,

You will be able to display the data that you want by specifying the selector fields in just the response. Sample code is available in this section of the guide. Please let me know if you have further questions. 

Regards,
Dhanya, AdWords API Team
Reply all
Reply to author
Forward
0 new messages