> ## 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).

# Passing Multiple Values for the Same Parameter

When working with our API, you may need to filter results using multiple values for the same parameter. For instance, you might want to search for both single-family residences and townhouses in a single API call.

## Two Supported Methods

Our API supports two different approaches for passing multiple values to the same parameter:

### Method 1: Repeated Parameters

You can repeat the same parameter name with different values:

```
https://api.repliers.io/listings?style=singlefamilyresidence&style=townhouse
```

### Method 2: Array Format

You can pass multiple values as a JSON array:

```
https://api.repliers.io/listings?style=["singlefamilyresidence","townhouse"]
```

## When to Use Each Method

**Repeated Parameters** are ideal when:

* Building URLs programmatically with simple concatenation
* Working with HTML forms that naturally support multiple values
* Using tools or libraries that easily handle repeated parameter names

**Array Format** is preferred when:

* Working with JSON-based applications
* You need a more structured approach to parameter passing
* Building complex queries with nested logic

## Important Notes

* Both methods will return the same results
* You can use either method interchangeably based on your preference or technical requirements
* **Not all parameters support multiple values** - check our developer documentation to confirm which parameters accept arrays
* Make sure to properly URL-encode your parameters, especially when using the array format
* The array format should use double quotes around string values as shown in the examples

## Additional Examples

**Multiple property types:**

```
# Repeated parameters
?type=condo&type=apartment&type=loft

# Array format
?type=["condo","apartment","loft"]
```

**Multiple locations:**

```
# Repeated parameters
?city=seattle&city=portland&city=vancouver

# Array format
?city=["seattle","portland","vancouver"]
```

Choose the method that works best with your development environment and coding style. Both approaches will deliver the same filtered results from our API.

## Frequently Asked Questions

**Question**: Can I use comma-separated values? For example ?city=New York,West Palm Beach,Miami
**Answer**: No, you can't comma-separate values when filtering by multiple values for the same parameter.

# What questions does this article answer?

* How do I pass multiple values to the same parameter (e.g., multiple property types or cities)?  
* What’s the difference between repeated parameters (`type=a&type=b`) and JSON array syntax (`type=["a","b"]`)?  
* When should I use repeated parameters vs. an array in URLs?  
* Why can’t I use comma-separated values for multiple values in a single parameter?  
* Which parameters actually support multiple values?