---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://yandex.com/dev/partner-objects/doc/en/concepts/filters.md
  - https://yandex.com/dev/partner-objects/doc/ru/concepts/filters.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/partner-objects/doc/en/llms.txt


# Filtering data

The allowed values for filtering data are listed in the `filters` parameter for the [GET/resources](https://yandex.com/dev/partner-objects/doc/en/reference/get-resources.md) operation. SQL operators can be applied to the values.

There are restrictions on using SQL operators. These restrictions are related to the data types that are used in values:



{% cut ""=" operator (equal to)" %}

Used for arrays and scalar values.

**Operator value**

Results match the specified parameter value.

**Types of parameters accepted by the operator:**

- `boolean`

- `contractnumber`

- `dictionary`

- `domain_mirror`

- `login`

- `multistate`

- `number`

- `publicid`

- `straight_number`

- `text`

- `tree`

**Usage example**

You need to get RTB blocks that have the “Working” status:

```
filter=["multistate","=","working"]
```

where `multistate` is the parameter name and `working` is the ID of the parameter value.

{% endcut %}



{% cut ""<>" operator (not equal to)" %}

Used for arrays and scalar values.

**Operator value**

The result excludes the specified parameter value.

**Types of parameters accepted by the operator:**

- `dictionary`

- `domain_mirror`

- `login`

- `multistate`

- `number`

- `publicid`

- `straight_number`

- `text`

- `tree`

**Usage example**

You need to get all the RTB blocks except those blocks that have the “Working” status:

```
filter=["multistate","<>","working"]
```

where `multistate` is the parameter name and `working` is the ID of the parameter value.

{% endcut %}



{% cut "IN (included in)" %}

Used for arrays and scalar values.

**Operator value**

Generates the request result for the specified parameter values.

**Types of parameters accepted by the operator:**

- `contractnumber`

- `domain_mirror`

- `login`

- `number`

- `publicid`

- `straight_number`

- `text`

**Usage example**

You need to filter data by the website `page_id`s that are included in a set list:

```
filter=["page_id","IN",["41443","42630"]]
```

where `page_id` is the parameter name, and `41443, 42630` is the parameter value.

{% endcut %}



{% cut "">" operator (greater than)" %}

Used for scalar values.

**Operator value**

Generates the request result for the parameter values exceeding the specified value.

**Types of parameters accepted by the operator:**

- `number`

- `straight_number`

**Usage example**

You need to filter data by the website `page_id`s that are greater than the set value:

```
filter=["page_id",">","53100"]
```

where `page_id` is the parameter name and `53100` is the parameter value.

{% endcut %}



{% cut ""<" operator (less than)" %}

Used for scalar values.

**Operator value**

Generates the request result for the parameter values that are less than the specified value.

**Types of parameters accepted by the operator:**

- `number`

- `straight_number`

**Usage example**

You need to filter data by the website `page_id`s that are less than the set value:

```
filter=["page_id","<","53100"]
```

where `page_id` is the parameter name and `53100` is the parameter value.

{% endcut %}



{% cut "">=" operator (greater than or equal to)" %}

Used for scalar values.

**Operator value**

Generates the request result for the parameter values that are greater than or equal to the specified value.

**Types of parameters accepted by the operator:**

- `number`

- `straight_number`

**Usage example**

You need to filter data by the website `page_id`s that are greater than or equal to the set value:

```
filter=["page_id",">=","53100"]
```

where `page_id` is the parameter name and `53100` is the parameter value.

{% endcut %}



{% cut ""<=" (less than or equal to)" %}

Used for scalar values.

**Operator value**

Generates the request result for the parameter values that are less than or equal to the specified value.

**Types of parameters accepted by the operator:**

- `number`

- `straight_number`

**Usage example**

You need to filter data by the website `page_id`s that are less than or equal to the set value:

```
filter=["page_id","<=","53100"]
```

where `page_id` is the parameter name and `53100` is the parameter value.

{% endcut %}



{% cut ""NOT IN" operator (not included in)" %}

Used for arrays and scalar values.

**Operator value**

Generates the request result for the parameter values that are not in the specified list.

**Types of parameters accepted by the operator:**

- `domain_mirror`

- `login`

- `number`

- `publicid`

- `straight_number`

- `text`

**Usage example**

You need to filter data by the website `page_id`s that are not included in a set list:

```
filter=["page_id","NOT IN",["53100","53101"]]
```

where `page_id` is the parameter name and `53100, 53101` are the parameter values.

{% endcut %}



{% cut ""LIKE" operator (included in the specified substring)" %}

**Operator value**

Generates the request result for the parameter values that include the specified substring.

**Types of parameters accepted by the operator:**

- `domain_mirror`

- `login`

- `text`

**Usage example**

You need to filter data by the name of a site that is included in the specified value:

```
filter=["domain","LIKE","aliexpress"]
```

where `domain` is the parameter name, and `aliexpress` is the parameter value. The current record is equivalent to the `domain LIKE '%aliexpress%'` record in SQL.

{% endcut %}



{% cut "NOT LIKE (not included in the specified substring)" %}

Used for scalar values.

**Operator value**

Generates the request result for the parameter values that don't include the specified substring.

**Parameter types accepted by the operator:**

- `domain_mirror`

- `login`

- `text`

**Usage example**

You need to filter data by a website name that is not included in the set value:

```
filter=["domain","NOT LIKE","aliexpress"]
```

where `domain` is the parameter name, and `aliexpress` is the parameter value.

{% endcut %}



{% cut ""AND" operator (and)" %}

**Operator value**

Used for combining filters.

**Usage example**

You need to filter data by the site name and `page_id`. You have two filters:

```
filter=["domain","=","aliexpress"]
```

```
filter=["page_id","=","53100"]
```

You combine the two filters into one:

```
filter=["AND",[["domain","=","aliexpress"],["page_id","=","53100"]]]
```

{% endcut %}



{% cut ""OR" (logical or)" %}

**Operator value**

Used for performing at least one of the listed filters.

**Usage example**

You need to filter data either by the website name or the `page_id`. You have two filters:

```
filter=["domain","=","aliexpress"]
```

```
filter=["page_id","=","53100"]
```

You combine the two filters into one:

```
filter=["OR",[["domain","=","aliexpress"],["page_id","=","53100"]]]
```

{% endcut %}

