set
Sets fixed bids for keywords and autotargetings.
You can set a bid for:
-
A separate keyword or autotargeting.
-
All keywords and autotargetings in an ad group.
-
All keywords and autotargetings in a campaign.
You can set a bid based on your campaign's display strategy:
- If you've chosen the HIGHEST_POSITION display strategy for Yandex Search, you can specify the
SearchBid
parameter. - If you've chosen the MAXIMUM_COVERAGE or MANUAL_CPM display strategy for ad networks, you can specify the
NetworkBid
parameter.
If an item in the input array contains parameters that are not appropriate for the strategy, the values of these parameters are not changed.
-
If an item in the input array contains parameters that both match and don't match the strategy, the operation only changes the values of the parameters that match the strategy, and a warning is returned.
-
If an item in the input array only contains parameters that don't match the strategy, the operation doesn't run and an error is returned.
Learn more
Restrictions
A single request can only set bids for the same type of objects — either for campaigns only, or for groups only, or for keywords and autotargetings only.
Maximum number of objects per method call:
- Campaigns: A maximum of
campaign-ids-select
- Groups: A maximum of
adgroup-ids-select
- Keywords and autotargetings: no more than
ids-select
.
Request
Request structure in JSON format:
{
"method": "set",
"params": { /* params */
"KeywordBids": [{ /* KeywordBidSetItem */
"CampaignId": (long),
"AdGroupId": (long),
"KeywordId": (long),
"SearchBid": (long),
"AutotargetingSearchBidIsAuto" : ("YES"|"NO"),
"NetworkBid": (long),
"StrategyPriority": ( "LOW" | "NORMAL" | "HIGH" )
}, ... ] /* required */
}
}
Parameter |
Type |
Description |
Required |
params structure (for JSON) / SetRequest structure (for SOAP) |
|||
|
array of KeywordBidSetItem |
Bids. |
Yes |
KeywordBidSetItem structure |
|||
|
long |
The campaign ID. Specify it when you want to set the same bid for all keywords and autotargetings in your campaign. |
Use either |
|
long |
ID of the ad group. Specify it when you want to set the same bid for all keywords and autotargetings in an ad group. |
|
|
long |
The keyword ID. Specified when setting a bid or priority for an individual keyword or autotargeting. |
|
|
long |
The bid on search, multiplied by 1,000,000. Integer. Only for manual strategies. Specified in the advertiser's currency. Restrictions are listed in the currency reference. To get it, use the Dictionaries.get method and specify the |
At least one of the parameters: |
|
YesNoEnum |
A flag indicating whether automatic bid is enabled. You can specify a manual bid ( If only a manual bid (
|
|
|
long |
The bid in ad networks, multiplied by 1,000,000. Integer. Only for manual strategies with independent bid management in ad networks. Specified in the advertiser's currency. Restrictions are listed in the currency reference. To get it, use the Dictionaries.get method and specify the Alert An image ad can be displayed only if the bid is at least as high as the minimum bid for an ad with an image. |
|
|
PriorityEnum |
Priority of the keyword: LOW, NORMAL or HIGH. Only for automatic strategies. Alert This parameter is not used, and the passed value is ignored. |
Alert
The CampaignId
, AdGroupId
and KeywordId
parameters are mutually exclusive. A single request may only contain one of these parameters.
Response
Response structure in JSON format:
{
"result": { /* result */
"SetResults": [{ /* KeywordBidActionResult */
"Warnings": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ... ],
"Errors": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ... ],
"CampaignId": (long),
"AdGroupId": (long),
"KeywordId": (long)
}, ... ]
}
}
Parameter |
Type |
Description |
result structure (for JSON) / SetResponse structure (for SOAP) |
||
|
array of KeywordBidActionResult |
The results of the bidding. |
KeywordBidActionResult structure |
||
|
long |
The campaign ID. Returned if there aren't any errors. See the section Operations on object arrays (if it was specified in the request). |
|
long |
ID of the ad group. Returned if there aren't any errors. See the section Operations on object arrays (if it was specified in the request). |
|
long |
ID of the keyword or autotargeting. Returned if there aren't any errors. See the section Operations on object arrays (if it was specified in the request). |
|
array of ExceptionNotification |
Warnings that occurred during the operation. |
|
array of ExceptionNotification |
Errors that occurred during the operation. |
Example
Request
{
"method" : "set",
"params" : {
"KeywordBids" : [
{
"StrategyPriority" : "HIGH",
"CampaignId" : 4193065
},
{
"SearchBid" : 14000,
"CampaignId" : 7273721
}
]
}
}
Response
{
"result" : {
"SetResults" : [
{
"CampaignId" : 4193065
},
{
"CampaignId" : 7273721
}
]
}
}