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

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

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

## Filter interface

Query filter object

<b>Signature:</b>

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

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [fields](./repository.filter.fields.md) | [Fields](./repository.fields.md)<!-- -->&lt;MT&gt; | To include/exclude fields |
|  [include](./repository.filter.include.md) | [Inclusion](./repository.inclusion.md)<!-- -->\[\] | To include related objects |
|  [limit](./repository.filter.limit.md) | number | Maximum number of entities |
|  [offset](./repository.filter.offset.md) | number | Offset N number of entities. An alias for <code>skip</code> |
|  [order](./repository.filter.order.md) | string\[\] | 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>.<!-- -->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. |
|  [skip](./repository.filter.skip.md) | number | Skip N number of entities |
|  [where](./repository.filter.where.md) | [Where](./repository.where.md)<!-- -->&lt;MT&gt; | The matching criteria |


