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.
Updated on: 09/06/2025
Thank you!