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=ListingId eq '332017' 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=(ListPrice gt 500000 and ListPrice lt 1150000) and (City eq 'Vancleave')&$top=10&$select=ListingId,ListPrice,StreetName,City,PropertySubType 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=InternetAddressDisplayYN eq true and (ListPrice gt 500000 and ListPrice lt 1150000) and (City eq 'Vancleave')&$top=10&$select=ListingId,ListPrice,StreetName,City,PropertySubType,InternetAddressDisplayYN 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/Property?$filter=(PropertySubType eq 'b__53696e676c652046616d696c79205265736964656e6365' and (StreetName eq 'Twisted Run' or StreetName eq 'cr 222'))&$top=25&$select=ListingId,ListPrice,StreetNumber,StreetName,City,PropertySubType,InternetAddressDisplayYN 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,City,StreetName,StreetNumber,BedroomsTotal&$top=10 Top ▴
Use parenthesis and logical ‘and’ or ‘or’ to group filter expressions.
https://sparkapi.com/Reso/OData/Property?$top=11&$select=ListingKey,BedroomsTotal,BathroomsTotalInteger ,ListingContractDate,ModificationTimestamp,StandardStatus,PropertySubType,Location,PublicRemarks&$filter=(BathroomsTotalInteger gt 2) and (BedroomsTotal le 5 and BedroomsTotal ge 2) and PropertySubType eq 'b__53696e676c652046616d696c79205265736964656e6365' Top ▴
not equal (ne) is used as to counter equal (eq)
https://sparkapi.com/Reso/OData/Property?$top=4&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks&$filter=BedroomsTotal ne 1 and PropertyType eq 'b__53696e676c652046616d696c79' 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=10&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,City,StreetName,StreetNumber 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=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 $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=(ListPrice gt 200000 and ListPrice lt 1150000) and (City eq 'Vancleave')&$top=25&$select=ListingId,ListPrice,StreetName,City,PropertySubType,ListingContractDate,ModificationTimestamp&$orderby=ListPrice desc 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 'Vancleave') and (PropertySubType eq 'b__53696e676c652046616d696c79205265736964656e6365') and PhotosCount gt 1&$top=10&$select=ListingId,ListingKey,ListPrice,StreetNumber,StreetName,PropertySubType,PhotosCount&$expand=Media 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=(City eq 'Vancleave') and (Levels has PropertyEnums.Levels'One' or Levels has PropertyEnums.Levels'Two')&$top=10&$select=ListingId,ListPrice,StreetNumber,StreetName,City,AssociationFeeIncludes 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,City,StreetName,StreetNumber,PropertyType 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=year(ListingContractDate) eq 2018 and month(ListingContractDate) eq 5 and (City eq 'Vancleave')&$top=10&$select=ListingId,ListingKey,ListPrice,StreetNumber,StreetName,BathroomsTotalInteger,BedroomsTotal,PropertyType,ListingContractDate Top ▴
Filtering on time can use of the hour, minute, second and fractional seconds functions.
https://sparkapi.com/Reso/OData/Property?$filter=year(ListingContractDate) lt 2018 and month(ListingContractDate) eq 5 and day(ListingContractDate) lt 31 and hour(ModificationTimestamp) gt 13 and minute(ModificationTimestamp) gt 3&$top=10&$select=ListingId,ListingKey,ListPrice,StreetNumber,StreetName,BathroomsTotalInteger,BedroomsTotal,PropertyType,ListingContractDate Top ▴
filtering on fractions of a second requires the use of the function fractionalseconds()
https://sparkapi.com/Reso/OData/Property?$top=12&$select=ListingId,ListingKey,ListPrice,StreetNumber,StreetName,BathroomsTotalInteger,BedroomsTotal,PropertyType,ListingContractDate,ModificationTimestamp&$filter=year(ModificationTimestamp) eq 2016 and month(ModificationTimestamp) eq 9 and day(ModificationTimestamp) eq 14 and hour(ModificationTimestamp) gt 6 and minute(ModificationTimestamp) gt 3 and fractionalseconds(ModificationTimestamp) gt 3 Top ▴
The function now() will return the now time in UTC
https://sparkapi.com/Reso/OData/Property?$top=9&$select=PropertyType,ListingId,ListingKey,ListPrice,StreetNumber,StreetName,BathroomsTotalInteger,BedroomsTotal,PropertyType,ListingContractDate,ModificationTimestamp&$filter=ModificationTimestamp le now() Top ▴
Filter on a string field value that contains a certain value. This is case sensitive
https://sparkapi.com/Reso/OData/Property?$filter=(City eq 'Vancleave') and contains(StreetName, 'Highway')&$top=10&$select=ListingId,ListingKey,ListPrice,StreetNumber,StreetName,BathroomsTotalInteger,BedroomsTotal,PropertyType Top ▴
Filter on a string field value that ends with a certain value. This is case sensitive
https://sparkapi.com/Reso/OData/Property?$filter=(City eq 'Vancleave') and endswith(StreetName, 'Marina')&$top=10&$select=ListingId,ListingKey,ListPrice,StreetNumber,StreetName,BathroomsTotalInteger,BedroomsTotal,PropertyType,ListingContractDate Top ▴
Filter on a string field value that starts with a certain value. This is case sensitive
https://sparkapi.com/Reso/OData/Property?$filter=(City eq 'Vancleave') and startswith(StreetName, 'Highway')&$top=10&$select=ListingId,ListingKey,ListPrice,StreetNumber,StreetName,BathroomsTotalInteger,BedroomsTotal,PropertyType Top ▴
Convert a string to upper case (toupper). Lower case would use the function tolower().
https://sparkapi.com/Reso/OData/Property?$top=11&$select=ListingKey,BedroomsTotal,BathroomsTotalInteger ,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,PublicRemarks&$filter=(BathroomsTotalInteger gt 2) and (BedroomsTotal le 5 and BedroomsTotal ge 2) and PropertyType eq 'b__53696e676c652046616d696c79' and contains(toupper(PublicRemarks), 'POTS') 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?$top=10&$filter=geo.distance(Location, geography'POINT(-88.690586 30.535)') lt 10&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,StreetNumber,StreetName 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?$top=10&$filter=ListPrice gt 25000 and geo.intersects(Location, geography'POLYGON((-88.690586 30.535,-88.683199 30.535374,88.682834 30.532269,-88.690586 30.535 28.896669))')&$select=ListingKey,BedroomsTotal,Directions,ListingContractDate,ModificationTimestamp,StandardStatus,PropertyType,Location,StreetNumber,StreetName Top ▴