---
lang: en
title: 'API docs: filter.filter'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/filter
permalink: /doc/en/lb4/apidocs.filter.filter.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/filter](./filter.md) &gt; [Filter](./filter.filter.md)

## Filter interface

Query filter object

**Signature:**

```typescript
export interface Filter<MT extends object = AnyObject> 
```

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[fields?](./filter.filter.fields.md)


</td><td>


</td><td>

[Fields](./filter.fields.md)<!-- -->&lt;MT&gt;


</td><td>

_(Optional)_ To include/exclude fields


</td></tr>
<tr><td>

[include?](./filter.filter.include.md)


</td><td>


</td><td>

[InclusionFilter](./filter.inclusionfilter.md)<!-- -->\[\]


</td><td>

_(Optional)_ To include related objects


</td></tr>
<tr><td>

[limit?](./filter.filter.limit.md)


</td><td>


</td><td>

number


</td><td>

_(Optional)_ Maximum number of entities


</td></tr>
<tr><td>

[offset?](./filter.filter.offset.md)


</td><td>


</td><td>

number


</td><td>

_(Optional)_ Offset N number of entities. An alias for `skip`


</td></tr>
<tr><td>

[order?](./filter.filter.order.md)


</td><td>


</td><td>

string\[\]


</td><td>

_(Optional)_ Sorting order for matched entities. Each item should be formatted as `fieldName ASC` or `fieldName DESC`<!-- -->. For example: `['f1 ASC', 'f2 DESC', 'f3 ASC']`<!-- -->.

We might want to use `Order` in the future. Keep it as `string[]` for now for compatibility with LoopBack 3.x.


</td></tr>
<tr><td>

[skip?](./filter.filter.skip.md)


</td><td>


</td><td>

number


</td><td>

_(Optional)_ Skip N number of entities


</td></tr>
<tr><td>

[where?](./filter.filter.where.md)


</td><td>


</td><td>

[Where](./filter.where.md)<!-- -->&lt;MT&gt;


</td><td>

_(Optional)_ The matching criteria


</td></tr>
</tbody></table>


