Filter — targeting criteria for smart banners (SmartAdTarget)
The filter defines a set of product offers from the feed that are used for dynamically generating smart banners. To learn more about filters, see Configuring filters in the Help for Yandex Direct.
Service
Restrictions
The filter can only be added to a SMART_AD_GROUP type of ad group.
Maximum of 50 filters per group.
Type of product offer selection
There are two types of selection:
ITEMS_ALL — “Select all”.
Smart banners are generated for all product offers from the feed.
ITEMS_SUBSET — “A group of pages”.
The filter contains up to 10 selection rules. Smart banners are generated only for those product offers that meet all the selection rules at the same time.
Selection rule
The selection rule consists of three parameters:
- Operand — The feed field.
- Operator — The comparison operator.
- Arguments — An array of values to compare the field value in the feed with.
For a description of the fields for each type of feed, see Configuring filters in the Help for Yandex Direct.
The compatibility of feed fields and operators depends on the feed:
- 0
- 1
- 0
- 1
- 1
- 2
- 3
- 4
- 5
- 1
- 2
- 3
- 4
- 5
- left
- right
- yes
- none
- in stock
- on order
- left
- right
- yes
- none
- in stock
- on order
Feed field | Operators | Restrictions on values |
---|---|---|
categoryId | GREATER_THAN, LESS_THAN | One number |
EQUALS_ANY | Max 20,000 numbers | |
RANGE | Max 10 ranges. See example. | |
id | GREATER_THAN, LESS_THAN | One number |
EQUALS_ANY | Max 50 numbers | |
RANGE | Max 10 ranges. See example. | |
market_category typePrefix vendor | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
description model name | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
url | EQUALS,CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
oldprice price | GREATER_THAN, LESS_THAN | Single number, up to 2 decimal places |
EQUALS_ANY | Max 50 numbers, up to 2 decimal places | |
RANGE | Max 10 ranges, up to 2 decimal places. See the example. | |
EXISTS | Pass the value 1 | |
adult manufacturer_warranty pickup store | EQUALS_ANY | Acceptable values: |
EXISTS | Pass the value 1 | |
age | EQUALS_ANY | Acceptable values: integer from 0 to 12, 16, or 18. |
EXISTS | Pass the value 1 |
Feed field | Operators | Restrictions on values |
---|---|---|
categoryId | GREATER_THAN, LESS_THAN | One number |
EQUALS_ANY | Max 20,000 numbers | |
RANGE | Max 10 ranges. See example. | |
id | GREATER_THAN, LESS_THAN | One number |
EQUALS_ANY | Max 50 numbers | |
RANGE | Max 10 ranges. See example. | |
market_category typePrefix vendor | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
description model name | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
url | EQUALS,CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
oldprice price | GREATER_THAN, LESS_THAN | Single number, up to 2 decimal places |
EQUALS_ANY | Max 50 numbers, up to 2 decimal places | |
RANGE | Max 10 ranges, up to 2 decimal places. See the example. | |
EXISTS | Pass the value 1 | |
adult manufacturer_warranty pickup store | EQUALS_ANY | Acceptable values: |
EXISTS | Pass the value 1 | |
age | EQUALS_ANY | Acceptable values: integer from 0 to 12, 16, or 18. |
EXISTS | Pass the value 1 |
Feed field | Operators | Restrictions on values |
---|---|---|
Rsis | GREATER_THAN, LESS_THAN | Single number, up to 2 decimal places |
EQUALS_ANY | Max 50 numbers, up to 2 decimal places | |
RANGE | Max 10 ranges, up to 2 decimal places. See the example. | |
Description max_score name location url | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
class | EQUALS_ANY | Acceptable values: |
EXISTS | Pass the value 1 | |
OfferID Score | GREATER_THAN, LESS_THAN | Single integer |
EQUALS_ANY | Max 50 integers | |
RANGE | Max 10 ranges or integers. See the example. |
Feed field | Operators | Restrictions on values |
---|---|---|
Rsis | GREATER_THAN, LESS_THAN | Single number, up to 2 decimal places |
EQUALS_ANY | Max 50 numbers, up to 2 decimal places | |
RANGE | Max 10 ranges, up to 2 decimal places. See the example. | |
Description max_score name location url | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
class | EQUALS_ANY | Acceptable values: |
EXISTS | Pass the value 1 | |
OfferID Score | GREATER_THAN, LESS_THAN | Single integer |
EQUALS_ANY | Max 50 integers | |
RANGE | Max 10 ranges or integers. See the example. |
Feed field | Operators | Restrictions on values |
---|---|---|
body_type color folder_id mark_id | CONTAINS_ANY, NOT_CONTAINS_ALL, | Max 50 lines, max 175 characters per line |
wheel | CONTAINS_ANY | Recommended values: |
metallic | EQUALS_ANY | Recommended values: |
availability | EQUALS_ANY | Recommended values: |
year | EQUALS_ANY | Max 10 numbers |
url | CONTAINS_ANY, NOT_CONTAINS_ALL, EQUALS_ANY | Max 50 lines, max 175 characters per line |
price | GREATER_THAN, LESS_THAN | Single integer |
EQUALS_ANY | Max 50 integers | |
RANGE | Max 10 ranges. See example. |
Feed field | Operators | Restrictions on values |
---|---|---|
body_type color folder_id mark_id | CONTAINS_ANY, NOT_CONTAINS_ALL, | Max 50 lines, max 175 characters per line |
wheel | CONTAINS_ANY | Recommended values: |
metallic | EQUALS_ANY | Recommended values: |
availability | EQUALS_ANY | Recommended values: |
year | EQUALS_ANY | Max 10 numbers |
url | CONTAINS_ANY, NOT_CONTAINS_ALL, EQUALS_ANY | Max 50 lines, max 175 characters per line |
price | GREATER_THAN, LESS_THAN | Single integer |
EQUALS_ANY | Max 50 integers | |
RANGE | Max 10 ranges. See example. |
Feed field | Operators | Restrictions on values |
---|---|---|
url | EQUALS_ANY, CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
description name | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
price oldprice | GREATER_THAN, LESS_THAN | Single number, up to 2 decimal places |
EQUALS_ANY | Max 50 numbers, up to 2 decimal places | |
RANGE | Max 10 ranges, up to 2 decimal places. See the example. |
Feed field | Operators | Restrictions on values |
---|---|---|
url | EQUALS_ANY, CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
description name | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
price oldprice | GREATER_THAN, LESS_THAN | Single number, up to 2 decimal places |
EQUALS_ANY | Max 50 numbers, up to 2 decimal places | |
RANGE | Max 10 ranges, up to 2 decimal places. See the example. |
Feed field | Operators | Restrictions on values |
---|---|---|
category description name second_title | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
url | EQUALS_ANY, CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
price sale_price | GREATER_THAN, LESS_THAN | One number, up to two decimal places |
IN_RANGE | Max 10 ranges, up to two decimal places | |
EQUALS_ANY | Max 50 values, up to two decimal places |
Feed field | Operators | Restrictions on values |
---|---|---|
category description name second_title | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
url | EQUALS_ANY, CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
price sale_price | GREATER_THAN, LESS_THAN | One number, up to two decimal places |
IN_RANGE | Max 10 ranges, up to two decimal places | |
EQUALS_ANY | Max 50 values, up to two decimal places |
Feed field | Operators | Restrictions on values |
---|---|---|
Category destination origin Title | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
url | EQUALS_ANY, CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
price sale_price | GREATER_THAN, LESS_THAN | One number, up to two decimal places |
IN_RANGE | Max 10 ranges, up to two decimal places | |
EQUALS_ANY | Max 50 numbers, up to two decimal places |
Feed field | Operators | Restrictions on values |
---|---|---|
Category destination origin Title | CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
EXISTS | Pass the value 1 | |
url | EQUALS_ANY, CONTAINS_ANY, NOT_CONTAINS_ALL | Max 50 lines, max 175 characters per line |
price sale_price | GREATER_THAN, LESS_THAN | One number, up to two decimal places |
IN_RANGE | Max 10 ranges, up to two decimal places | |
EQUALS_ANY | Max 50 numbers, up to two decimal places |
Examples
- The value contains one of the specified rows
-
{ "Operand": "mark_id", "Operator": "CONTAINS_ANY", "Arguments": ["Audi","Opel"] }
- Range: price from 111 to 222 or 3000 to 10000
-
{ "Operand": "price", "Operator": "IN_RANGE", "Arguments": ["111-222", "3000-10000"] }
- Value from the list
-
{ "Operand": "wheel", "Operator": "EQUALS_ANY", "Arguments": ["left"] }
Filter status
The State parameter displays the current state of impressions that match the filter.
State | Description |
---|---|
ON | Impressions are possible using this filter. |
OFF | Filter is not applied. |
SUSPENDED | Filtered impressions were stopped by the owner (either via the suspend method or in the web interface). |
DELETED | The filter was deleted by the owner. Note. The get method returns the filter in the DELETED state only if the States parameter is set to DELETED or the Ids parameter includes the ID of this filter. If both the Ids and States parameters are omitted, the method doesn't return filters in the DELETED state. |
UNKNOWN | Unknown state. Used for providing backward compatibility and displaying states that are not supported in this version of the API. |
State | Description |
---|---|
ON | Impressions are possible using this filter. |
OFF | Filter is not applied. |
SUSPENDED | Filtered impressions were stopped by the owner (either via the suspend method or in the web interface). |
DELETED | The filter was deleted by the owner. Note. The get method returns the filter in the DELETED state only if the States parameter is set to DELETED or the Ids parameter includes the ID of this filter. If both the Ids and States parameters are omitted, the method doesn't return filters in the DELETED state. |
UNKNOWN | Unknown state. Used for providing backward compatibility and displaying states that are not supported in this version of the API. |