Creating a segment with the "lookalike" type
Creates a lookalike segment with the specified parameters.
Request
POST
https://api-audience.yandex.ru/v1/management/segments/create_lookalike
Body
application/json
{
"segment": {
"name": "example",
"lookalike_link": 0,
"lookalike_value": 1,
"maintain_device_distribution": true,
"maintain_geo_distribution": true
}
}
|
Name |
Description |
|
segment |
Type: SegmentRequestLookalike The segment with the specified parameters. Example
|
SegmentRequestLookalike
The segment with the specified parameters.
|
Name |
Description |
|
lookalike_link |
Type: integer ID of the segment that the created segment should be similar to. |
|
lookalike_value |
Type: integer The degree of similarity. Accepts the values 1, 2, 3, 4, and 5. Min value: Max value: |
|
name |
Type: string Segment name. Example: |
|
maintain_device_distribution |
Type: boolean Distribute users by device type. Acceptable values:
Default value: |
|
maintain_geo_distribution |
Type: boolean Distribute users by city. Acceptable values:
Default value: |
Example
{
"name": "example",
"lookalike_link": 0,
"lookalike_value": 1,
"maintain_device_distribution": true,
"maintain_geo_distribution": true
}
Responses
200 OK
OK
Body
application/json
{
"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
}
}
|
Name |
Description |
|
segment |
Type: LookalikeSegment A segment of users who are similar to one of the client's other segments (look-alike technology). Example
|
BaseSegment
The segment description by type.
|
Name |
Description |
|
name |
Type: string Segment name. Example: |
|
create_time |
Type: string<date-time> The time of segment creation. Example: |
|
id |
Type: integer ID of the segment. Specify this parameter when updating a segment. |
|
owner |
Type: string The username of the segment owner. Example: |
|
status |
Type: string Status of processing the segment. Acceptable values:
Example: |
|
type |
Type: string Segment type. Acceptable values:
Example: |
Example
{
"type": "example",
"id": 0,
"name": "example",
"status": "example",
"create_time": "2025-01-01T00:00:00Z",
"owner": "example"
}
LookalikeSegment
A segment of users who are similar to one of the client's other segments (look-alike technology).
All of 2 types
-
Type: BaseSegment
The segment description by type.
Example
{ "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 } -
Type: object
lookalike_link
Type: integer
ID of the segment that the created segment should be similar to.
lookalike_value
Type: integer
The degree of similarity. Accepts the values 1, 2, 3, 4, and 5.
maintain_device_distribution
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.maintain_geo_distribution
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.Example
{ "lookalike_link": 0, "lookalike_value": 0, "maintain_device_distribution": true, "maintain_geo_distribution": true }
Example
{
"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
}
No longer supported, please use an alternative and newer version.