filterQuery

String, Optional

To do filtering, you must have the following parameters in the query:

  1. filterQuery

filterQuery is used to apply filters or conditions to a dataset or query results, allowing users to retrieve specific information based on their desired criteria.

This parameter accepts a query syntax, which works as shown below.

Syntax

{
	"filterQuery":'attribute:value [AND | OR | NOT](#boolean-operators) attribute:value'
  				'numeric_attribute [= | != | > | >= | < | <=](#numeric-comparisons) numeric_value'
  				'attribute:lower_value TO higher_value'
  				'[facetName:facetValue](#facet-filters)'
  				'attribute:value'
}

For example:

{
  "filterQuery": "constructionStatus:Pre-Construction AND numberOfFloorPlans > 2"
}
  1. retrieveAttributes

retrieveAttributes enables users to retrieve specific property attributes or details, such as selling status, type, and owners, for a particular listing or set of listings.

You must input the attribute that you input in the filterQuery, for example:

Syntax

{
     "retrieveAttributes": [
          "constructionStatus",
          "numberOfFloorPlans"
     ],
     "filterQuery": "constructionStatus:Pre-Construction AND numberOfFloorPlans > 2"
}

Info

See this page for more info about Retrievable Attributes.

Usage Examples

Please refer to the usage examples of the filterQuery below to gain a deeper understanding:

Filter By String


{
     "page": 0,
     "perPage": 5,
     "retrieveAttributes": [
          "name",
          "constructionStatus"
     ],
     "filterQuery": "constructionStatus:Pre-Construction"
}

Filter by numeric value


{
     "page": 0,
     "perPage": 1,
     "retrieveAttributes": [
          "name",
          "floorPlans"
     ],
     "filterQuery": "floorPlans.startPrice > 1000"
}

Filter by boolean


{
     "page": 0,
     "perPage": 5,
     "retrieveAttributes": [
          "name",
          "constructionStartedTBD"
     ],
     "filterQuery": "constructionStartedTBD:true"
}

Filter an array

An array filter returns true if any array elements match the given filtered value.


{
     "page": 0,
     "perPage": 5,
     "retrieveAttributes": [
          "name",
          "builders"
     ],
     "filterQuery": "builders:Builders/SvlJfjvxgniK5ywpcfUn"
}

Using Boolean Operators

Buildify supports the following boolean operations on filters.

  • OR: must match any combined conditions (disjunction).
  • AND: must match all combined conditions (conjunction).
  • NOT: negates a filter

Finally, parentheses (and) can be used for grouping.


{
     "page": 0,
     "perPage": 5,
     "retrieveAttributes": [
          "name",
          "municipalities",
          "builders"
     ],
     "filterQuery": "(municipalities:C08 OR municipalities:C01) AND builders:Builders/WKWeAkR8fzENjPJBSEAF"
}

Filterable attributes

Filterable attributes refer to the characteristics or properties of a dataset that can be used as criteria to filter or narrow down the results of a search or query. Take a look at the attributes offered by Buildify in the following list:

For Listings

agentsarchitectsamenities
brokeragesbuilderscityOrDistrict
communitiescompletionDateTBDconstructionStartedTBD
constructionStatuscountryestimatedCompletionDateTBD
firstOccupancyDateTBDfloorPlans.exposurefloorPlans.floorPlanType
floorPlans.numberOfBathroomsfloorPlans.numberOfBedroomsfloorPlans.squareFeet
floorPlans.startPriceinteriorDesignersmarketingCompanies
municipalitiesnameneighbourhood
numberOfFloorPlansnumberOfFloorsnumberOfIncentives
numberOfPaymentsnumberOfRealtorPayoutsnumberOfUnits
ownersrealtorCommissionrealtorCommissionByContact
salesCentressalesCompaniessalesStartedTBD
sellingStatusstatestreetName
typestartPriceendPrice
contactForPricing

For profiles

nameemailcontact
websiteaddresslistings