---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.1
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/reference/GetCampaignsParams.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/reference/GetCampaignsParams.md
  - href: https://yandex.com/dev/direct/doc/dg-v4/en/reference/GetCampaignsParams.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt?revision=r22047995
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt?revision=r22047995

# GetCampaignsParams

Returns campaigns parameters.

A [GetCampaignsParams (Live)](https://yandex.com/dev/direct/doc/dg-v4/live/GetCampaignsParams.html) version of this method exists.

## Restrictions

<!-- source: en/reference/_includes/reference/GetCampaignsList/id-GetCampaignsList/campaign-types-get.md -->
{% note alert %}

The method returns only campaigns with the "Text & Image Ads" type. To work with campaigns of all types, use the [Campaigns](https://yandex.com/dev/direct/doc/en/campaigns/campaigns) service in API version 5. [Learn more about campaign types...](https://yandex.com/dev/direct/doc/objects/campaign)

{% endnote %}
<!-- endsource: en/reference/_includes/reference/GetCampaignsList/id-GetCampaignsList/campaign-types-get.md -->



## Input data {#input}

The structure of input data in JSON format is shown below.

```javascript
{
   "method": "GetCampaignsParams",
   "param": {
      /* CampaignIDSInfo */
      "CampaignIDS": [
         (int)
         ...
      ]
   }
}
```

The parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >CampaignIDSInfo object</sub>**
||
||
`CampaignIDS`
|
Array of campaign IDs whose parameters are to be retrieved (no more than 100 IDs).
|
Yes
||
|#


## Output data {#output}

The method returns an array of `CampaignInfo` objects. Each object contains parameters of one campaign. The structure of output data in JSON format is shown below.

```javascript
{
   "data": [
      {  /* CampaignInfo */
         "Login": (string),
         "CampaignID": (int),
         "Name": (string),
         "FIO": (string),
         "StartDate": (date),
         "Sum": (float),
         "Rest": (float),
         "Shows": (int),
         "Clicks": (int),
         "Strategy": {
            /* CampaignStrategy */
            "StrategyName": (string),
            "MaxPrice": (float),
            "AveragePrice": (float),
            "WeeklySumLimit": (float),
            "ClicksPerWeek": (int)
         },
         "SmsNotification": {
            /* SmsNotificationInfo */
            "MetricaSms": (string),
            "ModerateResultSms": (string),
            "MoneyInSms": (string),
            "MoneyOutSms": (string),
            "SmsTimeFrom": (string),
            "SmsTimeTo": (string)
         },
         "EmailNotification": {
            /* EmailNotificationInfo */
            "Email": (string),
            "SendWarn": (string),
            "WarnPlaceInterval": (int),
            "MoneyWarningValue": (int),
            "SendAccNews": (string)
         },
         "StatusBehavior": (string),
         "Status": (string),
         "TimeTarget": {
            /* TimeTargetInfo */
            "ShowOnHolidays": (string),
            "HolidayShowFrom": (int),
            "HolidayShowTo": (int),
            "DaysHours": [
               {  /* TimeTargetItem */
                  "Hours": [
                     (int)
                     ...
                  ],
                  "Days": [
                     (int)
                     ...
                  ]
               }
               ...
            ],
            "TimeZone": (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)
      }
      ...
   ]
}
```

The parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >CampaignInfo object</sub>** 
{#CampaignInfo}
||
||
`Login`
|
Login of the campaign owner (Yandex user login on whose behalf the advertising campaign is conducted).

When creating a campaign, direct advertisers specify their own Yandex login, advertising agencies specify their client's login. When retrieving campaign parameters, the login of the advertiser's main representative is returned.
||
||
`CampaignID`
|
Campaign ID.

To create a campaign, set to 0; to change parameters of an existing campaign, specify its ID.
||
||
`Name`
|
Campaign name.
||
||
`FIO`
|
First and last name of the campaign owner.
||
||
`StartDate`
|
Start of ad display, `YYYY-MM-DD`. If not specified, the campaign creation date is used.

The date can be in the future. In this case, ad display starts when the specified date arrives, if the moderator has approved the ads and funds have been deposited to the campaign balance.
||
||
`ManagerName`
|
Name of the personal manager at Yandex. Filled in automatically for campaigns serviced by a personal manager.
||
||
`AgencyName`
|
Name of the advertising agency. Filled in automatically if the campaign creator is an agency.
||
||
`Strategy`
|
Defines the display strategy on search. Contains a `CampaignStrategy` object with strategy parameters.
||
||
`SmsNotification`
|
`SmsNotificationInfo` object with SMS notification sending parameters.

To receive notifications, you need to subscribe to them (see help section ). The phone number for sending is taken from the user's personal data (see help section ).
||
||
`EmailNotification`
|
`EmailNotificationInfo` object with email notification sending parameters.
||
||
`TimeTarget`
|
`TimeTargetInfo` object with time targeting parameters.
||
||
`AutoOptimization`
|
Enable  of keywords — Yes/No. Default value — No.
||
||
`DisabledIps`
|
List of IP addresses to which ads should not be shown. Addresses are specified separated by commas, for example `127.0.0.1,127.0.0.2`
||
||
`ConsiderTimeTarget`
|
Calculate display position prices without considering bids in stopped competitor ads (stopped according to schedule) — Yes/No. Default value — No (all ads are considered).
||
||
`MinusKeywords`
|
Array of negative keywords common to all keywords in the campaign.

A negative keyword should be specified without a minus before the first word.

No more than 7 words in a negative keyword. Length of each word — no more than 35 characters. Total length of negative keywords in the array — 20000 characters. The "!" or "+" operator before a word is not counted in the total length.
||
||
`AddRelevantPhrases`
|
Add  to ads — Yes/No.
||
||
`RelevantPhrasesBudgetLimit`
|
Maximum percentage of budget spent on clicks on . Value is a multiple of ten: 10, 20, ..., 100. Default value — 100.
||
||
`StatusBehavior`
|
Enable  — Yes/No. Default value — Yes.
||
||
`StatusMetricaControl`
|
Stop display when the advertiser's website is unavailable — Yes/No. Unavailability is detected based on monitoring results conducted by Direct.
||
||
`StatusContextStop`
|
Do not use in the Yandex Advertising Network keywords disabled on search for low CTR — Yes/No. Default value — No (when disabled on search, the keyword continues to be used in the Yandex Advertising Network).


{% note alert %}

<!-- source: en/reference/_includes/conref/resources/id-resources/ctr-off.md -->
This parameter is no longer relevant for new keywords, since keywords are no longer disabled for low CTR.
<!-- endsource: en/reference/_includes/conref/resources/id-resources/ctr-off.md -->

{% endnote %}
||
||
`StatusOpenStat`
|
When transitioning to the advertiser's website, add a tag in [OpenStat](https://yandex.com/support/direct/statistics/url-tags.xml#openstat-title) format to the URL — Yes/No. Default value — No.
||
||
`SumAvailableForTransfer`
|
Amount available for transfer using the [TransferMoney](https://yandex.com/dev/direct/doc/dg-v4/reference/TransferMoney.html) method. May be less than the campaign balance.

Returned only if the advertiser does not have a shared account enabled.
||
||
**Yandex Advertising Network**
||
||
`ContextPricePercent`
|
Maximum bid in the Yandex Advertising Network as a percentage of the search bid. Value is a multiple of ten: 10, 20... 100. Default value — 100.
||
||
`ContextLimit`
|
Budget limit for ad display in the Yandex Advertising Network:

- Default — budget not limited (default value);
- Limited — budget limited by the value of the `ContextLimitSum` parameter.
||
||
`ContextLimitSum`
|
Maximum percentage of budget for ad display in the Yandex Advertising Network. Value must be a multiple of ten or equal to zero: 0, 10, 20... 100.

With a value of 0, display in the Advertising Network is disabled. Default value NULL does not impose a budget limit, which is equivalent to Default in the `ContextLimit` parameter.
||
||
`DisabledDomains`
|
List of placements where ads should not be shown:

- domain names of websites;
- mobile application identifiers (bundle ID for iOS, package name for Android);
- names of external networks (SSP).

No more than 1000 placements. Values are specified separated by commas, for example `site.ru,ru.example.app`.
||
||
**Campaign state**
||
||
`IsActive`
|
Campaign is active, ads are being shown — Yes/No.

Activity means the state of the campaign in which ad display is turned on and off automatically — according to time targeting settings or depending on the campaign balance. Campaign inactivity means that ad display is blocked and cannot be enabled automatically.
||
||
`Status`
|
Campaign status, for example: "Impressions on", "Awaiting payment", "Under moderation", "Stopped", "Impressions on. Activation in progress", "Campaign archived" and others.
||
||
`StatusShow`
|
Campaign ad display enabled — Yes/No. Enabling and disabling is performed by the [StopCampaign](https://yandex.com/dev/direct/doc/dg-v4/reference/StopCampaign.html) and [ResumeCampaign](https://yandex.com/dev/direct/doc/dg-v4/reference/ResumeCampaign.html) methods.

Display permission at the campaign level does not mean that ads are actually being shown. Other conditions must also be met: sufficient balance, campaign and ads checked by moderator, display at ad level is enabled ([ResumeBanners](https://yandex.com/dev/direct/doc/dg-v4/reference/ResumeBanners.html) method). Actual display corresponds to the value Yes in the `IsActive` parameter.
||
||
`StatusArchive`
|
Campaign archiving state:

- Yes — campaign placed in archive;
- No — campaign not in archive;
- Pending — campaign is being moved to archive or returned from archive.

Moving to archive is performed using the [ArchiveCampaign](https://yandex.com/dev/direct/doc/dg-v4/reference/ArchiveCampaign.html) method. The [UnArchiveCampaign](https://yandex.com/dev/direct/doc/dg-v4/reference/UnArchiveCampaign.html) method is used to return from archive.
||
||
`StatusActivating`
|
Campaign activation state:

- Yes — activated;
- Pending — activation pending.
||
||
`StatusModerate`
|
Moderator check result:

- Yes — moderator approved at least one ad;
- No — moderator rejected all ads;
- New — ads were not submitted for review (campaign status "Draft");
- Pending — review in progress.

The [ModerateBanners](https://yandex.com/dev/direct/doc/dg-v4/reference/ModerateBanners.html) method is used to submit for review.
||
||
**Statistics**
||
||
`Sum`
|
If the advertiser has a shared account enabled — amount of funds spent over the entire lifetime of the campaign.

If shared account is not enabled — amount of funds credited to the campaign balance during its lifetime.
||
||
`Rest`
|
Current shared account balance + refund amount to the campaign (if the advertiser has a shared account enabled) or current campaign balance (if shared account is not enabled).


{% note info %}

The refund amount for clicks recognized by the system as fraudulent or erroneous can only be spent within the same campaign.

{% endnote %}
||
||
`Shows`
|
Number of impressions during the campaign lifetime.
||
||
`Clicks`
|
Number of clicks during the campaign lifetime.
||

||
**<sub >CampaignStrategy object</sub>**
||
||
`StrategyName`
|
Name of the .

Manual strategies:

- HighestPosition — "Highest available position" strategy;
- LowestCost — "Display in block at minimum price" strategy;
- LowestCostPremium — "Display in block at minimum price" strategy, but ads are shown only in Premium placement;

Automatic strategies:

- WeeklyBudget — "Weekly budget" automatic strategy (required parameter `WeeklySumLimit`, optional `MaxPrice`);
- WeeklyPacketOfClicks — "Weekly packet of clicks" automatic strategy (required parameter `ClicksPerWeek`, optional `MaxPrice` or `AveragePrice`);
- AverageClickPrice — "Average click price" automatic strategy (required parameter `AveragePrice`, optional `WeeklySumLimit`).

Two more manual strategies can be specified, but parameter configuration for them is not available through the API (only through the web interface):

- NoPremiumPosition — "Display below search results" strategy;
- IndependentControl — "Independent control for different types of placements" strategy.

The last two strategies are configured through the Direct web interface. However, the name of any of them may be present in the response of the [GetCampaignsParams](https://yandex.com/dev/direct/doc/dg-v4/reference/GetCampaignsParams.html) method and submitted as input to the method. In this case, the API does not change the strategy parameters set through the web interface.
||
||
`WeeklySumLimit`
|
Maximum weekly budget for the WeeklyBudget strategy. Can also be specified for the AverageClickPrice strategy.
||
||
`ClicksPerWeek`
|
Number of clicks per week for the WeeklyPacketOfClicks strategy.
||
||
`AveragePrice`
|
Average bid for the AverageClickPrice strategy. Can also be specified for the WeeklyPacketOfClicks strategy.
||
||
`MaxPrice`
|
Maximum bid. Can be specified for WeeklyBudget, CPAOptimizer and WeeklyPacketOfClicks strategies.
||

||
**<sub >SmsNotificationInfo object</sub>**
||
||
`MetricaSms`
|
Notify website monitoring results based on Yandex Metrica data — Yes/No.
||
||
`ModerateResultSms`
|
Notify ad moderation results — Yes/No.
||
||
`MoneyInSms`
|
Notify funds credited to campaign balance — Yes/No. Default value — No.

<!-- source: en/reference/_includes/conref/GetCampaignsParams/id-output/shared-param.md -->
If the client has a shared account enabled, the value of the corresponding shared account parameter is returned.
<!-- endsource: en/reference/_includes/conref/GetCampaignsParams/id-output/shared-param.md -->
||
||
`MoneyOutSms`
|
Notify funds exhausted on campaign balance — Yes/No. Default value — No.

<!-- source: en/reference/_includes/conref/GetCampaignsParams/id-output/shared-param.md -->
If the client has a shared account enabled, the value of the corresponding shared account parameter is returned.
<!-- endsource: en/reference/_includes/conref/GetCampaignsParams/id-output/shared-param.md -->
||
||
`SmsTimeFrom`
|
Time from which SMS about campaign-related events may be sent. Specified in HH:MM format, minutes are specified in multiples of 15 (0, 15, 30, 45). For example, "19:45".
||
||
`SmsTimeTo`
|
Time until which SMS about campaign-related events may be sent. Specified in HH:MM format, minutes are specified in multiples of 15 (0, 15, 30, 45). For example, "19:45".
||

||
**<sub >EmailNotificationInfo object</sub>**
||
||
`SendWarn`
|
Send email notifications — Yes/No. Default value — No.
||
||
`Email`
|
Email address for sending notifications about campaign-related events.
||
||
`WarnPlaceInterval`
|
Ad position check frequency — 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.
||
||
`MoneyWarningValue`
|
Minimum balance at which a notification is sent when decreased to this level. Specified as a percentage of the last payment amount. Default value — 20.

<!-- source: en/reference/_includes/conref/GetCampaignsParams/id-output/shared-param.md -->
If the client has a shared account enabled, the value of the corresponding shared account parameter is returned.
<!-- endsource: en/reference/_includes/conref/GetCampaignsParams/id-output/shared-param.md -->
||
||
`SendAccNews`
|
Notify campaign-related events — Yes/No. Specified for campaigns serviced by a personal manager at Yandex. Default value — No.
||

||
**<sub >TimeTargetInfo object</sub>**
||
||
`ShowOnHolidays`
|
Show ads on public holidays — Yes/No (regular Saturdays and Sundays are not included in these days). Default value — Yes.
||
||
`HolidayShowFrom`
|
Hour from which ads are shown on public holidays. If the parameter is absent, display follows the schedule from the `DaysHours` parameter.
||
||
`HolidayShowTo`
|
Hour until which ads are shown on public holidays. If the parameter is absent, display follows the schedule from the `DaysHours` parameter.
||
||
`DaysHours`
|
Array of `TimeTargetItem` objects defining the display schedule (time targeting).
||
||
`TimeZone`
|
Time zone at the location of the advertising campaign owner. The list of time zones can be obtained using the [GetTimeZones](https://yandex.com/dev/direct/doc/dg-v4/reference/GetTimeZones.html) method.
||

||
**<sub >TimeTargetItem object</sub>**
||
||
`Hours`
|
Array of integers from 0 to 23. Number 0 corresponds to the time interval from 00:00 to 00:59 inclusive, number 1 — from 01:00 to 01:59 inclusive, and so on.

Default value — array of numbers from 0 to 23 corresponds to a full day.
||
||
`Days`
|
Array of integers from 1 to 7. Number 1 corresponds to Monday, number 7 — to Sunday. On the specified days, ads are shown according to the value of the `Hours` parameter.

Default value — array of numbers from 1 to 7 corresponds to a full week.
||
|#


## Input data examples {#examples}

## Python

```python
{
   'CampaignIDS': [1327944, 1327974]
}
```

## PHP

```php
array(
   'CampaignIDS' => array(1327944, 1327974)
)
```

## Perl

```perl
{
   'CampaignIDS' => [1327944, 1327974]
}
```
