> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.repliers.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Q&A Related to Filtering

## Can we submit filters in the request body instead of the request URL?

Only certain filters are permitted in the request body, such as the "map" filter. This is because values for the "map" filter are often large and exceed the URL length limit if used in the URL. All other filters should be used in the request URL as query parameters.

**Example of body filter usage:**

```json
{
  "map": [[[-79.14121,43.79041],[-79.132627,43.773059],[-79.188932,43.886988],[-79.200605,43.877832],[-79.236654,43.869665],[-79.265836,43.860011],[-79.281972,43.856051],[-79.322828,43.84689],[-79.368146,43.839214],[-79.386021,43.836139],[-79.41486,43.838616],[-79.423787,43.836635],[-79.475285,43.82227],[-79.480092,43.813352],[-79.480778,43.803441],[-79.485585,43.79799],[-79.493825,43.794025],[-79.556996,43.779649],[-79.601628,43.761303],[-79.61611,43.758572],[-79.629934,43.750141],[-79.625471,43.728064],[-79.616888,43.713177],[-79.606245,43.695555],[-79.601095,43.685873],[-79.593885,43.681156],[-79.590109,43.672465],[-79.582212,43.671224],[-79.574659,43.670975],[-79.535177,43.58325],[-79.424627,43.619052],[-79.385488,43.602645],[-79.315451,43.612092],[-79.14121,43.79041]]]
}
```

**Standard URL filter usage:**

```
GET /listings?city=Toronto&propertyType=Detached
```

## If I pass multiple values for a specific filter, is the default logic OR or AND? What about if I'm using multiple filters?

The default logic for **multiple values of the same filter** is **OR**. When you specify the same filter parameter multiple times, the API will return results that match any of those values.

**Example:**

```
https://api.repliers.io/listings?city=Mississauga&city=Brampton&city=Toronto
```

This will find listings where the city is **either** Mississauga, **or** Brampton, **or** Toronto.

When you're **combining different filters** in a single request, **AND** logic applies between each filter type. This means all filter conditions must be satisfied.

**Example:**

```
https://api.repliers.io/listings?city=Mississauga&city=Brampton&city=Toronto&propertyType=Detached&propertyType=Semi-Detached
```

This translates to:

```
(city = Mississauga OR city = Brampton OR city = Toronto) 
AND 
(propertyType = Detached OR propertyType = Semi-Detached)
```

The result will include listings that are in one of the specified cities **and** are one of the specified property types.

## How can I combine multiple filters in a single search?

You can combine multiple filters by simply specifying all the filters you'd like to use as query parameters in the URL. Each filter type will be combined using AND logic, while multiple values within the same filter use OR logic.

**Simple combination example:**

```
https://api.repliers.io/listings?city=Toronto&propertyType=Detached
```

This finds listings that are **both** in Toronto **and** are Detached properties.

**Complex combination example:**

```
https://api.repliers.io/listings?city=Toronto&city=Mississauga&propertyType=Detached&propertyType=Condo
```

This finds listings that meet all of the following criteria:

* City is Toronto **or** Mississauga
* Property type is Detached **or** Condo

**Additional filtering tips:**

* URL-encode special characters in filter values
* Consider using POST with request body for complex geographical filters or when approaching URL length limits
* The order of parameters in the URL does not affect the results