---
url: /nestjs-odata/api/generated/functions/parseFilter.md
---
# Function: parseFilter()

> **parseFilter**(`input`, `options?`): [`FilterNode`](../type-aliases/FilterNode.md)

Defined in: [parser/parser.ts:553](https://github.com/cberd1509/nestjs-odata/blob/a42974292d62fe5da337a603d3b22d57c08cbf68/packages/core/src/parser/parser.ts#L553)

Parse a standalone OData $filter expression string into a FilterNode AST.

## Parameters

### input

`string`

Raw filter expression (e.g., "Price gt 5 and Active eq true")

### options?

#### allowIt?

`boolean`

## Returns

[`FilterNode`](../type-aliases/FilterNode.md)

Root FilterNode of the parsed expression

## Throws

ODataParseError on syntax errors
