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

# Filtering data

To filter data in the report, use the Filter structure.  Each filter is a set of criteria for selecting data.  Filters are combined with AND, so the report shows data that meets all the filter criteria.  A filter consists of three parameters:

- Field — Which field to compare the values of.
- Operator — How to compare.
- Values — An array of symbols to compare with.

For example, to make the report only show rows that have more than 10 conversions, use the filter

{% list tabs %}

- JSON

  ```
  "Filter": [{
  "Field": "Conversions",
  "Operator": "GREATER_THAN",
  "Values": ["10"]
  }]
  ```

- XML

  ```
  <Filter>
  <Field>Conversions</Field>
  <Operator>GREATER_THAN</Operator>
  <Values>10</Values>
  </Filter>
  ```

{% endlist %}

The table below shows how operators correspond to fields.

#|

|| **Field name** | **Operators allowed** ||

|| AdNetworkType | EQUALS, IN ||
|| CampaignId | ^ ||
|| CampaignType | ^ ||
|| ClientLogin |  ^ ||

|| AdFormat	| EQUALS, IN, NOT_EQUALS, NOT_IN ||
|| AdGroupId | ^ ||
|| AdId | ^ ||
|| Age | ^ ||
|| AudienceTargetId | ^ ||
|| CarrierType | ^ ||
|| ClickType | ^ ||
|| CriteriaType | ^ ||
|| CriterionType | ^ ||
|| Device | ^ ||
|| DynamicTextAdTargetId | ^ ||
|| ExternalNetworkName | ^ ||
|| Gender | ^ ||
|| IncomeGrade | ^ ||
|| LocationOfPresenceId | ^ ||
|| MatchType | ^ ||
|| MobilePlatform | ^ ||
|| Placement | ^ ||
|| RlAdjustmentId | ^ ||
|| Slot | ^ ||
|| SmartAdTargetId | ^ ||
|| TargetingCategory | ^ ||

|| TargetingLocationId | EQUALS, IN, GREATER_THAN, LESS_THAN ||
|| Clicks | ^ ||
|| Conversions | ^ ||

|| ImpressionReach | GREATER_THAN, LESS_THAN ||
|| Impressions | ^ ||
|| AvgClickPosition | ^ ||
|| AvgCpc | ^ ||
|| AvgCpm | ^ ||
|| AvgEffectiveBid | ^ ||
|| AvgImpressionFrequency | ^ ||
|| AvgImpressionPosition | ^ ||
|| AvgPageviews | ^ ||
|| AvgTrafficVolume | ^ ||
|| BounceRate | ^ ||
|| ConversionRate | ^ ||
|| Cost | ^ ||
|| CostPerConversion | ^ ||
|| Ctr | ^ ||
|| GoalsRoi | ^ ||
|| Profit | ^ ||
|| Revenue | ^ ||
|| WeightedCtr | ^ ||
|| WeightedImpressions | ^ ||

|| Keyword | EQUALS, IN, NOT_EQUALS, NOT_IN, STARTS_WITH_IGNORE_CASE, STARTS_WITH_ANY_IGNORE_CASE, DOES_NOT_START_WITH_IGNORE_CASE, DOES_NOT_START_WITH_ALL_IGNORE_CASE ||
|| MatchedKeyword | ^ ||
|| Query | ^ ||

|#

## Filter by ClientLogin

In the ClientLogin filter, you can specify only the client usernames available to the manager account.

- If the filter is not set for the field, the username from the `Client-Login` HTTP header is used by default. If the header is missing, the username is taken from the OAuth token.
- If the filter for the `ClientLogin` field exists, the maximum number of rows in the report is 500,000 (the same value is used by default).

## Filter by Age

In the Age field, statistics for periods up to 08/21/2018 will display the value AGE_45, and after that date, the values AGE_45_54 and AGE_55.

To get statistics for all users age 45 and over regardless of the report period, we recommend specifying all three values in the Age filter:

{% list tabs %}

- JSON

  ```
  "Filter": [{
  "Field": "Age",
  "Operator": "IN",
  "Values": ["AGE_45", "AGE_45_54", "AGE_55"]
  }]
  ```

- XML

  ```
  <Filter>
  <Field>Age</Field>
  <Operator>IN</Operator>
  <Values>AGE_45</Values>
  <Values>AGE_45_54</Values>
  <Values>AGE_55</Values>
  </Filter>
  ```

{% endlist %}

If not all of these age segments are specified in the filter, the statistics for the period that includes the date 21.08.2018 may be incomplete. For example, if only the values AGE_45_54 and AGE_55 are specified, the report will not include users whose age group is defined as AGE_45.

If the filter specifies AGE_45 and does not specify AGE_45_54 and AGE_55, the report won't be generated for a period after 21.08.2018 and an error message will be returned.

## Filters for targeting criteria

The following fields aren't output to the report. They are only used for filtering data. These fields are mutually exclusive; only one of them can be present in the Filter array.

#|

|| **Field** | **Description** | **Comment** ||

|| `Keyword` | The keyword text. | The keyword text is shown in the `Criterion` field in the report, and the keyword ID is shown in the `CriterionId` field. ||

|| `AudienceTargetId` |	ID of the audience target. See [the section Audience target (AudienceTarget)](https://yandex.com/dev/direct/doc/dg/objects/audience-target.html). | The ID of the audience target is shown in the `CriterionId` field. The `Criterion` field shows the name of the retargeting list.

Filtering by `AudienceTargetId` is available for data starting from December 8, 2017. ||

|| `DynamicTextAdTargetId` | The ID of the audience target for dynamic ads, or the ID of the filter for dynamic ads. See the section [Ad target for dynamic ads (DynamicTextAdTarget — Webpage)](https://yandex.com/dev/direct/doc/dg/objects/dynamictextadtarget.html) | The ID of the dynamic text ad target is shown in the `CriterionId` field in the report, and the name is shown in the `Criterion` field. ||

|| `SmartAdTargetId` | The ID of the filter for smart banners. |	
The ID of the smart banner filter is shown in the `CriterionId` field in the report, and the name is shown in the `Criterion` field. ||

|#

## RlAdjustmentId filter

The `RIAdjustmentId` filter can have the value NONE, which means that bid adjustments for a target audience weren't applied.

In particular, if you only want the report to show data with bid adjustments for a target audience, use this filter:

{% list tabs %}

- JSON

  ```
  "Filter": [{
  "Field": "RlAdjustmentId",
  "Operator": "NOT_EQUALS",
  "Values": ["NONE"]
  }]
  ```

- XML

  ```
  <Filter>
  <Field>RlAdjustmentId</Field>
  <Operator>NOT_EQUALS</Operator>
  <Values>NONE</Values>
  </Filter>
  ```

{% endlist %} 

## Filters for monetary values

All monetary values in filters should be specified as **integers**: the amount in the currency, **multiplied by 1,000,000** (regardless of the `returnMoneyInMicros: false` header).
