How can I set a userlist to be of type 'Exclusion' using the API?

26 views
Skip to first unread message

George D Elig

unread,
Oct 23, 2017, 1:50:59 AM10/23/17
to AdWords API Forum
I am able to query campaigns and create a CRM based user-list using the API and the python gooleads lib. However, I don't see how (or any examples) to programmatically make the user-list an exclusion.

Peter Oliquino

unread,
Oct 23, 2017, 4:16:04 AM10/23/17
to AdWords API Forum
Hi George,

If you wish to exclude audiences, you can either use the CampaignCriterionService to create a NegativeCampaignCriterion of type CriterionUserList or the AdGroupCriterionService to create a NegativeAdGroupCriterion of type CriterionUserList

For the campaign level example, you may refer to the AddCampaignTargetingCriteria, and to the AddKeywords example for the ad group level. Just replace the objects in the examples with the ones I mentioned as necessary. Let me know if you require more information.

Thanks and regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages