---
lang: en
title: 'API docs: repository.filter'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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) | <code>Fields&lt;MT&gt;</code> | To include/exclude fields |
|  [include](./repository.filter.include.md) | <code>Inclusion&lt;MT&gt;[]</code> | To include related objects |
|  [limit](./repository.filter.limit.md) | <code>number</code> | Maximum number of entities |
|  [offset](./repository.filter.offset.md) | <code>number</code> | Offset N number of entities. An alias for <code>skip</code> |
|  [order](./repository.filter.order.md) | <code>string[]</code> | 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) | <code>number</code> | Skip N number of entities |
|  [where](./repository.filter.where.md) | <code>Where&lt;MT&gt;</code> | The matching criteria |


