Search queries for custom forms and saved links
PreviewThis article explains how to properly use search queries in order to build custom forms and custom saved links of your dreams. This article will be also useful for anyone who is not able to display certain properties with the saved links.
Please note, IDX Broker support can not provide support for custom built forms and information here can be out of date and subject to change. Use at your own risk.
How Can I build a custom search form?
Since IDX Broker results pages are using the standard GET method, you can create a search form from the ground up, as long as you follow the syntax rules explained here.
The standard query string is being used as well – http://en.wikipedia.org/wiki/Query_string. The field-value pair is separated by a question mark (?), subsequent ones by ampersands (&). In some cases, field-value pair does not have a value.
Custom built forms examples: |
---|
How do I find the field name?
Here are several ways to find out the field name:
- Inspect the form element with Firebug or any built-in browser developer tool.
- Check out the results page URL
- Locate the field in the IDX Control panel Preferences -> MLS Settings -> Core Fields / MLS Advanced Fields
- Use the API to get all MLS fields names as well as the values in those fields http://middleware.idxbroker.com/docs/api/methods/index.html#api-MLS-getSearchfields
Why don’t you list here all available fields?
Every multiple listing service (MLS) is unique and has very specific names for the fields. For example, Regional Multiple Listing Service uses "subdivision" while Mid Florida Regional MLS "legalSubdivisionName" to list available subdivisions
Since each MLS usually has somewhere between 500 and 1500 available fields that are updated every once in a while, it would be impossible to manually keep track of all fields for 600+ MLSs.
What are the core fields?
Core fields are unique and the same for every MLS, because we manually "map" or associate MLS fields to the predefined fields in IDX Broker system.
That is why only core fields can be used to search through multiple property types or multiple MLSs at the same time.
Most core fields can be found in the following location IDX Control panel Preferences -> MLS Settings -> Core Fields
What are the types of the search form fields?
Are there any additional fields?
Here you can find unique or undocumented fields:
Field | Description | Examples |
---|---|---|
pt | Property type |
&pt=1 - search the MLS property type &pt=sfr - selects the IDX Broker system property type &pt=all - search through all IDX Broker property types in the account |
idxID |
Internal number of the MLS. |
&idxID=001 - search for RMLS listings, as long as account has access to RMLS |
tb | Shortcode – Minimum total bathrooms |
&tb=3 |
bd | Shortcode – Minimum total bedrooms |
&bd=5 |
bathrooms | Bathrooms |
&amin_bathrooms=1&amax_bathrooms=1 |
hp | Shortcode – Maximum (high) price |
&hp=1000000 |
lp | Shortcode – Minimum (low) price |
&lp=100%2C00 |
dateAdded | Date added to IDX Broker system |
&amin_dateAdded=2013-07-15+12:00:00&amax_dateAdded=2013-07-16+12:00:00 |
add | How many days since added to IDX Broker system (does not work with prefixes) |
&add=5 |
ublat | Shortcode – Maximum (up) latitude |
&ublat=41.814996410836756 |
lblat | Shortcode – Minimum (low) latitude |
&lblat=-77.3876953125 |
ublong | Shortcode – Maximum (up) longitude |
&ublong=41.814 |
lblong | Shortcode – Minimum (low) longitude |
&lblong=-77.387 |
srt | Sort Order |
&srt=newest - Newest Listings |
srtd | *Order of the Legacy sorting |
&srtd=desc &srtd=asc |
srtf | *Legacy field used in sorting |
&srtf=mlsPtID &srtf=acres (does not work anymore with this and other core/advanced fields) |
city | City name. Can be used without prefix. City IDs are system wide. |
&city[]=15047&city[]=44264 - search for listings in the best Oregon cities, such as Eugene and Springfield |
county | County name. Can be used without prefix. County IDs are system wide. |
&county[]=853 |
zipcode | Zip/postal code. Can be used without prefix. |
&zipcode[]=97402 |
pgon | Polygon Search – Coordinates. It may increase loading time. Works in both Lt and Pt, but polygon will be displayed only in Pt |
?pgon=56+-137,56+-57,18+-54.58,18+-136.40625,56+-137 |
clat | Polygon Search – Map Central latitude (does not affect Results pages) |
&clat=44.037627274834186 |
clng | Polygon Search – Map Central longitude (does not affect Results pages) |
&clng=-123.08240890502928 |
zoom | Polygon Search – Zoom level (does not affect Results pages) |
&zoom=12 |
layerType | Type of the polygon. |
&layerType=polygon &layerType=circle |
radius | Radius of the polygon circle in miles |
&radius=2.5 |
mapCenterLat | Map polygon center latitude location |
&mapCenterLat=45.74252430985657 |
mapCenterLong | Map polygon center longitude location |
&mapCenterLong=-123.19713349999999 |
ciID | Custom city list ID |
&ciID=893 |
coID | Custom county list |
&coID=894 |
pcID | Custom zip code list |
&pcID=895 |
idxsrp |
Indicates what page was used to create that results page. |
&idxsrp=45698 |
nowrapper | Load page without wrapper. |
?nowrapper |
nosubheader | Load page without any IDX subheaders |
?nosubheader |
nocss | Load page without any CSS that is set in the IDX control panel |
?nocss |
mobile | Load page with the mobile wrapper applied. Use this or change User-agent string to modify mobile wrapper design. |
?mobile |
fullsite | Force desktop view while using mobile wrapper. NOTE that the value is saved in cookies |
?fullsite |
latest | Apply latest template version |
?latest |
woh | Listings with Open Houses |
&woh=y |
wvt | Listings with Virtual Tours |
&wvt=y |
stp |
*Search type of listings |
&stp=supplemental - search only supplemental listings. |
virtualTours | *Number of Virtual tours |
&a_virtualTours=2 |
openHouses | *Number of Open Houses |
&amin_openHouses=3 |
savedName | Applies the search query from the saved link. Can be combined with additional fields. |
?savedName=Eugene-Properties&a_status[]=Active |
slID |
Applies the search query from the saved link ID. |
?slID=11379&lp=2000000 |
archiveStatus | Search supplemental (not archived) listings |
?aw_archiveStatus=active |
idxStatus | IDX Broker status field, that behaves like a core field (it is technically a pseudo-core field) |
?idxStatus[]=active&idxStatus[]=sold |
displayAddress | Listings with/without address that can be displayed on the internet, which is set by agents/offices/MLS in the data feed. |
?a_displayAddress=y |
*Experimental features
How to search through multiple property types or MLS’s?
What property types are available?
What are the limitations of the search queries?
Query Length
Microsoft products have the maximum length of any given URL set to 2083 characters. It means that some links will not be working properly in MS Outlook and Internet Explorer browsers. It is possible that we will be making some changes to the URL queries to make them shorter and more efficient.
Query logic
All field-value pairs for separate fields work as AND logic operator, meaning that all criteria in the query will be used at the same time.
Searches with the multiple values of a field are performed as OR logical conjunction.
It is not possible to exclude certain values or fields from the queries. You would need to go the other way around and select the allowed values or fields.
Property Types
Advanced fields can not be used to search through multiple property types (except for the mentioned "experimental" case).
No-commingling results
Some MLSs do not allow commingling. It means that results pages with no-commingle MLSs results will not display properties from other MLSs:
- Multi-mls results pages will have a separate tab available just for the no-commingle results
- Map Search does not allow to search through All MLSs
- First tab will always include results for MLSs that allow commingling, even if there are 0 results.