How to Delete keywords of an Adgroup?

453 views
Skip to first unread message

Swyam Joshi

unread,
Jul 3, 2010, 4:46:47 AM7/3/10
to AdWords API Forum
Hi All Dear Friends,

i m trying to delete/remove keywords by setting their status "REMOVE"
like
$adGroupCriterion->userStatus = 'REMOVE';

But it;s not working but if i test other status like ACTIVE, PAUSED
then then it's working file.
so please help me here how to delete keywords. following is my code.

$adGroupCriterion = new BiddableAdGroupCriterion();
$adGroupCriterion->adGroupId = $adGroupId;
$adGroupCriterion->criterion = new Criterion($criterionId);
// $adGroupCriterion->userStatus = 'PAUSED'; // use to pause keyword
// $adGroupCriterion->userStatus = 'REMOVE'; // use to remove/delete
keyword
// $adGroupCriterion->userStatus = 'ACTIVE'; // use to activate
keyword
$adGroupCriterion->userStatus = 'REMOVE';

Thanks in advance.

AdWords API Advisor

unread,
Jul 7, 2010, 3:06:23 PM7/7/10
to AdWords API Forum
Hi,

You need to use the REMOVE operator to delete a keyword. An example
of this is included in the AdWords API PHP client library:

http://code.google.com/p/google-api-adwords-php/source/browse/trunk/examples/v200909/DeleteAdGroupCriterion.php

Best,
- Eric Koleda, AdWords API Team
Reply all
Reply to author
Forward
0 new messages