AdsApp.NegativeKeyword
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads negative keyword. Negative keywords can exist either at the ad group level or the campaign
level.
Methods:
getAdGroup()
Returns the AdGroup
to which the negative
keyword belongs. This will return null
for campaign-level
negative keywords and negative keywords which do not belong to a search or
display ad group. Return values:
getBaseAdGroup()
Returns the base AdGroup
to which the
negative keyword belongs. This will return null
for
campaign-level negative keywords and negative keywords which do not belong
to a search or display ad group. Return values:
getBaseCampaign()
Returns the base campaign to which this negative keyword belongs or null
if it does not belong to a search or display campaign. Return values:
getCampaign()
Returns the campaign to which this negative keyword belongs or null
if it does not belong to a search or display campaign. Return values:
getCampaignType()
Returns the campaign type. Possible return values: SEARCH_OR_DISPLAY, VIDEO, SHOPPING
Return values:
getEntityType()
Returns the type of this entity as a String
, in this case, "NegativeKeyword"
. Return values:
getMatchType()
Returns the match type of the negative keyword. Possible values: BROAD, PHRASE, EXACT
. Return values:
Returns the ShoppingAdGroup
to
which the negative keyword belongs. This will return null
for
campaign-level negative keywords and negative keywords which do not belong
to a shopping ad group. Return values:
Returns the shopping campaign to which this negative keyword belongs or null
if it does not belong to a shopping campaign. Return values:
getText()
Returns the text of the negative keyword. The returned value will be
formatted as follows, depending on the match type: -
shoes
- broad match
-
"shoes"
- phrase match
-
[leather shoes]
- exact match
Return values:
remove()
Removes the negative keyword. Returns nothing.
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-09-03 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-09-03 UTC."],[[["\u003cp\u003eRepresents a Google Ads negative keyword, preventing ads from showing on searches with those terms.\u003c/p\u003e\n"],["\u003cp\u003eNegative keywords can be applied at the ad group level or the campaign level for more granular control.\u003c/p\u003e\n"],["\u003cp\u003eProvides methods to access and manage negative keyword data, such as text, match type, and associated campaigns/ad groups.\u003c/p\u003e\n"],["\u003cp\u003eAllows retrieval of negative keyword information for different campaign types, including Search, Display, Shopping, and Video.\u003c/p\u003e\n"],["\u003cp\u003eEnables the removal of negative keywords using the \u003ccode\u003eremove()\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,[]]