---
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/en/llms.txt

<div class="openapi">

# Creating a segment with the "lookalike" type

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

Creates a `lookalike` segment with the specified parameters.

## 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)

The segment with the specified parameters.

{% 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}

The segment with the specified parameters.

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

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

ID of the segment that the created segment should be similar to.
{.table-cell}
||
||

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

The degree of similarity. Accepts the values 1, 2, 3, 4, and 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

Segment name.

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

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

Distribute users by device type. Acceptable values:

- `true`: The distribution of users by device type is maintained, if possible.
- `false`: The distribution of users by device type is ignored.

Default value: `true`.

{.table-cell}
||
||

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

Distribute users by city. Acceptable values:

- `true`: The distribution of users by city is maintained, if possible.
- `false`: The distribution of users by city is ignored.

Default value: `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)

A segment of users who are similar to one of the client's other segments (look-alike technology).

{% 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}

The segment description by type.

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

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

Segment name.

_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;

The time of segment creation.

_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

ID of the segment. Specify this parameter when updating a segment.
{.table-cell}
||
||

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

The username of the segment owner.

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

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

Status of processing the segment. Acceptable values:

- `uploaded`: The segment with the user's data has been uploaded.
- `is_processed`: The segment with the specified parameters is being processed.
- `processed`: The segment has been uploaded and processed. The segment is ready to use.
- `processing_failed`: Segment processing has failed.
- `is_updated`: The segment is updating.
- `few_data`: The segment has insufficient data.


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

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

Segment type. Acceptable values:

- `uploading`: A segment created from a file with user data.
- `metrika`: A segment imported from Yandex Metrica.
- `appmetrica`: A segment imported from AppMetrica.
- `lookalike`: A segment of users who "look like" one of the client's other segments (uses the "lookalike" technology).
- `geo`: A segment based on location data for polygons and circles.
- `pixel`: A segment created using a tracking 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}

A segment of users who are similar to one of the client's other segments (look-alike technology).

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

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

  The segment description by type.

  {% 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

  ID of the segment that the created segment should be similar to.
  {.table-cell}
  ||
  ||

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

  The degree of similarity. Accepts the values 1, 2, 3, 4, and 5.
  {.table-cell}
  ||
  ||

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

  Distribute users by device type. Acceptable values:

  - `true`: The distribution of users by device type is maintained, if possible.
  - `false`: The distribution of users by device type is ignored.

  Default value: `true`.

  {.table-cell}
  ||
  ||

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

  Distribute users by city. Acceptable values:

  - `true`: The distribution of users by city is maintained, if possible.
  - `false`: The distribution of users by city is ignored.

  Default value: `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.