There are several ways to get a single property. By ID as in this example or including the unique key (i.e. Listing Key) in the Property attribute. i.e. Property(‘23442234’). Resultant fields are dictated by the $select...
https://sparkapi.com/Reso/OData/Property?$filter=ListingKey eq '20140701184827018171000000'&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City Top ▴
Filter results by a boolean field (true or false). Note, do not treat the value true or false as a string.
https://sparkapi.com/Reso/OData/Property?$filter=FireplaceYN eq true&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,FireplaceYN Top ▴
All names in the $filter option are case sensitive and must match the names of elements provided by the metadata resource. Values are also case sensitive.
https://sparkapi.com/Reso/OData/Property?$filter=BedroomsTotal lt 5 and City eq 'Holland' and (PropertyType eq 'Residential')&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,BedroomsTotal Top ▴
Use parenthesis and logical ‘and’ or ‘or’ to group filter expressions.
https://sparkapi.com/Reso/OData/Property?$filter=BedroomsTotal lt 5 or (BedroomsTotal eq 4 and FireplaceYN eq true)&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City Top ▴
Filter a query by matching strings. Note that string comparisons are case sensitive. There are also string functions to aid with string filters but will vary depending on MLS Provider (i.e. toupper(StreetName) eq...
https://sparkapi.com/Reso/OData/Member?$filter=(MemberFirstName eq 'James' or toupper(MemberFirstName) eq 'Adam')&$top=20 Top ▴
not equal (ne) is used as to counter equal (eq)
https://sparkapi.com/Reso/OData/Property?$filter=BedroomsTotal ne 3&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City Top ▴
A boolean ‘Not’ must enclose its operands in a parenthesis with not as an operator i.e. not(City eq ‘Elkwood’).
https://sparkapi.com/Reso/OData/Property?$filter=not(BedroomsTotal le 3) and (PropertyType eq 'Residential')&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,BedroomsTotal&$top=10 Top ▴
The $expand system query option specifies the related resources to be included in line with retrieved resources. Look for the NavigationProperty in the metadata to determine if a resource is linked for expansion.
https://sparkapi.com/Reso/OData/Property?$filter=City eq 'Holland' and (PropertyType eq 'Residential') and PhotosCount gt 1&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,PhotosCount&$expand=Media Top ▴
The $orderby system query option allows clients to request resources in either ascending order using asc or descending order using desc. If asc or desc not specified, then the resources will be ordered in ascending (asc) order. A compliant client SHOULD use the...
https://sparkapi.com/Reso/OData/Property?$filter=BedroomsTotal lt 5 and (PropertyType eq 'Residential')&$orderby=ListPrice desc&$top=10&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City Top ▴
Get first 10 results from query/filter. All names in the $select option are case-sensitive to match the names of elements provided by the resource. The implementation of $top and $orderby is defined by the server and may restrict what values may be used in either...
https://sparkapi.com/Reso/OData/Member?$top=10&$select=MemberLastName,MemberFirstName,MemberLoginId&$filter=toupper(MemberFirstName) eq 'JOHN' Top ▴
Skip by the first 10 results and return the 2nd 10 results from a filter. If more records exist in the query than returned then using the @odata.nextLink value from the result is another way to retrieve remaining...
https://sparkapi.com/Reso/OData/Member?$skip=10&$top=10&$orderby=MemberLastName&$select=MemberLastName,MemberFirstName,MemberLoginId Top ▴
The resultant output (usually JSON) can be dictated by using the OData ‘select’ statement.
https://sparkapi.com/Reso/OData/Property?$filter=BedroomsTotal eq 3&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City Top ▴
A Single Valued Lookup is a field that can have one and only one selection from a list of values. The Web API Implements Single Valued Lookup fields using the OData data type of Edm.EnumType with an underlying type of...
https://sparkapi.com/Reso/OData/Property?$filter=(PropertyType eq 'Residential') and PropertyType has PropertyEnums.PropertyType'Residential'&$top=10&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,PropertyType Top ▴
A Multi-Valued Lookup is a field that can have one or more items selected from a list of values.
https://sparkapi.com/Reso/OData/Property?$filter=(PropertyType eq 'Residential') and (ConstructionMaterials has PropertyEnums.ConstructionMaterials'Brick') or (ConstructionMaterials has PropertyEnums.ConstructionMaterials'Concrete')&$top=10&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,ConstructionMaterials Top ▴
Filtering on a date requires date fields to be defined as dates (Type=”Edm.Date”) in the metadata
https://sparkapi.com/Reso/OData/Property?$filter=ListingContractDate lt 2016-12-31 and (PropertyType eq 'Residential')&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,ListingContractDate Top ▴
Filtering on time can use of the hour, minute, second and fractional seconds functions.
https://sparkapi.com/Reso/OData/Property?$filter=year(ModificationTimestamp) eq 2018 and month(ModificationTimestamp) gt 5 and day(ModificationTimestamp) lt 31 and hour(ModificationTimestamp) gt 1 and minute(ModificationTimestamp) gt 3 and (PropertyType eq 'Residential')&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,ModificationTimestamp Top ▴
filtering on fractions of a second requires the use of the function fractionalseconds()
https://sparkapi.com/Reso/OData/Property?$filter=ListingContractDate lt 2016-12-31 and fractionalseconds(ModificationTimestamp) lt 0033 and (PropertyType eq 'Residential')&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,ListingContractDate,ModificationTimestamp Top ▴
The function now() will return the now time in UTC
https://sparkapi.com/Reso/OData/Property?$filter=ModificationTimestamp le now() and (PropertyType eq 'Residential')&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,ModificationTimestamp&$top=4 Top ▴
Filter on a string field value that starts with a certain value. This is case sensitive
https://sparkapi.com/Reso/OData/Member?$filter=startswith(MemberFirstName, 'Joh')&$select=MemberFirstName,MemberLastName,MemberStatus,ModificationTimestamp&$top=20 Top ▴
Filter on a string field value that ends with a certain value. This is case sensitive
https://sparkapi.com/Reso/OData/Property?$filter=endswith(StreetName, 'M')&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,StreetName&$top=4 Top ▴
Filter on a string field value that contains a certain value. This is case sensitive
https://sparkapi.com/Reso/OData/Property?$filter=contains(toupper(StreetName),'MAIN')&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City Top ▴
Convert a string to upper case (toupper). Lower case would use the function tolower().
https://sparkapi.com/Reso/OData/Property?$filter=City eq 'Holland' and (PropertyType eq 'Residential') and toupper(StreetName) eq 'MAIN'&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City,StreetName Top ▴
A geographic search from a point in the Data System. Note that the structure of a geospatial search can vary per MLS.Search. Pay attention to MLS Service metadata name for Type=”Edm.GeographyPoint”.
https://sparkapi.com/Reso/OData/Property?$filter=geo.distance(Location, geography'POINT(-85.666028 42.920418)') le 4&$top=4 Top ▴
Need a minimum of four points to search by a polygon. The first and last points must be the same and because you’re able to put ‘holes’ into your polygon, you’d need to wrap the coords in another set of parenthesis. Note that the structure of a...
https://sparkapi.com/Reso/OData/Property?$filter=(PropertyType eq 'Residential') and geo.intersects(Location,geography'POLYGON((-85.666028 42.920418,-85.672022 42.941522,-85.625124 42.940888,-85.623763 42.920824,-85.666028 42.920418))')&$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks,StreetName,StreetNumber,City Top ▴