AdWordsApp.​ExcludedDisplayKeywordSelector

Fetches excluded display keywords. Supports filtering and sorting.

Typical usage:

 var adGroup = AdWordsApp.adGroups().get().next();
 var excludedDisplayKeywordSelector = adGroup.display().excludedKeywords();

 var excludedDisplayKeywordIterator = excludedDisplayKeywordSelector.get();
 while (excludedDisplayKeywordIterator.hasNext()) {
   var excludedDisplayKeyword = excludedDisplayKeywordIterator.next();
 }
Related:

Methods:

MemberTypeDescription
get AdWordsApp.ExcludedDisplayKeywordIterator Fetches the requested excluded display keywords and returns an iterator.
orderBy AdWordsApp.ExcludedDisplayKeywordSelector Specifies the ordering of the resulting entities.
withCondition AdWordsApp.ExcludedDisplayKeywordSelector Adds the specified condition to the selector in order to narrow down the results.
withLimit AdWordsApp.ExcludedDisplayKeywordSelector Specifies limit for the selector to use.

get()

Fetches the requested excluded display keywords and returns an iterator.

Return values:

TypeDescription
AdWordsApp.ExcludedDisplayKeywordIterator Iterator of the requested excluded display keywords.

orderBy(orderBy)

Specifies the ordering of the resulting entities. orderBy parameter can have one of the following forms:
  • orderBy("Text") - orders results by Text, in ascending order.
  • orderBy("Text ASC") - orders results by Text, in ascending order.
  • orderBy("Text DESC") - orders results by Text, in descending order.

See ExcludedDisplayKeywordSelector.withCondition(String) for enumeration of columns that can be used.

orderBy() may be called multiple times. Consider the following example:

 selector = selector.
     .orderBy("Text")
     .orderBy("KeywordMatchType");

The results will be ordered by Text in ascending order. Results with equal Text value will be ordered by KeywordMatchType in ascending order.

Arguments:

NameTypeDescription
orderBy String Ordering to apply.

Return values:

TypeDescription
AdWordsApp.ExcludedDisplayKeywordSelector The selector with ordering applied.

withCondition(condition)

Adds the specified condition to the selector in order to narrow down the results.

Multiple conditions may be added to the same selector:

 selector = selector
     .withCondition("Text STARTS_WITH 'a'")
     .withCondition("KeywordMatchType = BROAD");
All specified conditions are AND-ed together. The above example will retrieve excluded display keywords that start with the letter 'a' and are of broad match type.

The parameter to be passed into this method must be of the following form:

 "COLUMN_NAME OPERATOR VALUE"

Operators

The operator that can be used in a condition depends on the type of column.
  • For String columns (e.g. Text):
    =  !=  STARTS_WITH  STARTS_WITH_IGNORE_CASE  CONTAINS
     CONTAINS_IGNORE_CASE  DOES_NOT_CONTAIN  DOES_NOT_CONTAIN_IGNORE_CASE
  • For Enumeration columns (ones that can only take one value from a pre-defined list, such as KeywordMatchType):
    =  !=  IN []  NOT_IN []
Conditions using IN, NOT_IN, CONTAINS_ALL, CONTAINS_ANY and CONTAINS_NONE operators look as follows:
 withCondition("KeywordMatchType IN [Value1, Value2]")
Operators are case-sensitive: starts_with won't work.

Columns

All column names are case-sensitive, and so are all values of enumerated columns (such as KeywordMatchType)

Column Type Example
Excluded display keyword attributes
Text String withCondition("Text STARTS_WITH 'leather'")
KeywordMatchType Enumeration: BROAD, EXACT, PHRASE withCondition("KeywordMatchType = PHRASE")
AdGroupName String withCondition("AdGroupName CONTAINS_IGNORE_CASE 'shoes'")
AdGroupStatus Enumeration: ENABLED, PAUSED, REMOVED withCondition("AdGroupStatus = ENABLED"). Use to fetch excluded display keywords from only ENABLED ad groups.
CampaignName String withCondition("CampaignName CONTAINS_IGNORE_CASE 'promotion'")
CampaignStatus Enumeration: ENABLED, PAUSED, REMOVED withCondition("CampaignStatus = ENABLED"). Use to fetch excluded display keywords from only ENABLED campaigns.

Arguments:

NameTypeDescription
condition String Condition to add to the selector.

Return values:

TypeDescription
AdWordsApp.ExcludedDisplayKeywordSelector The selector with the condition applied.

withLimit(limit)

Specifies limit for the selector to use. For instance, withLimit(50) returns only the first 50 entities.

Arguments:

NameTypeDescription
limit int How many entities to return.

Return values:

TypeDescription
AdWordsApp.ExcludedDisplayKeywordSelector The selector with limit applied.

发送以下问题的反馈:

此网页
AdWords Scripts
AdWords Scripts
需要帮助?请访问我们的支持页面