AI-generated Key Takeaways
-
The
NegativeKeywordListBuilder
is used to create new negative keyword lists in Google Ads. -
Calling
build()
on the builder is sufficient to create the negative keyword list. -
To access the created list for further actions, use
NegativeKeywordListOperation.getResult()
after callingbuild()
. -
The
withName()
method allows assigning a specific name to the negative keyword list during creation.
Typical usage:
var negativeKeywordListOperation = AdsApp.newNegativeKeywordListBuilder() .withName("NegativeKeywordList") .build(); var negativeKeywordList = negativeKeywordListOperation.getResult();
Note that it is only necessary to call NegativeKeywordListOperation.getResult
if you need to access the actual negative keyword list for further
processing. Otherwise, calling NegativeKeywordListBuilder.build()
on the NegativeKeywordListBuilder
is sufficient to ensure that
the NegativeKeywordList is created.
Methods:
Member | Type | Description |
---|---|---|
build() | AdsApp.NegativeKeywordListOperation |
Creates a NegativeKeywordList. |
withName(name) | AdsApp.NegativeKeywordListBuilder |
Sets the name of the new negative keyword list to the specified value. |
build()
Creates a NegativeKeywordList.
Returns a NegativeKeywordListOperation that can be used to get the new negative keyword list (or
access any associated errors if creation failed). Return values:
Type | Description |
---|---|
AdsApp.NegativeKeywordListOperation |
The associated negative keyword list operation. |
withName(name)
Sets the name of the new negative keyword list to the specified value. Arguments:
Name | Type | Description |
---|---|---|
name | String |
Name of the new negative keyword list. |
Return values:
Type | Description |
---|---|
AdsApp.NegativeKeywordListBuilder |
The negative keyword list builder with the specified name. |