---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.2
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/GetSummaryStat.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/GetSummaryStat.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# GetSummaryStat (Live)
Returns statistics for the specified campaigns for each day of the specified period.

{% note alert %}

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the [Migration guide](https://yandex.com/dev/direct/doc/migration/concepts/methods.md).

{% endnote %}


## Restrictions {#restrictions}

Up to 100 method calls per day for a single campaign.

The number of requested campaigns multiplied by the number of days in the selected period must not exceed 1000.

Statistics are available for the three years prior to the current month. For example: on September 15, 2016, you can get data starting from September 1, 2013.
All campaigns specified in the same method call must be in the same currency.
## New in the Live 4 version

The Currency input parameter is required for campaigns that use a real currency.

Added the input parameters Currency, IncludeVAT, and IncludeDiscount.


## Input data {#input}

The input data structure in JSON is shown below.

```javascript
{
   "method": "GetSummaryStat",
   "param": {
      /* GetSummaryStatRequest */
      "CampaignIDS": [
         (int)
         ...
      ],
      "StartDate": (date),
      "EndDate": (date),
      "Currency": (string),
      "IncludeVAT": (string),
      "IncludeDiscount": (string)
   }
}
```

Parameters are described below.


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

||
**<sub >GetSummaryStatRequest object</sub>**
||
||
`CampaignIDS`
|
Array containing campaign IDs.


{% note alert %}

The number of campaigns multiplied by the number of days in the report period must not exceed 1000.

{% endnote %}
|
Yes
||
||
`StartDate`
|
The start date of the report period that statistics are being returned for (`YYYY-MM-DD`).
|
Yes
||
||
`EndDate`
|
The end date of the report period that statistics are being returned for (`YYYY-MM-DD`).
|
Yes
||
||
`Currency`
|
The currency to use for amounts in the response.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign currency; otherwise, an error is returned with code [245](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ErrorCodes.md#BadCurrency).

For campaigns in units, either omit the parameter or pass NULL.
|
For campaigns in a real currency
||
||
`IncludeVAT`
|
Calculate VAT for the cost of clicks in a currency — Yes/No. When the value is Yes, amounts shown in the response will include VAT. If omitted, Yes is assumed.

If the `Currency` parameter is omitted, the `IncludeVAT` parameter is ignored.
|
No
||
||
`IncludeDiscount`
|
Calculate the discount for the cost of clicks in a currency — Yes/No.

When the value is Yes, the report will show amounts that include the discount (in other words, the amounts that are actually deducted from the campaign balance). When the value is No, the report will show amounts before the discount is applied. If omitted, Yes is assumed.


{% note info %}

For campaigns that operate in a currency, the discount is applied when the cost per click is deducted.

{% endnote %}


If the `Currency` parameter is omitted, the "No" value is assumed.
|
No
||
|#


## Output data {#output}

The method returns an array of `StatItem` objects. Each object contains statistics for a single campaign for a single date in the selected period.


{% note alert %}

If the requested campaign did not have any impressions for the entire period, information about the campaign is not output in the response.

{% endnote %}


Part of the returned parameters are based on Yandex Metrica data (see the Help section [Yandex Metrica: advertising campaign efficiency evaluation](https://yandex.ru/support/direct/statistics/metrika.html)[Yandex Metrica: advertising campaign efficiency evaluation](https://yandex.com/support/direct/statistics/metrika.html) in the Help for Yandex Direct).

```javascript
{
   "data": [
      {  /* StatItem */
         "CampaignID": (int),
         "StatDate": (date),
         "SumSearch": (float),
         "SumContext": (float),
         "ShowsSearch": (int),
         "ShowsContext": (int),
         "ClicksSearch": (int),
         "ClicksContext": (int),
         "SessionDepthSearch": (float),
         "SessionDepthContext": (float),
         "GoalConversionSearch": (float),
         "GoalConversionContext": (float),
         "GoalCostSearch": (float),
         "GoalCostContext": (float)
      }
      ...
   ]
}
```

Parameters are described below.


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

||
**<sub >StatItem object</sub>**
||
||
`CampaignID`
|
The campaign ID.
||
||
`StatDate`
|
The data statistics are provided for.
||
||
`SumSearch`
|
The total cost of clicks on search (in the currency specified in the `Currency` input parameter).

See [Notes](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetBannersStat.md#recalc) below.
||
||
`SumContext`
|
The total cost of clicks in the Yandex Advertising Network (in the currency specified in the `Currency` input parameter).

See [Notes](https://yandex.com/dev/direct/doc/dg-v4/en/live/GetBannersStat.md#recalc) below.
||
||
`ShowsSearch`
|
Number of impressions in the search.
||
||
`ShowsContext`
|
Number of impressions in the Yandex Advertising Network.
||
||
`ClicksSearch`
|
Number of clicks in the search.
||
||
`ClicksContext`
|
Number of clicks in the Yandex Advertising Network.
||
||
`SessionDepthSearch`
|
Session depth for a site when clicking through from the search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.
||
||
`SessionDepthContext`
|
Session depth for a site when clicking through from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.
||
||
`GoalConversionSearch`
|
The percentage of goal visits as part of the total number of visits when transferring from Search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.
||
||
`GoalConversionContext`
|
The percentage of goal visits as part of the total number of visits when transferring from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.
||
||
`GoalCostSearch`
|
Cost of achieving a Yandex Metrica [goal](https://yandex.ru/support/metrika/general/goals.xml)[goal](https://yandex.com/support/metrica/general/goals.xml) for click-throughs from the search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.
||
||
`GoalCostContext`
|
Cost of achieving a Yandex Metrica [goal](https://yandex.ru/support/metrika/general/goals.xml)[goal](https://yandex.com/support/metrica/general/goals.xml) for click-throughs from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.
||

||
**Notes**
||
||
1. The cost of clicks that is expressed in a currency may include or exclude VAT, depending on the value of the IncludeVAT input parameter.
    
    _Cost of clicks with VAT_ = _Cost of clicks without VAT_ × (1 + _VAT rate_)
    
1. The cost of clicks that is expressed in a currency may or may not include the discount, depending on the value of the IncludeDiscount input parameter.
    
    _Cost of clicks before applying the discount_ = _Cost of clicks actually deducted from the balance_ / (1 – _Discount_)
    
    {% note info %}
    
    For campaigns that operate in a currency, the discount is applied when the cost per click is deducted.
    
    {% endnote %}
    
1. If the campaign was run in Yandex units, the amounts are returned “as is”, without any other conversions.
||
|#


## Examples of input data {#examples}

## Python

```python
{
   'CampaignIDS': [238456],
   'StartDate': '2011-05-14',
   'EndDate': '2011-05-19'
}
```

## PHP

```php
array(
   'CampaignIDS' => array(238456),
   'StartDate' => '2011-05-14',
   'EndDate' ='2011-05-19'
)
```

## Perl

```perl
{
   'CampaignIDS' => [238456],
   'StartDate' => '2011-05-14',
   'EndDate' ='2011-05-19'
}
```


