Keyword

Contains the methods for managing a keyword. For information about keywords, see Keyword.

Methods

Method Name Return Type Description
adParams AdParamSelector Gets a selector used to get all substitution parameters used in the ad for this keyword.
applyLabel(string name) void Applies the label to this keyword.
bidding KeywordBidding Gets the methods used to manage this keyword's bid amount.
clearDestinationUrl void Removes this keyword's destination URL.
enable void Enables this keyword.
getAdGroup AdGroup Gets the ad group that this keyword belongs to.
getApprovalStatus string Gets this keyword's editorial approval status.
getCampaign Campaign Gets the campaign that this keyword belongs to.
getEntityType string Gets this entity's type.
getFirstPageCpc double Gets the estimated bid needed to be on the first page of the search results.
getId string Gets the ID that uniquely identifies this keyword.
getMatchType string Gets this keyword's match type.
getQualityScore integer Gets this keyword's quality score.
getStats Stats Gets this keyword's performance data.
getText string Gets the keyword's text.
getTopOfPageCpc double Gets the estimated bid needed to be at the top of the search results.
isEnabled Boolean Gets a Boolean value that indicates whether this keyword is enabled.
isPaused Boolean Gets a Boolean value that indicates whether this keyword is paused.
labels LabelSelector Gets a selector used to filter the list of labels associated with this keyword.
pause void Pauses this keyword.
remove void Removes this keyword.
removeLabel(string name) void Removes the label from this keyword.
setAdParam(int index, string insertionText) void Adds the substitution parameter and sets its value to the specified text.
urls KeywordUrls Gets the methods used to manage this keywords's final URLs, tracking template, and custom parameters.

adParams

Gets a selector of all substitution parameters used in ads for this keyword.

The substitution values are used in an ad if the ad's title, text, display URL, or destination URL contains the {Param1}, {Param2}, or {Param3} dynamic substitution string.

Returns

Type Description
AdParamSelector The selector that contains the list of substitution parameters for this keyword.

applyLabel(string name)

Applies the label to the keyword.

You may apply a maximum of 50 labels to a keyword. For an example that adds a label to a keyword, see Using labels.

Arguments

Name Type Description
name string The label's case-sensitive name. To get a list of labels in this account that you can apply, see AdsApp.labels.

Returns

Type Description
void Returns nothing.

bidding

Gets the methods used to manage this keyword's bid amount.

Returns

Type Description
KeywordBidding Contains the methods used to manage this keyword's bid amount.

clearDestinationUrl

Removes this keyword's destination URL.

Returns

Type Description
void Returns nothing.

enable

Enables this keyword.

Returns

Type Description
void Returns nothing.

getAdGroup

Gets the ad group that this keyword belongs to.

Returns

Type Description
AdGroup The ad group that this keyword belongs to.

getApprovalStatus

Gets this keyword's editorial approval status.

Returns

Type Description
string The keyword's editorial approval status. The status indicates whether the keyword is under review, is approved, or is not allowed. Possible values are:
  • APPROVED
  • APPROVED_LIMITED
  • DISAPPROVED
  • UNDER_REVIEW
For information about how these status values map to Bing Ads API, see Mapping editorial approval status values.

getCampaign

Gets the campaign that this keyword belongs to.

Returns

Type Description
Campaign The campaign that this keyword belongs to.

getEntityType

Returns this entity's type.

Returns

Type Description
string This entity's type, which is Keyword.

getId

Gets the ID that uniquely identifies this keyword.

Returns

Type Description
string The ID that uniquely identifies this keyword.

getFirstPageCpc

Gets the estimated bid needed for the ad to show up on the sidebar.

Returns

Type Description
double The estimated bid needed for the ad to show up on the sidebar.

getMatchType

Gets this keyword's match type.

Returns

Type Description
string The keyword's match type. Possible values are:
  • BROAD
  • PHRASE
  • EXACT
For information about these types, see What are keyword match types, and how do I use them?

getQualityScore

Gets this keyword's quality score.

Returns

Type Description
integer The keyword's quality score. The score is in the range 1 through 10 (highest). If the keyword's quality score cannot be computed, this method returns NULL.

The score shows you how competitive your ads are in the marketplace by measuring how relevant your keywords and landing pages are to customers' search terms. For more information, see Keyword Performance Report.

getStats

Gets this keywords performance data.

To call this method, you must include one of the forDateRange methods in the keyword selector's chain.

Returns

Type Description
Stats The keyword's performance data. For example, clicks and impressions.

getText

Gets the keyword's text. The text includes the keyword's match type syntax, if any. For example:

  • The keyword is books if the match type is broad, or +books if the keyword uses the broad type modifier
  • The keyword is "books" if the match type is phrase
  • The keyword is [hardcover books] if the match type is exact

For information about these types, see What are keyword match types, and how do I use them?

Returns

Type Description
string The keyword's text.

getTopOfPageCpc

Gets the estimated bid needed for the ad to show up above the organic search results.

Returns

Type Description
double The estimated bid needed for the ad to show up above the organic search results.

isEnabled

Gets a Boolean value that indicates whether this keyword is enabled.

Returns

Type Description
Boolean Is true if this keyword is enabled; otherwise, false.

isPaused

Gets a Boolean value that indicates whether this keyword is paused.

Returns

Type Description
Boolean Is true if this keyword is paused; otherwise, false.

labels

Gets a selector used to filter the list of labels associated with this keyword.

Returns

Type Description
LabelSelector A selector used to filter the list of labels associated with this keyword.

pause

Pauses this keyword.

Returns

Type Description
void Returns nothing.

remove

Removes this keyword.

Returns

Type Description
void Returns nothing.

removeLabel(string name)

Removes the label from the keyword.

Arguments

Name Type Description
name string The label's case-sensitive name. To get a list of labels associated with this keyword, see labels.

Returns

Type Description
void Returns nothing.

setAdParam(int index, string insertionText)

Adds the substitution parameter and sets its value to the specified text. If the substitution parameter exists, it's text is overwritten.

The substitution values are used in an ad if the ad's title, text, display URL, or final URL contains the {Param1}, {Param2}, or {Param3} dynamic substitution strings. For restrictions and information about using these parameters, see Param1, Param2, and Param3.

The substitution values are also used in the tracking template if the template specifies the {param1:default}, {param2:default}, or {param3:default} placeholders.

Arguments

Name Type Description
index int The index of the substitution parameter to set. Valid index values are 1 through 3, inclusive. Use 1 for Param1, 2 for Param2, and 3 for Param3.
insertionText string The text to set the substitution parameter to.

Returns

Type Description
void Returns nothing.

urls

Gets the methods used to manage this keywords's final URLs, tracking template, and custom parameters.

Returns

Type Description
KeywordUrls Contains the methods used the keyword's final URLs, tracking template, and custom parameters.

See also