---
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

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [fields?](./filter.filter.fields.md) |  | [Fields](./filter.fields.md)<!-- -->&lt;MT&gt; | _(Optional)_ To include/exclude fields |
|  [include?](./filter.filter.include.md) |  | [InclusionFilter](./filter.inclusionfilter.md)<!-- -->\[\] | _(Optional)_ To include related objects |
|  [limit?](./filter.filter.limit.md) |  | number | _(Optional)_ Maximum number of entities |
|  [offset?](./filter.filter.offset.md) |  | number | _(Optional)_ Offset N number of entities. An alias for <code>skip</code> |
|  [order?](./filter.filter.order.md) |  | string\[\] | <p>_(Optional)_ Sorting order for matched entities. Each item should be formatted as <code>fieldName ASC</code> or <code>fieldName DESC</code>. For example: <code>['f1 ASC', 'f2 DESC', 'f3 ASC']</code>.</p><p>We might want to use <code>Order</code> in the future. Keep it as <code>string[]</code> for now for compatibility with LoopBack 3.x.</p> |
|  [skip?](./filter.filter.skip.md) |  | number | _(Optional)_ Skip N number of entities |
|  [where?](./filter.filter.where.md) |  | [Where](./filter.where.md)<!-- -->&lt;MT&gt; | _(Optional)_ The matching criteria |


