Remove All AdGroups in a Campaign

25 views
Skip to first unread message

testa...@geeks.ltd.uk

unread,
Sep 23, 2014, 6:11:15 AM9/23/14
to adwor...@googlegroups.com
Hi All,

I want to remove all AdGroups within a campaign. Can this be done without having access to the specific AdGroup Ids first. Is this possible?

Thanks,
Conor

Josh Radcliff (AdWords API Team)

unread,
Sep 23, 2014, 2:41:18 PM9/23/14
to adwor...@googlegroups.com
Hi Conor,

You will need the IDs of the AdGroups, but if you only know the names you could do the following:

1. Issue an AdGroupService.get where your Predicate filters on CampaignId and your Selector includes the Id field.
2. From those results, collect the AdGroup IDs.
3. Issue an AdGroupService.mutate containing AdGroups where you only populate the Id field.

If you're using one of our client libraries (and hopefully you are - they make life much easier!), check out the GetAdGroups and RemoveAdGroup examples -- they do precisely what I described above.

Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages