---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/RetargetingCondition_Get.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/RetargetingCondition_Get.md
  - href: https://yandex.com/dev/direct/doc/dg-v4/en/live/RetargetingCondition_Get.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# Get
Returns retargeting conditions.

{% note alert %}

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the [Migration guide](https://yandex.com/dev/direct/doc/migration/concepts/methods.md).

{% endnote %}


## Input data

The input data structure in JSON is shown below.

```javascript
{
   "method": "RetargetingCondition",
   "param": {
      /* RetargetingConditionRequest */
      "Action": (string),
      "SelectionCriteria": {
         /* RetargetingConditionSelectionCriteria */
         "RetargetingConditionIDS": [
            (int)
            ...
         ],
         "Logins": [
            (string)
            ...
         ]
      }
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >RetargetingConditionRequest object</sub>**
||
||
`Action`
|
Action: Get.
|
Yes
||
||
`SelectionCriteria`
|
The `SelectionCriteria` object, which contains criteria for selecting retargeting conditions to delete.
|
Yes
||

||
**<sub >RetargetingConditionSelectionCriteria object</sub>**
||
||
`RetargetingConditionIDS`
|
Array containing the IDs of retargeting conditions to perform the operation for.
|
No
||
||
`Logins`
|
Array containing usernames of clients to perform the operation for.

For direct advertisers, this parameter is ignored.
|
No
||

||
**Notes**
||
||
{% note alert %}

1. For advertisers: If the `SelectionCriteria` structure is empty, the operation will be performed for all the retargeting conditions.
1. For agencies: At least one of the `RetargetingConditionIDS` or `Logins` parameters must be set. If both parameters are set, the operation will be performed for retargeting conditions that simultaneously meet both criteria: a condition ID set in the `RetargetingConditionIDS` array, and a username of the condition's owner that is set in the `Logins` array.

{% endnote %}
||
|#

## Output data

The output data structure in JSON is shown below.

```javascript
{
   "data": {
      /* RetargetingConditionResponse */
      "RetargetingConditions": [
         {  /* RetargetingCondition */
            "IsAccessible": (string),
            "RetargetingConditionName": (string),
            "RetargetingConditionDescription": (string),
            "Login": (string),
            "RetargetingConditionID": (int),
            "RetargetingCondition": [
               {  /* RetargetingConditionItem */
                  "Type": (string),
                  "Goals": [
                     {  /* RetargetingConditionGoalItem */
                        "Time": (int),
                        "GoalID": (long)
                     }
                     ...
                  ] 
               } 
               ...
            ]
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >RetargetingConditionResponse object</sub>**
||
||
`RetargetingConditions`
|
The method returns an array of `RetargetingCondition` objects, each of which contains information about a retargeting condition.
||

||
**<sub >RetargetingCondition object</sub>**
||
||
`IsAccessible`
|
Yes — all the goals and segments in the retargeting condition are available; No — the condition has an inaccessible goal or segment, and impressions are not possible for this condition.

A goal or segment becomes unavailable if it is deleted, or if the owner revokes access (see [Managing tag access](https://yandex.ru/support/metrika/general/access.xml)[Managing tag access](https://yandex.com/support/metrica/general/access.xml) in the Help for Yandex Metrica).
||
||
`RetargetingConditionName`
|
Name of the retargeting condition (maximum 250 characters).
||
||
`RetargetingConditionDescription`
|
Text description of the retargeting condition (maximum 4096 characters).
||
||
`Login`
|
Username of the condition's owner.
||
||
`RetargetingConditionID`
|
ID of the retargeting condition.
||
||
`RetargetingCondition`
|
Array of `RetargetingConditionItem` objects. Each object contains a group that describes the desired user behavior. If the retargeting condition has several groups, they are united with the logical AND operator (the condition is satisified if all the groups of goals are achieved).
||

||
**<sub >RetargetingConditionItem object</sub>**
||
||
`Type`
|
Type of group:

- all — The group is satisfied if all the goals and segments are met.
- or — The group is satisfied if at least one of the goals or segments is met.
- not — The group is satisfied if none of the goals or segments is met.

A retargeting condition that uses Yandex Metrica segments or Yandex Audience segments must contain at least one "all" or "or" type of group. A retargeting condition that consists solely of "not" groups can only use Yandex Metrica goals.
||
||
`Goals`
|
Array of goals and segments (`RetargetingConditionGoalItem` objects).
||

||
**<sub >RetargetingConditionGoalItem object</sub>**
||
||
`Time`
|
Number of days (from 1 to 90) for checking whether goals are completed or segments are matched.
||
||
`GoalID`
|
ID of the goal or segment.
||
|#

## Examples of input data

# Python

```python
{
   'Action': 'Get',
   'SelectionCriteria': {
      'Logins': ['agrom','larry']
   }
}
```

# PHP

```php
array(
   'Action' => 'Get',
   'SelectionCriteria' => array(
      'Logins' => array('agrom','larry')
   )
)
```

# Perl

```perl
{
   'Action' => 'Get',
   'SelectionCriteria' ={
      'Logins' => ['agrom','larry']
   }
}
```

## Related information

- [Retargeting](https://yandex.com/dev/direct/doc/dg-v4/en/concepts/retargeting.md)

