---
metadata:
  - name: generator
    content: Diplodoc Platform v5.19.4
alternate:
  - https://yandex.ru/dev/audience/en/ref/openapi/segments/createLookalike.md
  - https://yandex.ru/dev/audience/ru/ref/openapi/segments/createLookalike.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/audience/ru/llms.txt

<div class="openapi">

# Создание сегмента с типом "lookalike"

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

Создает сегмент типа `lookalike` с заданными параметрами.

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api-audience.yandex.ru/v1/management/segments/create_lookalike
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "segment": {
    "name": "example",
    "lookalike_link": 0,
    "lookalike_value": 1,
    "maintain_device_distribution": true,
    "maintain_geo_distribution": true
  }
}
```

{% endcut %}

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

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

Сегмент с заданными параметрами.

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

```json translate=no
{
  "name": "example",
  "lookalike_link": 0,
  "lookalike_value": 1,
  "maintain_device_distribution": true,
  "maintain_geo_distribution": true
}
```

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

</div>

<div class="openapi-entity">

### SegmentRequestLookalike {#entity-SegmentRequestLookalike}

Сегмент с заданными параметрами.

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

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

Идентификатор сегмента, на который должен быть похож созданный сегмент.
{.table-cell}
||
||

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

Степень "похожести". Принимает значения 1 2 3 4 5.

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

_Max value:_{.json-schema-reset .json-schema-assertion} `5`
{.table-cell}
||
||

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

Название сегмента.

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

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

Распределение пользователей по типу устройств. Допустимые значения:

- `true` — распределение пользователей по типу устройств сохраняется, если это возможно.
- `false` — распределение пользователей по типу устройств не сохраняется.

Значение по умолчанию: `true`.

{.table-cell}
||
||

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

Распределение пользователей по городу. Допустимые значения:

- `true` — распределение пользователей по городу сохраняется, если это возможно.
- `false` — распределение пользователей по городу не сохраняется.

Значение по умолчанию: `true`.

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

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

```json translate=no
{
  "name": "example",
  "lookalike_link": 0,
  "lookalike_value": 1,
  "maintain_device_distribution": true,
  "maintain_geo_distribution": true
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "segment": {
    "type": "example",
    "id": 0,
    "name": "example",
    "status": "example",
    "create_time": "2025-01-01T00:00:00Z",
    "owner": "example",
    "has_guests": true,
    "guest_quantity": 0,
    "can_create_dependent": true,
    "has_derivatives": true,
    "derivatives": [
      0
    ],
    "cookies_matched_quantity": 0,
    "lookalike_link": 0,
    "lookalike_value": 0,
    "maintain_device_distribution": true,
    "maintain_geo_distribution": true
  }
}
```

{% endcut %}

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

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

Сегмент из пользователей, "похожих" на другой сегмент клиента (технология Look-alike).

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

```json translate=no
{
  "type": "example",
  "id": 0,
  "name": "example",
  "status": "example",
  "create_time": "2025-01-01T00:00:00Z",
  "owner": "example",
  "has_guests": true,
  "guest_quantity": 0,
  "can_create_dependent": true,
  "has_derivatives": true,
  "derivatives": [
    0
  ],
  "cookies_matched_quantity": 0,
  "lookalike_link": 0,
  "lookalike_value": 0,
  "maintain_device_distribution": true,
  "maintain_geo_distribution": true
}
```

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

</div>

<div class="openapi-entity">

### BaseSegment {#entity-BaseSegment}

Тип для описания сегмента.

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

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

Название сегмента.

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

_create_time_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Время создания сегмента.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

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

Идентификатор сегмента. Укажите данный параметр при обновлении сегмента.
{.table-cell}
||
||

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

Логин владельца сегмента.

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

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

Статус обработки сегмента. Допустимые значения:

- `uploaded` — сегмент с данными пользователя загружен.
- `is_processed` — сегмент с заданными параметрами обрабатывается.
- `processed` — загрузка и обработка сегмента завершена. Сегмент готов для работы.
- `processing_failed` — обработка сегмента завершилась с ошибкой.
- `is_updated` — сегмент обновляется.
- `few_data` — сегмент содержит мало данных для работы.


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

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

Тип сегмента. Допустимые значения:

- `uploading` — сегмент, созданный из файла с пользовательскими данными.
- `metrika` — сегмент, импортируемый из Яндекс Метрики.
- `appmetrica` — сегмент, импортируемый из AppMetrica.
- `lookalike` — сегмент из пользователей, «похожих» на другой сегмент клиента (технология Look-alike).
- `geo` — сегмент на основе данных о геолокации по полигонам и по окружностям.
- `pixel` — сегмент, созданный по пикселю.


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

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

```json translate=no
{
  "type": "example",
  "id": 0,
  "name": "example",
  "status": "example",
  "create_time": "2025-01-01T00:00:00Z",
  "owner": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### LookalikeSegment {#entity-LookalikeSegment}

Сегмент из пользователей, "похожих" на другой сегмент клиента (технология Look-alike).

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [BaseSegment](#entity-BaseSegment)

  Тип для описания сегмента.

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

  ```json translate=no
  {
    "type": "example",
    "id": 0,
    "name": "example",
    "status": "example",
    "create_time": "2025-01-01T00:00:00Z",
    "owner": "example",
    "has_guests": true,
    "guest_quantity": 0,
    "can_create_dependent": true,
    "has_derivatives": true,
    "derivatives": [
      0
    ],
    "cookies_matched_quantity": 0
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

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

  Идентификатор сегмента, на который должен быть похож созданный сегмент.
  {.table-cell}
  ||
  ||

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

  Степень "похожести". Принимает значения 1 2 3 4 5.
  {.table-cell}
  ||
  ||

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

  Распределение пользователей по типу устройств. Допустимые значения:

  - `true` — распределение пользователей по типу устройств сохраняется, если это возможно.
  - `false` — распределение пользователей по типу устройств не сохраняется.

  Значение по умолчанию: `true`.

  {.table-cell}
  ||
  ||

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

  Распределение пользователей по городу. Допустимые значения:

  - `true` — распределение пользователей по городу сохраняется, если это возможно.
  - `false` — распределение пользователей по городу не сохраняется.

  Значение по умолчанию: `true`.

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

  {% endcut %}

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

  ```json translate=no
  {
    "lookalike_link": 0,
    "lookalike_value": 0,
    "maintain_device_distribution": true,
    "maintain_geo_distribution": true
  }
  ```

  {% endcut %}

{% endcut %}

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

```json translate=no
{
  "type": "example",
  "id": 0,
  "name": "example",
  "status": "example",
  "create_time": "2025-01-01T00:00:00Z",
  "owner": "example",
  "has_guests": true,
  "guest_quantity": 0,
  "can_create_dependent": true,
  "has_derivatives": true,
  "derivatives": [
    0
  ],
  "cookies_matched_quantity": 0,
  "lookalike_link": 0,
  "lookalike_value": 0,
  "maintain_device_distribution": true,
  "maintain_geo_distribution": true
}
```

{% endcut %}

</div>

</div>

</div>

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