---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://appmetrica.yandex.com/docs/en/mobile-api/stat/ref/drilldown.md
  - https://appmetrica.yandex.com/docs/ru/mobile-api/stat/ref/drilldown.md
  - href: ru/mobile-api/stat/ref/drilldown.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://appmetrica.yandex.com/docs/ru/llms.txt

<div class="openapi">

# Drill down

<!-- markdownlint-disable-file -->

Позволяет сформировать многоуровневый (древовидный) отчет. При этом каждому уровню соответствует одна группировка.
Запрос к методу `drilldown` возвращает один подуровень для указанного родительского уровня. Родительский уровень указывается в параметре `parent_id`. Чтобы получить данные для первого уровня, отправьте запрос без параметра `parent_id`.
Чтобы получить данные для вложенных уровней, необходимо указать путь от корня. Путь формируется из значений поля `id` параметра `dimension`. Если поле `id` отсутствует, укажите поле `name`.
Посмотрите как используется данный запрос в [примере](../examples.md#drilldown).

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api.appmetrica.yandex.net/stat/v1/data/drilldown
```

</div>

</div>

</div>

### Query parameters

#|
|| **Name** | **Description** ||
||

_params_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [DrillDownParams](#entity-DrillDownParams)

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
||

_statGroupParams_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [StatGroupParams](#entity-StatGroupParams)

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### DrillDownParams {#entity-DrillDownParams}

#|
|| **Name** | **Description** ||
||

_access_filter_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer
{.table-cell}
||
||

_accuracy_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_callback_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_confidence_level_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `0.95`
{.table-cell}
||
||

_date_dimension_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_date1_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `6daysAgo`
{.table-cell}
||
||

_date2_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `today`
{.table-cell}
||
||

_dimensions_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_direct_client_ids_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  0
]
```

{% endcut %}
{.table-cell}
||
||

_direct_client_logins_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_exclude_insignificant_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_filters_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_ids_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  0
]
```

{% endcut %}
{.table-cell}
||
||

_include_meta_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_include_undefined_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_lang_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_limit_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `100`
{.table-cell}
||
||

_max_deviation_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `0.1`
{.table-cell}
||
||

_metrics_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_offset_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `1`
{.table-cell}
||
||

_only_expandable_undefined_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_parent_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_preset_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_pretty_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `false`
{.table-cell}
||
||

_proposed_accuracy_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_reference_row_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_request_domain_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_require_metric_values_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Default:_{.json-schema-reset .json-schema-value} `false`
{.table-cell}
||
||

_sort_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_timezone_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_with_confidence_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "ids": [
    0
  ],
  "direct_client_ids": [
    0
  ],
  "direct_client_logins": [
    "example"
  ],
  "date1": "6daysAgo",
  "date2": "today",
  "timezone": "example",
  "preset": "example",
  "metrics": "example",
  "dimensions": "example",
  "reference_row_id": [
    "example"
  ],
  "filters": "example",
  "accuracy": "example",
  "proposed_accuracy": true,
  "include_undefined": true,
  "include_meta": true,
  "with_confidence": true,
  "exclude_insignificant": true,
  "confidence_level": "0.95",
  "max_deviation": "0.1",
  "pretty": "false",
  "lang": "example",
  "request_domain": "example",
  "require_metric_values": "false",
  "access_filter_id": 0,
  "callback": "example",
  "date_dimension": "example",
  "sort": "example",
  "limit": "100",
  "offset": "1",
  "parent_id": [
    "example"
  ],
  "only_expandable_undefined": true
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### StatGroupParams {#entity-StatGroupParams}

#|
|| **Name** | **Description** ||
||

_label_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

_Min value:_{.json-schema-reset .json-schema-assertion} `1`
{.table-cell}
||
||

_org_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

_Min value:_{.json-schema-reset .json-schema-assertion} `1`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "org_id": 1,
  "label_id": 1
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "query": {
    "timezone": "example",
    "preset": "example",
    "dimensions": [
      "example"
    ],
    "metrics": [
      "example"
    ],
    "sort": [
      "example"
    ],
    "date1": "example",
    "date2": "example",
    "filters": "example",
    "limit": 0,
    "offset": 0
  },
  "data": [
    {
      "dimension": {},
      "metrics": [
        0.5
      ],
      "expand": true
    }
  ],
  "total_rows": 0,
  "total_rows_rounded": true,
  "sampled": true,
  "contains_sensitive_data": true,
  "sample_share": 0.5,
  "sample_size": 0,
  "sample_space": 0,
  "data_lag": 0,
  "totals": [
    0.5
  ],
  "min": [
    0.5
  ],
  "max": [
    0.5
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_contains_sensitive_data_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак возможного отсутствия [конфиденциальных данных](https://yandex.ru/support/metrica/reports/report-general.html#privacy) в ответе. К ним относятся данные, которые рассчитываются алгоритмами Яндекса, например, социально-демографические (пол, возраст и др.), адреса страниц входа, поисковые фразы, информация о роботах. При значении `true` в ответе не отобразятся такие данные, если выборка составляет меньше 10 посетителей.
Возможные значения: `true`, `false`.
{.table-cell}
||
||

_data_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [DrillDownRow](#entity-DrillDownRow)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "dimension": {},
    "metrics": [
      0.5
    ],
    "expand": true
  }
]
```

{% endcut %}
{.table-cell}
||
||

_data_lag_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Задержка в обновлении данных, в секундах.
{.table-cell}
||
||

_max_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  0.5
]
```

{% endcut %}
{.table-cell}
||
||

_min_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  0.5
]
```

{% endcut %}
{.table-cell}
||
||

_query_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [QueryExternal](#entity-QueryExternal)

Исходный запрос. Содержит параметры запроса, включая развернутые параметры из шаблона и параметры для схемы параметризации атрибутов.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "timezone": "example",
  "preset": "example",
  "dimensions": [
    "example"
  ],
  "metrics": [
    "example"
  ],
  "sort": [
    "example"
  ],
  "date1": "example",
  "date2": "example",
  "filters": "example",
  "limit": 0,
  "offset": 0
}
```

{% endcut %}
{.table-cell}
||
||

_sample_share_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number

Доля данных, по которым осуществлялся расчет. Доступно значение в пределах от 0 до 1.
{.table-cell}
||
||

_sample_size_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Количество строк в выборке данных.
{.table-cell}
||
||

_sample_space_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Количество строк данных.
{.table-cell}
||
||

_sampled_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак семплирования. Показывает, был ли применен семплинг. Возможные значения: `true`, `false`.
{.table-cell}
||
||

_total_rows_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Общее количество строк в ответе по всему множеству данных (с учетом фильтра).
{.table-cell}
||
||

_total_rows_rounded_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Признак того, что общее количество строк было округлено.
{.table-cell}
||
||

_totals_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  0.5
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### QueryExternal {#entity-QueryExternal}

Исходный запрос. Содержит параметры запроса, включая развернутые параметры из шаблона и параметры для схемы параметризации атрибутов.

#|
|| **Name** | **Description** ||
||

_date1_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Дата начала периода выборки в формате YYYY-MM-DD.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_date2_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Дата окончания периода выборки в формате YYYY-MM-DD.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_dimensions_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_filters_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Фильтр сегментации.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_limit_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Количество элементов на странице выдачи.
{.table-cell}
||
||

_metrics_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_offset_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Индекс первой строки выборки, начиная с 1.
{.table-cell}
||
||

_preset_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Пресет отчета.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_sort_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "example"
]
```

{% endcut %}
{.table-cell}
||
||

_timezone_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Часовой пояс периода выборки в формате ±hh:mm.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "timezone": "example",
  "preset": "example",
  "dimensions": [
    "example"
  ],
  "metrics": [
    "example"
  ],
  "sort": [
    "example"
  ],
  "date1": "example",
  "date2": "example",
  "filters": "example",
  "limit": 0,
  "offset": 0
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### DrillDownRow {#entity-DrillDownRow}

Строки ответа. Представляет собой массив, каждый элемент которого — одна строка результата.

#|
|| **Name** | **Description** ||
||

_dimension_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
||

_[additional]_{.json-schema-reset .json-schema-additional-property}
{.table-cell}|
**Type**: string

Значение группировки для заданного уровня дерева. Например, задан второй уровень дерева (длина переданного массива `parent_id` равна единице). В данном случае поле будет содержать значение второй группировки запроса.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% endcut %}

Значение группировки для заданного уровня дерева. Например, задан второй уровень дерева (длина переданного массива `parent_id` равна единице). В данном случае поле будет содержать значение второй группировки запроса.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
||

_expand_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean

Указывает можно ли раскрыть эту строку на следующий уровень дерева.
{.table-cell}
||
||

_metrics_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  0.5
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "dimension": {},
  "metrics": [
    0.5
  ],
  "expand": true
}
```

{% endcut %}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.