> For the complete documentation index, see [llms.txt](https://api-docs.intratool.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.intratool.help/introduction/query-manipulation/value-filters.md).

# Value Filters

Value Filters restrict `GET` results by comparing public fields with request values. Filters use `AND` semantics when a request contains multiple conditions.

Filtering a related field adds a relation constraint. Public fields on the requested resource and its publicly accessible relations can be addressed with dot notation.

## Syntax

* `{route}` - Endpoint from which records are retrieved.
* `?filter` - Query parameter containing the field filters.
* `[{field}]` - Public field to which the filter applies.
* `[{filter}]` - Filter key documented below. Defaults to [`value`](#value) when omitted.
* `{value}` - Request value compared with the affected field.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][{filter}]={value}`

{% hint style="info" %}
Value Filters can address fields on related records and nested relations.

`?filter[user.role.department.title]=TestDepartment`

Filtering a related field restricts the parent records. Use `include` separately to return the related records.
{% endhint %}

{% hint style="warning" %}
Use `camelCase` for relation names and `snake_case` for field keys.
{% endhint %}

## Value

The `value` filter performs a case-insensitive partial comparison equivalent to `LIKE`. It returns records whose affected field contains `{value}`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][value]={value}`

## Is Value

The `is` filter performs an exact `=` comparison and returns records whose affected field equals `{value}`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][is]={value}`

## Is Not Value

The `not` filter performs a `!=` comparison and returns records whose affected field does not equal `{value}`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][not]={value}`

## Greater Than

The `gt` filter performs a `>` comparison and returns records whose affected field is greater than `{value}`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][gt]={value}`

## Greater Than or Equal

The `gte` filter performs a `>=` comparison and returns records whose affected field is greater than or equal to `{value}`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][gte]={value}`

## Less Than

The `lt` filter performs a `<` comparison and returns records whose affected field is less than `{value}`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][lt]={value}`

## Less Than or Equal

The `lte` filter performs a `<=` comparison and returns records whose affected field is less than or equal to `{value}`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][lte]={value}`

## Null Checks

The `is_null` filter accepts `0` or `1`.

Pass `1` to return records whose affected field is `null`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][is_null]={1}`

Pass `0` to return records whose affected field is not `null`.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][is_null]={0}`

## In

The `in` filter accepts comma-separated values or an array and returns records whose affected field equals any supplied value.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][in]={value}`

An empty item includes records whose field is `null`. For example, `filter[folder_id][in]=1,` matches folder `1` or no folder; `filter[folder_id][in]=` matches only `null`. A literal `0` is a regular value. An empty array matches no records.

## Not In

The `nin` filter accepts comma-separated values or an array and excludes records whose affected field equals a supplied value.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][nin]={value}`

An empty item adds a not-null condition. For example, `filter[folder_id][nin]=` matches records with a folder. When non-empty values are supplied, the database comparison also excludes `null` fields. An empty array adds no restriction.

## Period

The `period` filter accepts two comma-separated dates and returns records whose affected field lies within that period.

<mark style="color:green;">`GET`</mark> `/api/{route}?filter[{field}][period]={value}`
