Using contains: and notContains: Prefixes in API Filters

Overview


The Repliers API supports powerful contains: and notContains: operators that allow you to filter properties based on specific values within composite fields. These operators work with fields that store multiple values as comma-separated strings or arrays, making it easy to find properties that include or exclude particular amenities, basement types, features, or other multi-value attributes.


Unlike exact value matching, these operators perform partial matching within composite fields, giving you fine-grained control over your search results.


Basic Usage


To find properties that contain a specific value within a composite field, use the contains: prefix. To exclude properties containing a specific value, use the notContains: prefix.


Syntax


field_name=contains:value_to_match
field_name=notContains:value_to_exclude


Example


To find all properties with a "Finished" basement type:


https://api.repliers.io/listings?details.basement=contains:Finished


To find all properties that do not have a "Finished" basement type:


https://api.repliers.io/listings?details.basement=notContains:Finished


Working with Comma-Separated Values


Many MLS fields store multiple values as comma-separated strings. The contains: and notContains: operators search for exact matches of individual comma-separated components within these composite values.


How It Works


Consider the details.basement field, which can contain values like


 "Finished"
"Unfinished"
"Full"
"Full, Finished"
"Apartment, Separate Entrance",
"Finished With Walk-Out, Separate Entrance"
"Walk-Up, Finished"
"Finished, Apartment"



When you use details.basement=contains:Finished, the API searches for any basement value that has "Finished" as an exact comma-separated component. This matches:


  • "Finished"
  • "Full, Finished"
  • "Finished, Walk-Out"
  • "Walk-Up, Finished"


Importantly, contains:Finished does not match values like:


  • "Finished With Walk-Out" (because the component is "Finished With Walk-Out", not "Finished")
  • "Finished With Walk-Out, Apartment" (components are "Finished With Walk-Out" and "Apartment", neither matching exactly)


Conversely, details.basement=notContains:Finished returns only basement values that do not have "Finished" as a comma-separated component, such as:


  • "None"
  • "Unfinished"
  • "Full"
  • "Apartment, Separate Entrance"
  • "Finished With Walk-Out"


Example Query


To find properties with a finished basement:


https://api.repliers.io/listings?details.basement=contains:Finished


To find properties without a "Walk-Out" basement feature:


https://api.repliers.io/listings?details.basement=notContains:Walk-Out


Working with Array Fields


Some fields store multiple values as arrays. The contains: and notContains: operators work seamlessly with these array fields as well.


How It Works

Consider the condominium.amenities field, which is an array that might contain values like:

["Concierge", "Gym", "Community BBQ", "Party Room/Meeting Room", "Visitor Parking"]


When you use condominium.amenities=contains:Gym, the API returns all condominiums where "Gym" appears anywhere in the amenities array.


When you use condominium.amenities=notContains:Concierge, the API returns only condominiums that do not have "Concierge" in their amenities array.


Example Query


To find condominium units with a gym:


https://api.repliers.io/listings?condominium.amenities=contains:Gym

To find properties that do not have visitor parking:


https://api.repliers.io/listings?condominium.amenities=notContains:Visitor Parking


Multiple Filters


You can use multiple contains: and notContains: filters on the same field or different fields to refine your search results further.


Multiple Values on the Same Field


To find properties that contain one value AND do not contain another:


https://api.repliers.io/listings?details.basement=contains:Full&details.basement=notContains:Apartment


This returns properties with "Full" basement but without "Apartment" in the basement type.


Different Fields


You can combine filters across multiple fields:


https://api.repliers.io/listings?details.basement=contains:Finished&condominium.amenities=contains:Gym


This returns condominiums with a finished basement that also have a gym.


Common Use Cases


Property Feature Searches


  • Find properties with a specific basement type: details.basement=contains:Finished
  • Exclude properties with certain basement characteristics: details.basement=notContains:Crawl Space


Amenity Filtering


  • Find condos with specific amenities: condominium.amenities=contains:Concierge
  • Exclude properties without desired amenities: condominium.amenities=notContains:Gym


Multi-Criteria Searches


  • Find finished basements with a walk-out: details.basement=contains:Finished&details.basement=contains:Walk-Out
  • Find properties with multiple amenities but exclude undesired ones: condominium.amenities=contains:Pool&condominium.amenities=notContains:Outdoor


Important Notes


  • The contains: and notContains: operators are designed for fields with multiple comma-separated values or array fields.
  • For comma-separated values, the operators perform exact matching on individual comma-separated components. A value like "Finished With Walk-Out" will not match contains:Finished because they are different components.
  • For array fields, the operators search for exact matches of array elements.
  • Multiple filters on the same field are applied with AND logic (all conditions must be met).
  • These operators are case-sensitive, so ensure your values match exactly as they appear in the field data.
  • Array fields may return empty arrays for properties that don't match the filter criteria, rather than excluding the property entirely.
  • Use these operators in combination with other filters for more targeted searches.


Support

If you encounter any issues with the contains: or notContains: operators or need help with complex filtering scenarios, please contact our support team with specific examples of the queries you're trying to run.


Updated on: 19/10/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!