GetCampaignsParams (Live)
Returns campaigns parameters.
Restrictions
Alert
The method returns only campaigns with the "Text & Image Ads" type. To work with campaigns of all types, use the Campaigns service in API version 5. Learn more about campaign types...
What's new in Live version 4
Added the ContextStrategy parameter, which sets the ad serving strategy for the Yandex Advertising Network. The ContextLimit, ContextLimitSum, and ContextPricePercent parameters have been moved under the ContextStrategy parameter.
Added the BidCoefs and WorkingHolidays parameters to the time targeting settings.
Added the Currency input parameter and the Currency, CampaignCurrency, BonusDiscount, and SourceCampaignID output parameters.
Added the ClickTrackingEnabled output parameter.
Added the DayBudget and DayBudgetEnabled output parameters.
Added the AverageCPA output parameter for the AverageCPAOptimization strategy.
Added the MobileBidAdjustment output parameter.
Added the EnableRelatedKeywords output parameter.
Added the ReserveReturn, ROICoef, and Profitability output parameters for the ROIOptimization strategy.
Added the ExtendedAdTitleEnabled output parameter.
Added the MaintainNetworkCPC output parameter.
Input data
The structure of input data in JSON format is shown below.
{
"method": "GetCampaignsParams",
"param": {
/* CampaignIDSInfo */
"CampaignIDS": [
(int)
...
],
"Currency": (string)
}
}
The parameters are described below.
|
Parameter |
Description |
Required |
|
CampaignIDSInfo object |
||
|
|
Array of campaign IDs to get parameters for (no more than 100 IDs). |
Yes |
|
|
Currency in which monetary parameter values should be expressed in the response (bids, budgets, statistics). Possible values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign currency. If the parameter is absent or equals NULL, Yandex units are assumed. In this case, if the campaign is run in real currency, the returned values are converted from the campaign currency to Yandex units. If the value is not NULL and does not match the currency of one of the campaigns, an error with code 245 is returned. |
No |
Output data
The structure of output data in JSON format is shown below.
{
"data": [
{ /* CampaignInfo */
"Login": (string),
"CampaignID": (int),
"Name": (string),
"FIO": (string),
"StartDate": (date),
"Sum": (float),
"Rest": (float),
"BonusDiscount": (float),
"Currency": (string),
"Shows": (int),
"Clicks": (int),
"CampaignCurrency": (string),
"SourceCampaignID": (int),
"Strategy": {
/* CampaignStrategy */
"StrategyName": (string),
"MaxPrice": (float),
"AveragePrice": (float),
"AverageCPA": (float),
"WeeklySumLimit": (float),
"ClicksPerWeek": (int),
"GoalID": (int),
"ReserveReturn": (int),
"ROICoef": (float),
"Profitability": (float)
},
"ContextStrategy": {
/* CampaignContextStrategy */
"StrategyName": (string),
"ContextLimit": (string),
"ContextLimitSum": (int),
"ContextPricePercent": (int),
"MaxPrice": (float),
"AveragePrice": (float),
"AverageCPA": (float),
"WeeklySumLimit": (float),
"ClicksPerWeek": (int),
"GoalID": (int),
"ReserveReturn": (int),
"ROICoef": (float),
"Profitability": (float)
},
"AdditionalMetrikaCounters": [
(int)
...
],
"ClickTrackingEnabled": (string),
"SmsNotification": {
/* SmsNotificationInfo */
"MetricaSms": (string),
"ModerateResultSms": (string),
"MoneyInSms": (string),
"MoneyOutSms": (string),
"SmsTimeFrom": (string),
"SmsTimeTo": (string)
},
"EmailNotification": {
/* EmailNotificationInfo */
"Email": (string),
"WarnPlaceInterval": (int),
"MoneyWarningValue": (int),
"SendAccNews": (string),
"SendWarn": (string)
},
"StatusBehavior": (string),
"Status": (string),
"TimeTarget": {
/* TimeTargetInfo */
"ShowOnHolidays": (string),
"HolidayShowFrom": (int),
"HolidayShowTo": (int),
"DaysHours": [
{ /* TimeTargetItem */
"Hours": [
(int)
...
],
"Days": [
(int)
...
],
"BidCoefs": [
(int)
...
]
}
...
],
"TimeZone": (string),
"WorkingHolidays": (string)
},
"StatusContextStop": (string),
"ContextLimit": (string),
"ContextLimitSum": (int),
"ContextPricePercent": (int),
"AutoOptimization": (string),
"StatusMetricaControl": (string),
"DisabledDomains": (string),
"DisabledIps": (string),
"StatusOpenStat": (string),
"ConsiderTimeTarget": (string),
"ManagerName": (string),
"AgencyName": (string),
"StatusShow": (string),
"StatusArchive": (string),
"StatusActivating": (string),
"StatusModerate": (string),
"IsActive": (string),
"MinusKeywords": [
(string)
...
],
"AddRelevantPhrases": (string),
"RelevantPhrasesBudgetLimit": (int),
"SumAvailableForTransfer": (float),
"DayBudget": {
/* DayBudgetInfo */
"Amount": (float),
"SpendMode": (string)
},
"DayBudgetEnabled": (string),
"MobileBidAdjustment": (int),
"EnableRelatedKeywords": (string),
"ExtendedAdTitleEnabled": (string),
"MaintainNetworkCPC": (string)
}
...
]
}
The parameters are described below.
|
Parameter |
Description |
|
CampaignInfo object |
|
|
|
Login of the campaign owner (the Yandex user login on whose behalf the advertising campaign is run). When creating a campaign, direct advertisers specify their own Yandex login, while advertising agencies specify their client's login. When retrieving campaign parameters, the login of the advertiser's main representative is returned. |
|
|
Campaign ID. Set to 0 to create a campaign; to change the parameters of an existing campaign, specify its ID. |
|
|
Campaign name. |
|
|
First and last name of the campaign owner. |
|
|
Start of ad serving, The date can be in the future. In this case, ad serving starts when the specified date arrives, provided that the moderator has approved the ads and funds have been deposited to the campaign balance. |
|
|
Name of the personal manager at Yandex. Filled in automatically for campaigns serviced by a personal manager. |
|
|
Name of the advertising agency. Filled in automatically if the campaign was created by an agency. |
|
|
Currency in which monetary values in the response are expressed (bids, budgets, statistics). Possible values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. If the parameter is absent or equals NULL, Yandex units are implied. |
|
|
Currency in which the campaign is run. Possible values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. If the parameter is absent or equals NULL, this means the campaign is run in Yandex units. |
|
|
ID of the source campaign in Yandex units, if the current campaign was created automatically when the client switched to working in currency. Absent or equals NULL otherwise. |
|
|
Defines the ad serving strategy on search. Contains a |
|
|
Defines the ad serving strategy in the Yandex Advertising Network. Contains a |
|
|
Array containing Yandex Metrica tag IDs. To delete tag IDs, pass an empty array. If the parameter is absent, the IDs are not changed. |
|
|
Automatically add the |
|
|
To receive notifications, you need to subscribe to them (see the Help section The phone number for sending is taken from the user's personal data (see the Help section ). |
|
|
|
|
|
|
|
|
Enable for keywords — Yes/No. Default value — No. |
|
|
List of placements where ads should not be served:
No more than 1000 placements. Values are separated by commas, for example, |
|
|
List of IP addresses to which ads should not be served. Addresses are separated by commas, for example, |
|
|
Calculate position prices without taking into account the bids of competitors' stopped ads (stopped according to the schedule) — Yes/No. Default value — No (all ads are taken into account). |
|
|
Array of negative keywords shared by all keywords in the campaign. A negative keyword should be specified without a minus sign before the first word. No more than 7 words per negative keyword. Each word can be up to 35 characters long. The total length of negative keywords in the array is 20,000 characters. The “!” or “+” operator before a word is not counted in the total length. |
|
|
Add to ads — Yes/No. |
|
|
Maximum percentage of the budget spent on clicks for . The value is a multiple of ten: 10, 20, ..., 100. Default value — 100. |
|
|
Enable — Yes/No. Default value — Yes. |
|
|
Stop ad serving when the advertiser's website is unavailable — Yes/No. Unavailability is detected based on monitoring performed by Yandex Direct. |
|
|
Do not use in the Yandex Advertising Network the keywords that were disabled on search due to low CTR — Yes/No. Default value — No (when disabled on search, the keyword continues to be used in the Yandex Advertising Network). Alert This parameter is no longer relevant for new keywords, since keywords are no longer disabled for low CTR. |
|
|
When going to the advertiser's website, add an OpenStat tag to the URL — Yes/No. Default value — No. |
|
|
Amount available for transfer using the TransferMoney method. May be less than the campaign balance. Returned only if the shared account is not enabled for the advertiser. The value is expressed in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. If the value is expressed in a real currency, it does not include VAT. |
|
|
The parameter is duplicated here for compatibility with stable version 4 and will be removed in the future. The current parameter has been moved to the |
|
|
The parameter is duplicated here for compatibility with stable version 4 and will be removed in the future. The current parameter has been moved to the |
|
|
The parameter is duplicated here for compatibility with stable version 4 and will be removed in the future. The current parameter has been moved to the |
|
|
|
|
|
Whether the campaign's daily budget can be managed — Yes/No. |
|
|
Bid adjustment coefficient for mobile devices. Used for campaigns and specified as a percentage of the desktop bid. Value range from 50 to 1300. Default value — 100. With this value, the bid on mobile devices equals the desktop bid. For more information about the coefficient, see the section of Yandex Direct Help. |
|
|
is enabled — Yes/No. |
|
|
Substituting part of the ad text into the title is enabled — Yes/No. |
|
|
Keep the average cost per click on themed sites below the average cost on search — Yes/No. |
|
Campaign status |
|
|
|
The campaign is active and ads are being served — Yes/No. Activity means the state of a campaign in which ad serving is enabled and disabled automatically — in accordance with the time targeting settings or depending on the campaign balance. Campaign inactivity means that ad serving is blocked and cannot be enabled automatically. |
|
|
Campaign status, for example: “Impressions on”, “Awaiting payment”, “Under moderation”, “Stopped”, “Impressions on. Activation in progress”, “Campaign archived”, and others. |
|
|
Ad serving for the campaign is enabled — Yes/No. Enabling and disabling is performed using the StopCampaign and ResumeCampaign methods. Enabling serving at the campaign level does not mean that ads are actually being served. For this, other conditions must also be met: sufficient balance, the campaign and ads have been approved by the moderator, serving is enabled at the ad level (the ResumeBanners method). Actual serving corresponds to the value Yes in the |
|
|
Campaign archiving status:
Archiving is performed using the ArchiveCampaign method. The UnArchiveCampaign method is used to restore the campaign from the archive. |
|
|
Campaign activation status:
|
|
|
Moderator review result:
The ModerateBanners method is used to submit ads for review. |
|
Statistics |
|
|
|
If the advertiser has a shared account enabled — the total amount of funds spent during the entire lifetime of the campaign. If the shared account is not enabled — the amount of funds deposited to the campaign balance during its lifetime. The value is expressed in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. If the value is expressed in a real currency, it does not include VAT. |
|
|
Current shared account balance + the amount returned to the campaign (if the advertiser has a shared account enabled), or the current campaign balance (if the shared account is not enabled). Note The amount refunded for clicks recognized by the system as fraudulent or erroneous can only be spent within the same campaign. The value is expressed in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. If the value is expressed in a real currency, it does not include VAT. |
|
|
Discount bonus proportional to the current balance. Currently, the discount is not applied. |
|
|
Number of impressions during the entire lifetime of the campaign. |
|
|
Number of clicks during the entire lifetime of the campaign. |
|
CampaignStrategy object |
|
|
|
Strategy on search. The possible values are listed below.
Manual bid management strategies on search:
Automatic strategies on search:
|
|
|
Maximum bid (in the currency specified in the If the returned value is converted from the campaign currency to Yandex units, it is rounded down to the bidding step (0.01 Yandex units). |
|
|
Average bid (in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. |
|
|
Average cost per conversion (in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. |
|
|
Maximum weekly budget (in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. |
|
|
Number of clicks per week for the WeeklyPacketOfClicks strategy. |
|
|
ID of the Yandex Metrica for the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies. The value 0 — all goals configured on the site (except composite goals). The list of suitable goals is retrieved using the GetStatGoals method. |
|
|
Maximum percentage of saved funds for the ROIOptimization strategy that can be returned to advertising (spent) if the projected ROI value exceeds the value of the Value from 0 to 100, a multiple of ten: 0, 10, 20... 100. |
|
|
Desired average return on investment per week for the ROIOptimization strategy. |
|
|
Percentage of revenue that is the cost of goods or services, for the ROIOptimization strategy. Value from 0 to 100, rounded to two decimal places. |
|
CampaignContextStrategy object |
|
|
|
Strategy in the Yandex Advertising Network. The possible values are listed below.
Manual bid management strategies in the Yandex Advertising Network:
Automatic strategies in the Yandex Advertising Network: Warning Automatic strategies in the Yandex Advertising Network are available only if ad serving is disabled on search (the ShowsDisabled strategy).
|
|
|
Budget limit for ad serving in the Yandex Advertising Network:
To avoid spending funds on serving in the Yandex Advertising Network, disable serving using the ShowsDisabled strategy (the |
|
|
Maximum percentage of the budget spent on serving in the Yandex Advertising Network on themed sites. The value is a multiple of ten: 10, 20, ..., 100. If the value is not set (null), the budget is not limited (equivalent to Default in the |
|
|
Parameter for calculating the cost per click in the Yandex Advertising Network on themed sites. Used for the Default strategy. Set as a percentage of the cost per click on search. The value is a multiple of ten: 10, 20, ..., 100. The value 100 makes the cost per click in the Yandex Advertising Network equal to the cost on search. |
|
|
Maximum bid (in the currency specified in the If the returned value is converted from the campaign currency to Yandex units, it is rounded down to the bidding step (0.01 Yandex units). |
|
|
Average bid (in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. |
|
|
Average cost per conversion (in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. |
|
|
Maximum weekly budget (in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. |
|
|
Number of clicks per week for the WeeklyPacketOfClicks strategy. |
|
|
ID of the Yandex Metrica for the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies. The value 0 — all goals configured on the site (except composite goals). The list of suitable goals is retrieved using the GetStatGoals method. |
|
|
Maximum percentage of saved funds for the ROIOptimization strategy that can be returned to advertising (spent) if the projected ROI value exceeds the value of the Value from 0 to 100, a multiple of ten: 0, 10, 20... 100. |
|
|
Desired average return on investment per week for the ROIOptimization strategy. |
|
|
Percentage of revenue that is the cost of goods or services, for the ROIOptimization strategy. Value from 0 to 100, rounded to two decimal places. |
|
SmsNotificationInfo object |
|
|
|
Report website monitoring results based on Yandex Metrica data — Yes/No. |
|
|
Report ad moderation results — Yes/No. |
|
|
Notify about funds deposited to the campaign balance — Yes/No. Default value — No. If the client has a shared account enabled, the value of the corresponding shared account parameter is returned. |
|
|
Notify when funds on the campaign balance run out — Yes/No. Default value — No. If the client has a shared account enabled, the value of the corresponding shared account parameter is returned. |
|
|
Time from which SMS messages about campaign-related events are allowed to be sent. Specified in the HH:MM format, minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”. |
|
|
Time until which SMS messages about campaign-related events are allowed to be sent. Specified in the HH:MM format, minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”. |
|
EmailNotificationInfo object |
|
|
|
Send email notifications — Yes/No. Default value — No. |
|
|
Email address for sending notifications about campaign-related events. |
|
|
Frequency of checking the ad's position — 15, 30, or 60 minutes. A notification is sent if the ad has moved to a lower position than the one provided by the bid at the time it was set. |
|
|
Minimum balance at which a notification is sent when reached. Set as a percentage of the last payment amount. Default value — 20. If the client has a shared account enabled, the value of the corresponding shared account parameter is returned. |
|
|
Notify about campaign-related events — Yes/No. Set for campaigns serviced by a personal manager at Yandex. Default value — No. |
|
TimeTargetInfo object |
|
|
|
Serve ads on public holidays — Yes/No (regular Saturdays and Sundays are not included). Default value — Yes. |
|
|
Hour from which ads are served on public holidays. If the parameter is absent, serving follows the schedule from the |
|
|
Hour until which ads are served on public holidays. If the parameter is absent, serving follows the schedule from the |
|
|
Array of |
|
|
Time zone of the advertising campaign owner's location. The list of time zones can be retrieved using the GetTimeZones method. |
|
|
Change the serving schedule when a working day is moved to Saturday or Sunday — Yes/No. For example, if a working day is moved from Monday to Saturday, with the value Yes, on the working Saturday ads will be served according to Monday's schedule, and on the non-working Monday — according to Saturday's schedule. |
|
TimeTargetItem object |
|
|
|
Array of integers from 0 to 23. The number 0 corresponds to the time interval from 00:00 to 00:59 inclusive, the number 1 — from 01:00 to 01:59 inclusive, and so on. Default value — an array of numbers from 0 to 23 corresponds to a full day. |
|
|
Array of integers from 1 to 7. The number 1 corresponds to Monday, the number 7 — to Sunday. On the specified days, ads are served according to the value of the Default value — an array of numbers from 1 to 7 corresponds to a full week. |
|
|
Array of coefficients that increase or decrease the cost per click at certain hours. Applied to manual bid management strategies. Coefficients are specified as percentages, the value must be a multiple of ten: 0, 10, 20... 200. You must specify as many coefficients as there are hours in the If the parameter is absent, the previously set coefficients are not changed. |
|
DayBudgetInfo object |
|
|
|
Campaign daily budget (in the currency specified in the If the returned value is converted from the campaign's currency to Yandex units, it is mathematically rounded to two decimal places. |
|
|
Distribute the daily budget evenly throughout the day — Default/Stretched. With the Default value, the daily budget may run out and serving may end before the end of the day. |
Input data examples
Python
{
'CampaignIDS': [1327944, 1327974]
}
PHP
array(
'CampaignIDS' => array(1327944, 1327974)
)
Perl
{
'CampaignIDS' => [1327944, 1327974]
}