---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.1
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/reference/GetCampaignParams.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/reference/GetCampaignParams.md
  - href: https://yandex.com/dev/direct/doc/dg-v4/en/reference/GetCampaignParams.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

# GetCampaignParams

Returns campaign parameters.

A [GetCampaignParams (Live)](https://yandex.com/dev/direct/doc/dg-v4/live/GetCampaignParams.md) 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": "GetCampaignParams",
   "param": {
      /* CampaignIDInfo */
      "CampaignID": (int)
   }
}
```

The parameters are described below.


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

||
**<sub >CampaignIDInfo object</sub>**
||
||
`CampaignID`
|
ID of the campaign whose parameters are to be retrieved.
|
Yes
||
|#


## Output data {#output}

The method returns a `CampaignInfo` object containing campaign parameters. 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 */
         "MaxPrice": (float),
         "AveragePrice": (float),
         "WeeklySumLimit": (float),
         "ClicksPerWeek": (int),
         "StrategyName": (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)
                  ...
               ]
            }
            ...
         ],
         "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.

<!-- source: en/reference/_includes/reference/GetCampaignsParams/id-output/result-params.md -->
#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >CampaignInfo object</sub>**
||
||
`Login`
|
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.
||
||
`CampaignID`
|
Campaign ID.

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

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.
||
||
`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 was created by an agency.
||
||
`Strategy`
|
Defines the ad serving 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 the Help section ). The phone number for sending is taken from the user's personal data (see the Help section ).
||
||
`EmailNotification`
|
`EmailNotificationInfo` object with email notification sending parameters.
||
||
`TimeTarget`
|
`TimeTargetInfo` object with time targeting parameters.
||
||
`AutoOptimization`
|
Enable  for keywords — Yes/No. Default value — No.
||
||
`DisabledIps`
|
List of IP addresses to which ads should not be served. Addresses are separated by commas, for example, `127.0.0.1,127.0.0.2`
||
||
`ConsiderTimeTarget`
|
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).
||
||
`MinusKeywords`
|
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.
||
||
`AddRelevantPhrases`
|
Add  to ads — Yes/No.
||
||
`RelevantPhrasesBudgetLimit`
|
Maximum percentage of the budget spent on clicks for . The value is a multiple of ten: 10, 20, ..., 100. Default value — 100.
||
||
`StatusBehavior`
|
Enable  — Yes/No. Default value — Yes.
||
||
`StatusMetricaControl`
|
Stop ad serving when the advertiser's website is unavailable — Yes/No. Unavailability is detected based on monitoring performed by Yandex Direct.
||
||
`StatusContextStop`
|
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).


{% 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 going to the advertiser's website, add an [OpenStat](https://yandex.com/support/direct/statistics/url-tags.xml#openstat-title) tag 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 shared account is not enabled for the advertiser.
||
||
**Yandex Advertising Network**
||
||
`ContextPricePercent`
|
Maximum bid in the Yandex Advertising Network as a percentage of the search bid. The value is a multiple of ten: 10, 20... 100. Default value — 100.
||
||
`ContextLimit`
|
Budget limit for ad serving in the Yandex Advertising Network:

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

With a value of 0, serving in the Yandex Advertising Network is disabled. The 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 served:

- website domain names;
- mobile app IDs (bundle ID for iOS, package name for Android);
- external network names (SSPs).

No more than 1000 placements. Values are separated by commas, for example, `site.ru,ru.example.app`.
||
||
**Campaign status**
||
||
`IsActive`
|
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.
||
||
`Status`
|
Campaign status, for example: “Impressions on”, “Awaiting payment”, “Under moderation”, “Stopped”, “Impressions on. Activation in progress”, “Campaign archived”, and others.
||
||
`StatusShow`
|
Ad serving for the campaign is enabled — Yes/No. Enabling and disabling is performed using 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.

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](https://yandex.com/dev/direct/doc/dg-v4/reference/ResumeBanners.html) method). Actual serving corresponds to the value Yes in the `IsActive` parameter.
||
||
`StatusArchive`
|
Campaign archiving status:

- Yes — the campaign is archived;
- No — the campaign is not archived;
- Pending — the campaign is being moved to or restored from the archive.

Archiving 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 restore the campaign from the archive.
||
||
`StatusActivating`
|
Campaign activation status:

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

- Yes — the moderator approved at least one ad;
- No — the moderator rejected all ads;
- New — the ads have not been 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 ads for review.
||
||
**Statistics**
||
||
`Sum`
|
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.
||
||
`Rest`
|
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 info %}

The amount refunded 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 entire lifetime of the campaign.
||
||
`Clicks`
|
Number of clicks during the entire lifetime of the campaign.
||

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

Manual strategies:

- HighestPosition — “Highest available position” strategy;
- LowestCost — “Cheapest position in ad block” strategy;
- LowestCostPremium — “Cheapest position in ad block” strategy, but ads are only served in Premium placement;

Automatic strategies:

- WeeklyBudget — “Weekly budget” automatic strategy (required parameter `WeeklySumLimit`, optional `MaxPrice`);
- WeeklyPacketOfClicks — “Weekly click package” automatic strategy (required parameter `ClicksPerWeek`, optional `MaxPrice` or `AveragePrice`);
- AverageClickPrice — “Average CPC” 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 — “Impressions below search results” strategy;
- IndependentControl — “Independent control for different types of placements” strategy.

The last two strategies are configured through the Yandex 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 set for the AverageClickPrice strategy.
||
||
`ClicksPerWeek`
|
Number of clicks per week for the WeeklyPacketOfClicks strategy.
||
||
`AveragePrice`
|
Average bid for the AverageClickPrice strategy. Can also be set for the WeeklyPacketOfClicks strategy.
||
||
`MaxPrice`
|
Maximum bid. Can be set for the WeeklyBudget, CPAOptimizer, and WeeklyPacketOfClicks strategies.
||

||
**<sub >SmsNotificationInfo object</sub>**
||
||
`MetricaSms`
|
Report website monitoring results based on Yandex Metrica data — Yes/No.
||
||
`ModerateResultSms`
|
Report ad moderation results — Yes/No.
||
||
`MoneyInSms`
|
Notify about funds deposited to the 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 when funds on the campaign balance run out — 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 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”.
||
||
`SmsTimeTo`
|
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”.
||

||
**<sub >EmailNotificationInfo object</sub>**
||
||
`SendWarn`
|
Send email notifications — Yes/No. Default value — No.
||
||
`Email`
|
Email address for sending notifications about campaign-related events.
||
||
`WarnPlaceInterval`
|
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.
||
||
`MoneyWarningValue`
|
Minimum balance at which a notification is sent when reached. Set 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 about campaign-related events — Yes/No. Set for campaigns serviced by a personal manager at Yandex. Default value — No.
||

||
**<sub >TimeTargetInfo object</sub>**
||
||
`ShowOnHolidays`
|
Serve ads on public holidays — Yes/No (regular Saturdays and Sundays are not included). Default value — Yes.
||
||
`HolidayShowFrom`
|
Hour from which ads are served on public holidays. If the parameter is absent, serving follows the schedule from the `DaysHours` parameter.
||
||
`HolidayShowTo`
|
Hour until which ads are served on public holidays. If the parameter is absent, serving follows the schedule from the `DaysHours` parameter.
||
||
`DaysHours`
|
Array of `TimeTargetItem` objects defining the serving schedule (time targeting).
||
||
`TimeZone`
|
Time zone of the advertising campaign owner's location. The list of time zones can be retrieved 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. 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.
||
||
`Days`
|
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 `Hours` parameter.

Default value — an array of numbers from 1 to 7 corresponds to a full week.
||
|#
<!-- endsource: en/reference/_includes/reference/GetCampaignsParams/id-output/result-params.md -->



## Input data examples {#examples}

## Python

```python
{
   'CampaignID': 1327944
}
```

## PHP

```php
array(
   'CampaignID' =1327944
)
```

## Perl

```perl
{
   'CampaignID' =1327944
}
```
