add: TextCampaign parameters

Attention. All monetary campaign parameters (daily budget, weekly budget, and average price for automatic strategies) are passed via the Yandex.Direct API as integer numbers. The passed value is a monetary value in the advertiser's currency, multiplied by 1,000,000.

Request structure in JSON format:

{
  "method": "add",
  "params": {
    "Campaigns": [{  /* CampaignAddItem */
      ...
      "TextCampaign": {  /* TextCampaignAddItem */
        "BiddingStrategy": {  /* TextCampaignStrategyAdd */
          "Search": {  /* TextCampaignSearchStrategyAdd */
            "BiddingStrategyType": ( "AVERAGE_CPA" | ... | "WEEKLY_CLICK_PACKAGE" ), /* required */
            "WbMaximumClicks": {  /* StrategyMaximumClicksAdd */
              "WeeklySpendLimit": (long), /* required */
              "BidCeiling": (long)
            },
            "WbMaximumConversionRate": {  /* StrategyMaximumConversionRateAdd */
              "WeeklySpendLimit": (long), /* required */
              "BidCeiling": (long),
              "GoalId": (long) /* required */
            },
            "AverageCpc": {  /* StrategyAverageCpcAdd */
              "AverageCpc": (long), /* required */
              "WeeklySpendLimit": (long)
            },
            "AverageCpa": {  /* StrategyAverageCpaAdd */
              "AverageCpa": (long), /* required */
              "GoalId": (long), /* required */
              "WeeklySpendLimit": (long),
              "BidCeiling": (long)
            },
            "WeeklyClickPackage": {  /* StrategyWeeklyClickPackageAdd */
              "ClicksPerWeek": (long), /* required */
              "AverageCpc": (long),
              "BidCeiling": (long)
            },
            "AverageRoi": {  /* StrategyAverageRoiAdd */
              "ReserveReturn": (int), /* required */
              "RoiCoef": (long), /* required */
              "GoalId": (long), /* required */
              "WeeklySpendLimit": (long),
              "BidCeiling": (long),
              "Profitability": (long)
            }
          }, /* required */
          "Network": {  /* TextCampaignNetworkStrategyAdd */
            "BiddingStrategyType": ( "AVERAGE_CPA" | ... | "WEEKLY_CLICK_PACKAGE" ), /* required */
            "NetworkDefault": {  /* StrategyNetworkDefaultAdd */
              "LimitPercent": (int),
              "BidPercent": (int)
            },
            "WbMaximumClicks": {  /* StrategyMaximumClicksAdd */
              "WeeklySpendLimit": (long), /* required */
              "BidCeiling": (long)
            },
            "WbMaximumConversionRate": {  /* StrategyMaximumConversionRateAdd */
              "WeeklySpendLimit": (long), /* required */
              "BidCeiling": (long),
              "GoalId": (long) /* required */
            },
            "AverageCpc": {  /* StrategyAverageCpcAdd */
              "AverageCpc": (long), /* required */
              "WeeklySpendLimit": (long)
            },
            "AverageCpa": {  /* StrategyAverageCpaAdd */
              "AverageCpa": (long), /* required */
              "GoalId": (long), /* required */
              "WeeklySpendLimit": (long),
              "BidCeiling": (long)
            },
            "WeeklyClickPackage": {  /* StrategyWeeklyClickPackageAdd */
              "ClicksPerWeek": (long), /* required */
              "AverageCpc": (long),
              "BidCeiling": (long)
            },
            "AverageRoi": {  /* StrategyAverageRoiAdd */
              "ReserveReturn": (int), /* required */
              "RoiCoef": (long), /* required */
              "GoalId": (long), /* required */
              "WeeklySpendLimit": (long),
              "BidCeiling": (long),
              "Profitability": (long)
            }
          } /* required */
        }, /* required */
        "Settings": [{  /* TextCampaignSetting */
          "Option": ( "ADD_METRICA_TAG" | ... | "REQUIRE_SERVICING" ), /* required */
          "Value": ( "YES" | "NO" ) /* required */
        }, ... ],
        "CounterIds": {  /* ArrayOfInteger */
          "Items": [(int), ... ] /* required */
        },
        "RelevantKeywords": {  /* RelevantKeywordsSettingAdd */
          "BudgetPercent": (int), /* required */
          "OptimizeGoalId": (long) /* nillable */
        }
      }
    }, ... ] /* required */
  }
}
ParameterTypeDescriptionRequired
TextCampaignAddItem structure
BiddingStrategyTextCampaignStrategyAddDisplay strategy.Yes
Settingsarray of TextCampaignSettingArray of settings that only accept the values YES or NO.No
CounterIdsArrayOfIntegerIDs of Yandex.Metrica tags installed on the advertiser's website (see Yandex.Metrica: advertising campaign efficiency evaluation in the Help for Direct). Maximum of 5 items in the array.No
RelevantKeywordsRelevantKeywordsSettingAddSettings for displays for related keywords (see Impressions for related keywords in the Help for Yandex.Direct). If this structure is omitted, displays for related keywords are disabled.No
TextCampaignSetting structure
OptionTextCampaignSettingsEnum

Setting name:

Yes
ValueYesNoEnumSetting value.Yes
RelevantKeywordsSettingAdd structure
BudgetPercentint

Maximum percent of the budget to be spent on clicks on related keywords (from 1 to 100).

Yes
OptimizeGoalIdlong, nillable

The ID of a Yandex.Metrica goal for optimizing related keywords.

You can't set a specific goal during campaign creation. The following values are allowed:

  • 0 — Related keywords are optimized for all the goals available for the campaign.

  • null (nil) — No optimization.

If the parameter is omitted, the default value is 0.

No
TextCampaignStrategyAdd structure
NetworkTextCampaignNetworkStrategyAddDisplay strategy in ad networks.Yes
TextCampaignSearchStrategyAdd structure
BiddingStrategyTypeTextCampaignSearchStrategyTypeEnum

The type of display strategy in search results:

For information about the compatibility of strategies in search results and ad networks, see the section Display strategies.

Yes
WbMaximumClicksStrategyMaximumClicksAddParameters for the Weekly budget strategy (maximum clicks).When the BiddingStrategyType parameter has the value WB_MAXIMUM_CLICKS
WbMaximumConversionRateStrategyMaximumConversionRateAddParameters for the Weekly budget strategy (maximum conversion rate).When the BiddingStrategyType parameter has the value WB_MAXIMUM_CONVERSION_RATE
AverageCpcStrategyAverageCpcAddParameters for the Average CPC strategy.When the BiddingStrategyType parameter has the value AVERAGE_CPC
AverageCpaStrategyAverageCpaAddParameters for the Average CPA strategy.When the BiddingStrategyType parameter has the value AVERAGE_CPA
AverageRoiStrategyAverageRoiAddParameters for the Average ROI strategy.When the BiddingStrategyType parameter has the value AVERAGE_ROI
WeeklyClickPackageStrategyWeeklyClickPackageAddParameters for the Weekly click package strategy.When the BiddingStrategyType parameter has the value WEEKLY_CLICK_PACKAGE
TextCampaignNetworkStrategyAdd structure
BiddingStrategyTypeTextCampaignNetworkStrategyTypeEnum

The type of display strategy in ad networks:

For information about the compatibility of strategies in search results and ad networks, see the section Display strategies.

Yes
NetworkDefaultStrategyNetworkDefaultAddParameters for the “Manual bid management with optimization in ad networks” strategy (the bid is set relative to the bid in search results).When the BiddingStrategyType parameter has the value NETWORK_DEFAULT
WbMaximumClicksStrategyMaximumClicksAddParameters for the Weekly budget strategy (maximum clicks).When the BiddingStrategyType parameter has the value WB_MAXIMUM_CLICKS
WbMaximumConversionRateStrategyMaximumConversionRateAddParameters for the Weekly budget strategy (maximum conversion rate).When the BiddingStrategyType parameter has the value WB_MAXIMUM_CONVERSION_RATE
AverageCpcStrategyAverageCpcAddParameters for the Average CPC strategy.When the BiddingStrategyType parameter has the value AVERAGE_CPC
AverageCpaStrategyAverageCpaAddParameters for the Average CPA strategy.When the BiddingStrategyType parameter has the value AVERAGE_CPA
AverageRoiStrategyAverageRoiAddParameters for the Average ROI strategy.When the BiddingStrategyType parameter has the value AVERAGE_ROI
WeeklyClickPackageStrategyWeeklyClickPackageAddParameters for the Weekly click package strategy.When the BiddingStrategyType parameter has the value WEEKLY_CLICK_PACKAGE
StrategyMaximumClicksAdd structure
WeeklySpendLimitlong

The weekly budget in the advertiser's currency, multiplied by 1,000,000.

The minimum weekly budget for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Yes
BidCeilinglong

The maximum bid in the advertiser's currency, multiplied by 1,000,000.

The minimum and maximum bid for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Note. We don't recommend setting the maximum bid, as this may reduce the effectiveness of the strategy.
No
StrategyMaximumConversionRateAdd structure
WeeklySpendLimitlong

The weekly budget in the advertiser's currency, multiplied by 1,000,000.

The minimum weekly budget for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Yes
BidCeilinglong

The maximum bid in the advertiser's currency, multiplied by 1,000,000.

The minimum and maximum bid for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Note. We don't recommend setting the maximum bid, as this may reduce the effectiveness of the strategy.
No
GoalIdlong

ID of a Yandex.Metrica goal (only non-composite goals are appropriate). For more information about goals, see Goals and conversions in the Help for Metrica.

The value of 0 is all goals set on the site (except composite goals).

To get the list of goals, use the GetStatGoals method in version 4 or Live 4 of the API.

Yes
StrategyAverageCpcAdd structure
AverageCpclong

The average CPC in the advertiser's currency, multiplied by 1,000,000.

The minimum value for the average price is listed by currency in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Yes
WeeklySpendLimitlong

The weekly budget in the advertiser's currency, multiplied by 1,000,000.

The minimum weekly budget for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

No
StrategyAverageCpaAdd structure
AverageCpalong

The average cost of a conversion (CPA) in the advertiser's currency, multiplied by 1,000,000.

The minimum value for the average price is listed by currency in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Yes
WeeklySpendLimitlong

The weekly budget in the advertiser's currency, multiplied by 1,000,000.

The minimum weekly budget for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

No
GoalIdlong

ID of a Yandex.Metrica goal (only non-composite goals are appropriate). For more information about goals, see Goals and conversions in the Help for Metrica.

The value of 0 is all goals set on the site (except composite goals).

To get the list of goals, use the GetStatGoals method in version 4 or Live 4 of the API.

Yes
BidCeilinglong

The maximum bid in the advertiser's currency, multiplied by 1,000,000.

The minimum and maximum bid for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Note. We don't recommend setting the maximum bid, as this may reduce the effectiveness of the strategy.
No
StrategyAverageRoiAdd structure
ReserveReturnint

The maximum percent of saved funds that can be returned to advertising (spent) if the forecasted return on investment exceeds the value of the RoiCoef parameter.

A value from 0 to 100 as a multiple of ten: 0, 10, 20... 100.

Yes
RoiCoeflong

The desired average return on investment per week. The value represents the ratio of profit from sales to advertising expenses, multiplied by 1,000,000. The value must be an integer. If the value is not a multiple of 10,000, the last 4 digits are reset to zero (which is the same as discarding extra digits after the decimal point).

Yes
GoalIdlong

ID of a Yandex.Metrica goal (only non-composite goals are appropriate). For more information about goals, see Goals and conversions in the Help for Metrica.

The value of 0 is all goals set on the site (except composite goals).

To get the list of goals, use the GetStatGoals method in version 4 or Live 4 of the API.

Yes
WeeklySpendLimitlong

The weekly budget in the advertiser's currency, multiplied by 1,000,000.

The minimum weekly budget for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

No
BidCeilinglong

The maximum bid in the advertiser's currency, multiplied by 1,000,000.

The minimum and maximum bid for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Note. We don't recommend setting the maximum bid, as this may reduce the effectiveness of the strategy.
No
Profitabilitylong

The percentage of revenue that is the cost value of products or services.

The value is a percent multiplied by 1,000,000. The value must be an integer from 0 to 100,000,000 (which equals 100%). If the value is not a multiple of 10,000, the last 4 digits are reset to zero (which is the same as discarding extra digits after the decimal point).

No
StrategyWeeklyClickPackageAdd structure
ClicksPerWeeklongDesired number of clicks per week.Yes
AverageCpclong

The average CPC in the advertiser's currency, multiplied by 1,000,000.

The minimum value for the average price is listed by currency in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Note. The AverageCpc and BidCeiling parameters are mutually exclusive. You can't specify both of them.
No
BidCeilinglong

The maximum bid in the advertiser's currency, multiplied by 1,000,000.

The minimum and maximum bid for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method.

Note. The AverageCpc and BidCeiling parameters are mutually exclusive. You can't specify both of them.
No
StrategyNetworkDefaultAdd structure
LimitPercentintThe maximum percentage of the budget to spend on displays in ad networks. The value is a multiple of ten: 10, 20, ..., 100. The default value is 100.No
BidPercentintThe limit on the bid in ad networks. Set as a percentage of the bid in search results. The value is a multiple of ten: 10, 20, ..., 100. The value 100 makes the bid in ad networks equal to the price in search results. The default value is 100.No