Register for one of our upcoming AdWords scripts workshops.

AdWordsApp.​NegativeKeyword

Represents an AdWords negative keyword.

Negative keywords can exist either at the ad group level or the campaign level.

Methods:

MemberTypeDescription
getAdGroup AdWordsApp.AdGroup Returns the AdGroup to which the negative keyword belongs.
getCampaign AdWordsApp.Campaign Returns the Campaign to which the negative keyword belongs.
getEntityType String Returns the type of this entity as a String, in this case, "NegativeKeyword".
getMatchType String Returns the match type of the negative keyword.
getText String Returns the text of the negative keyword.
remove void Removes the negative keyword.

getAdGroup()

Returns the AdGroup to which the negative keyword belongs. This will always return null for campaign-level negative keywords.

Return values:

TypeDescription
AdWordsApp.AdGroup The AdGroup to which the negative keyword belongs.

getCampaign()

Returns the Campaign to which the negative keyword belongs.

Return values:

TypeDescription
AdWordsApp.Campaign The Campaign to which the negative keyword belongs.

getEntityType()

Returns the type of this entity as a String, in this case, "NegativeKeyword".

Return values:

TypeDescription
String Type of this entity: "NegativeKeyword".

getMatchType()

Returns the match type of the negative keyword. Possible values: BROAD, PHRASE, EXACT.

Return values:

TypeDescription
String The match type of the negative keyword.

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:

TypeDescription
String The text of the negative keyword.

remove()

Removes the negative keyword.

Returns nothing.

Send feedback about...

AdWords Scripts
AdWords Scripts
Need help? Visit our support page.