Segment type

The segment description by type.

Response format

A segment created from a file with user data.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "hashed" :  < boolean > ,
    "content_type" :  < segment_content_type > 
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
hashed Whether every string in the uploaded file is hashed.

Possible values:

  • 0 — Unhashed.
  • 1 — Hashed.
content_type The type of file content.

Possible values:

  • idfa_gaid – Device IDs.
  • mac — MAC addresses.
  • crm — CRM data.
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
hashed Whether every string in the uploaded file is hashed.

Possible values:

  • 0 — Unhashed.
  • 1 — Hashed.
content_type The type of file content.

Possible values:

  • idfa_gaid – Device IDs.
  • mac — MAC addresses.
  • crm — CRM data.

Response format

A segment imported from Yandex.Metrica.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "metrika_segment_type" :  < metrika_segment_type > ,
    "metrika_segment_id" :  < long > 
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
metrika_segment_type The type of object in Yandex.Metrica that the segment for Yandex.Audience will be created from.

Possible values:

  • counter_id – Tag.
  • goal_id – Goal.
  • segment_id – Segment.
metrika_segment_id ID of the object from Yandex.Metrica.
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
metrika_segment_type The type of object in Yandex.Metrica that the segment for Yandex.Audience will be created from.

Possible values:

  • counter_id – Tag.
  • goal_id – Goal.
  • segment_id – Segment.
metrika_segment_id ID of the object from Yandex.Metrica.

Response format

A segment imported from AppMetrica.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "app_metrica_segment_type" :  < app_metrica_segment_type > ,
    "app_metrica_segment_id" :  < int > 
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
app_metrica_segment_type The type of object in AppMetrica that the segment for Yandex.Audience will be created from.

Possible values:

  • api_key — Application.
  • segment_id — Segment.
app_metrica_segment_id ID of the object from AppMetrica.
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
app_metrica_segment_type The type of object in AppMetrica that the segment for Yandex.Audience will be created from.

Possible values:

  • api_key — Application.
  • segment_id — Segment.
app_metrica_segment_id ID of the object from AppMetrica.

Response format

A segment of users who “look like” one of the client's other segments (uses "look-alike" technology).


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "lookalike_link" :  < integer > ,
    "lookalike_value" :  < integer > ,
    "maintain_device_distribution" :  < boolean > ,
    "maintain_geo_distribution" :  < boolean > 
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
lookalike_link ID of the segment that the created segment should be similar to.
lookalike_value The degree of “similarity”. Accepts the values 1 2 3 4 5.
maintain_device_distribution

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

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.

Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
lookalike_link ID of the segment that the created segment should be similar to.
lookalike_value The degree of “similarity”. Accepts the values 1 2 3 4 5.
maintain_device_distribution

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

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.

Response format

A segment created from other segments using mathematical operations.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "composition_type" :  < composition_type > ,
    "composition_parts" : [  < integer > , ... ]
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
composition_type Operation on the segments.

Possible values:

  • intersect – Intersection.
  • subtract – Exclusion.
  • union – Joining.
composition_parts IDs of segments that are arguments of the operation.
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
composition_type Operation on the segments.

Possible values:

  • intersect – Intersection.
  • subtract – Exclusion.
  • union – Joining.
composition_parts IDs of segments that are arguments of the operation.

Response format

Segment based on location data for circles.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "geo_segment_type" :  < geo_segment_type > ,
    "times_quantity" :  < integer > ,
    "period_length" :  < integer > 
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
geo_segment_type Type of coordinates for creating the segment.

Possible values:

  • last — Current location. The segment will include users who are located in the selected area right now, or who were there less than an hour ago.
  • regular — Frequent location. The segment will include users who frequently visit the selected area. For example, they may be people who live or work nearby. Targeting is based on the data from the past 45 days.
  • home — Home location. The segment will include users who live in the selected area.
  • work — Work location. The segment will include users who work in the selected area.
  • condition — The condition “The user visited the specified places X times during the period”. The segment will include users who meet this criteria.
times_quantity

Frequency of visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Note.

Only one visit per day is counted.

period_length

The period for visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Acceptable values for the time period (in days): from 1 to 90 (inclusive).

Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
geo_segment_type Type of coordinates for creating the segment.

Possible values:

  • last — Current location. The segment will include users who are located in the selected area right now, or who were there less than an hour ago.
  • regular — Frequent location. The segment will include users who frequently visit the selected area. For example, they may be people who live or work nearby. Targeting is based on the data from the past 45 days.
  • home — Home location. The segment will include users who live in the selected area.
  • work — Work location. The segment will include users who work in the selected area.
  • condition — The condition “The user visited the specified places X times during the period”. The segment will include users who meet this criteria.
times_quantity

Frequency of visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Note.

Only one visit per day is counted.

period_length

The period for visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Acceptable values for the time period (in days): from 1 to 90 (inclusive).

Response format

Segment based on location data for polygons.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "geo_segment_type" :  < geo_segment_type > ,
    "times_quantity" :  < integer > ,
    "period_length" :  < integer > ,
    "polygons" : [ {
        "points" : [ {
            "latitude" :  < big_decimal > ,
            "longitude" :  < big_decimal > ,
            "description" :  < string > 
        }, ... ]
    }, ... ]
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
geo_segment_type Type of coordinates for creating the segment.

Possible values:

  • last — Current location. The segment will include users who are located in the selected area right now, or who were there less than an hour ago.
  • regular — Frequent location. The segment will include users who frequently visit the selected area. For example, they may be people who live or work nearby. Targeting is based on the data from the past 45 days.
  • home — Home location. The segment will include users who live in the selected area.
  • work — Work location. The segment will include users who work in the selected area.
  • condition — The condition “The user visited the specified places X times during the period”. The segment will include users who meet this criteria.
times_quantity

Frequency of visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Note.

Only one visit per day is counted.

period_length

The period for visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Acceptable values for the time period (in days): from 1 to 90 (inclusive).

polygons List of polygons. You cannot add more than 10 polygons to a segment.
Parameters Description
points The coordinates of the points.
Parameters Description
latitude Latitude.
longitude Longitude.
description Any comment with the length not exceeding 200.
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
geo_segment_type Type of coordinates for creating the segment.

Possible values:

  • last — Current location. The segment will include users who are located in the selected area right now, or who were there less than an hour ago.
  • regular — Frequent location. The segment will include users who frequently visit the selected area. For example, they may be people who live or work nearby. Targeting is based on the data from the past 45 days.
  • home — Home location. The segment will include users who live in the selected area.
  • work — Work location. The segment will include users who work in the selected area.
  • condition — The condition “The user visited the specified places X times during the period”. The segment will include users who meet this criteria.
times_quantity

Frequency of visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Note.

Only one visit per day is counted.

period_length

The period for visits to the specified places. This parameter is required if you are creating the condition “The user visited the specified places X times during the period”.

Acceptable values for the time period (in days): from 1 to 90 (inclusive).

polygons List of polygons. You cannot add more than 10 polygons to a segment.
Parameters Description
points The coordinates of the points.
Parameters Description
latitude Latitude.
longitude Longitude.
description Any comment with the length not exceeding 200.

Response format

A sgement created using a tracking pixel.


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > ,
    "pixel_id" :  < integer > ,
    "period_length" :  < integer > ,
    "times_quantity" :  < integer > ,
    "times_quantity_operation" :  < pixel_times_quantity_operation > ,
    "utm_source" :  < string > ,
    "utm_content" :  < string > ,
    "utm_campaign" :  < string > ,
    "utm_term" :  < string > ,
    "utm_medium" :  < string > 
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
pixel_id The pixel ID.
period_length

The time period for tracking the user with the pixel.

Acceptable values (in days): from 1 to 90 (inclusive).

times_quantity

Threshold value (M). This is the base number for comparing how many times the user was detected by the pixel during the period.

times_quantity_operation

Condition for including users in a pixel segment.

Possible values:

  • lt — Less than. The user was detected by the pixel fewer than M times during the period.
  • eq — Equal to. The user was detected by the pixel M times during the period.
  • gt — Greater than. The user was detected by the pixel more than M times during the period.
utm_source The utm_source tag. Can be used as a condition for including users in a pixel segment.
utm_content The utm_content tag. Can be used as a condition for including users in a pixel segment.
utm_campaign The utm_campaign tag. Can be used as a condition for including users in a pixel segment.
utm_term The utm_term tag. Can be used as a condition for including users in a pixel segment.
utm_medium The utm_medium tag. Can be used as a condition for including users in a pixel segment.
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
pixel_id The pixel ID.
period_length

The time period for tracking the user with the pixel.

Acceptable values (in days): from 1 to 90 (inclusive).

times_quantity

Threshold value (M). This is the base number for comparing how many times the user was detected by the pixel during the period.

times_quantity_operation

Condition for including users in a pixel segment.

Possible values:

  • lt — Less than. The user was detected by the pixel fewer than M times during the period.
  • eq — Equal to. The user was detected by the pixel M times during the period.
  • gt — Greater than. The user was detected by the pixel more than M times during the period.
utm_source The utm_source tag. Can be used as a condition for including users in a pixel segment.
utm_content The utm_content tag. Can be used as a condition for including users in a pixel segment.
utm_campaign The utm_campaign tag. Can be used as a condition for including users in a pixel segment.
utm_term The utm_term tag. Can be used as a condition for including users in a pixel segment.
utm_medium The utm_medium tag. Can be used as a condition for including users in a pixel segment.

Response format

no description


{
    "id" :  < int > ,
    "name" :  < string > ,
    "status" :  < segment_external_status > ,
    "create_time" :  < date > ,
    "owner" :  < string > 
}
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.
Parameters Description
id ID of the segment. Specify this parameter when updating a segment.
name Segment name.
status Status of processing the segment.

Possible values:

  • uploaded – The segment with the user's data has been uploaded.
  • is_processed – The segment with the specified parameters is being processed.
  • processed – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.
create_time The time of segment creation.
owner The username of the segment owner.