Update Keywords using API

93 views
Skip to first unread message

notalian

unread,
Jul 13, 2009, 3:50:00 PM7/13/09
to AdWords API Forum
We are trying to use Adwords API to add keyword to an existing
adgroup. We'd like to implement it so it ignores keywords that already
exist and inserts only the ones that do not exist in the adgroup.

Currently, API inserts all keywords which results in duplicate
keywords. We are using code found on this page:
http://adwords-api-dotnet-samples.googlecode.com/svn-history/r25/trunk/src/AddKeyword.cs

// Add keyword if there are no policy violations.
if (errors == null) {
Criterion[] criteria = service.addCriteria(
new Criterion[] {keyword});

Please refer us to the documentation that we should look at or suggest
what we should do. We'd appreciate any help.

AdWords API Advisor

unread,
Jul 13, 2009, 5:16:18 PM7/13/09
to AdWords API Forum
Hello,

The recommended solution would be to keep track of which keywords are
currently in a given ad group, and don't attempt add identical
keywords to the same ad group.

That being said, if you try to add a keyword into an ad group that
already has a keyword with the same text and match type, nothing
disastrous should happen. The existing keyword (including click
history) should be maintained. You'll be charged for the keyword
addition, though.

Cheers,
-Jeff Posnick, AdWords API Team


On Jul 13, 3:50 pm, notalian <p...@esided.com> wrote:
> We are trying to use Adwords API to add keyword to an existing
> adgroup. We'd like to implement it so it ignores keywords that already
> exist and inserts only the ones that do not exist in the adgroup.
>
> Currently, API inserts all keywords which results in duplicate
> keywords. We are using code found on this page:http://adwords-api-dotnet-samples.googlecode.com/svn-history/r25/trun...

notalian

unread,
Jul 14, 2009, 10:15:23 AM7/14/09
to AdWords API Forum
We'd like to know if it's possible to make a call to the API to
determine whether or not a keyword already exists in a particular
adgroup.

On Jul 13, 4:16 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> > what we should do. We'd appreciate any help.- Hide quoted text -
>
> - Show quoted text -

AdWords API Advisor

unread,
Jul 14, 2009, 12:10:09 PM7/14/09
to AdWords API Forum
Hello,

There's no AdWords API method that will give you back a true or false
value depending on whether a keyword already exists in an ad group.
You'd have to get a list of keywords that already exist in an ad group
(either via a report or via CriterionService.getAllCriteria()) and
then compare the existing keyword text and match types to the proposed
new keyword and check for duplicates.

Or you could just add the keyword blindly and if it's a duplicate you
should get back the id of the existing keyword instead of a new
keyword id.

Cheers,
-Jeff Posnick, AdWords API Team


Reply all
Reply to author
Forward
0 new messages