---
title: Filtering
slug: data-platform/api/QRwe-filtering
createdAt: 2026-06-24T13:32:48.000Z
---

You can use `and` or `or` clauses to return the exact customer data that you want. The filtering section in the payload may contain one of the following:

- `clause` – A standalone clause for defining a filter on ODP data elements.
- `and (all sub-clauses)` – A combination of clauses. If all of the contained clauses (which may include nested `and/or` clauses) evaluate to true, this data element may pass the overall filter. If any one (or more) of them do not, the data element will not pass the filter.
- `or (at least one sub-clause)` – A combination of clauses. If any one (or more) of the contained clauses (which may include nested `and` or `or` clauses) evaluates to true, this data element may pass the overall filter. If none do, the data element will not pass the filter.

:::hint{type="warning"}
**Important**
`and` or `or` are case-sensitive in this filter and must be all lowercase.
:::

```text
{      
      "format": "csv",
      "delimiter": "comma",
      "select": {
        "object": "customers",
        "fields": [
                  "email",
                  "insights.ttno_days"
                  ],
        "filter": {
			            "and": [
				                  {
				                  "field": "email",
				                  "operator": "!=",
				                  "value": null
				                  },
		                      {
		                      "field": "ccpa_opted_out",
		                      "operator": "!=",
		                      "value": true}
	                       ]
    	              }
                }
    }
```
