AdsApp.NegativeKeywordListBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for a negative keyword list under construction.
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:
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:
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:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eNegativeKeywordListBuilder\u003c/code\u003e is used to create new negative keyword lists in Google Ads.\u003c/p\u003e\n"],["\u003cp\u003eCalling \u003ccode\u003ebuild()\u003c/code\u003e on the builder is sufficient to create the negative keyword list.\u003c/p\u003e\n"],["\u003cp\u003eTo access the created list for further actions, use \u003ccode\u003eNegativeKeywordListOperation.getResult()\u003c/code\u003e after calling \u003ccode\u003ebuild()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewithName()\u003c/code\u003e method allows assigning a specific name to the negative keyword list during creation.\u003c/p\u003e\n"]]],[],null,["# AdsApp.NegativeKeywordListBuilder\n\nBuilder for a negative keyword list under construction.\n\nTypical usage:\n\n```gdscript\nvar negativeKeywordListOperation =\n AdsApp.newNegativeKeywordListBuilder()\n .withName(\"NegativeKeywordList\")\n .build();\nvar negativeKeywordList = negativeKeywordListOperation.getResult();\n```\n\nNote that it is only necessary to call [NegativeKeywordListOperation.getResult](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlistoperation#getResult)\nif you need to access the actual negative keyword list for further\nprocessing. Otherwise, calling [NegativeKeywordListBuilder.build()](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlistbuilder#build)\non the `NegativeKeywordListBuilder` is sufficient to ensure that\nthe NegativeKeywordList is created.\n\n### Methods:\n\n| Member | Type | Description |\n|----------------------------------|----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| [build()](#build) | [AdsApp.NegativeKeywordListOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlistoperation) | Creates a [NegativeKeywordList](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlist). |\n| [withName(name)](#withName_name) | [AdsApp.NegativeKeywordListBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlistbuilder) | Sets the name of the new negative keyword list to the specified value. |\n\n`build()`\n---------\n\nCreates a [NegativeKeywordList](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlist). Returns a [NegativeKeywordListOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlistoperation) that can be used to get the new negative keyword list (or access any associated errors if creation failed).\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------|\n| [AdsApp.NegativeKeywordListOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlistoperation) | The associated negative keyword list operation. |\n\n`withName(name)`\n----------------\n\nSets the name of the new negative keyword list to the specified value.\n\n### Arguments:\n\n| Name | Type | Description |\n|------|----------|----------------------------------------|\n| name | `String` | Name of the new negative keyword list. |\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------|\n| [AdsApp.NegativeKeywordListBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_negativekeywordlistbuilder) | The negative keyword list builder with the specified name. |"]]