> For the complete documentation index, see [llms.txt](https://docs.snello.io/snello-cms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snello.io/snello-cms/rest-api/filters-and-limit-and-sort.md).

# filters & limit & sort

{% hint style="info" %}

### filters

{% endhint %}

To use **filters** you need to add to all field the postfix.

Immagine that you have a metadata named "users":

* uuid
* name \[string]
* surname \[string]
* age \[number]
* year \[select with values "first", "second", "third", "quarter", "fifth"]

{% hint style="info" %}

#### string comparation

{% endhint %}

**equal**

```
/api/example?year=first
```

#### not equal

```
/api/example?year_ne=first
```

**like or right like or left like or contains or not contains**

```
/api/example?year_like=fir
/api/example?year_ilike=fir // for postgresql case insensitive ilke
/api/example?year_rlike=fi
/api/example?year_llike=st
/api/example?year_contains=rs
/api/example?year_ncontains=z
```

#### in

```
/api/example?year_in=first,second
```

#### is not null or is not null or not empty or is empty

```
/api/example?year_nn
/api/example?year_inn
/api/example?year_nie
/api/example?year_ie
```

{% hint style="info" %}

#### numeric comparation

{% endhint %}

### less than or less than equal

```
/api/example?age_lt=18
/api/example?age_lte=18
```

### grether than or less than equal

```
/api/example?age_gt=18
/api/example?age_gte=18
```

{% hint style="info" %}
**order by**
{% endhint %}

```
/api/example?_sort=name
```

### start

```
/api/example?_start=1
```

### limit

```
/api/example?_limit=2
```

### select fields �

```
/api/example?select_fields=name,surname
```

�


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snello.io/snello-cms/rest-api/filters-and-limit-and-sort.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
