MLS

Client level API for accessing MLS information.

endpoint: https://api.idxbroker.com/mls/[...]

This is a simple, access anywhere, method for getting a list of all API components available.

  • GET

    • primary request ID: none
    • secondary request ID: none
    • additional input: none
    • output: all available APIs/Components
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/listcomponents';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$components = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

A simple method for listing all available methods in the current API component. This method will also list which request methods (GET, PUT, POST, or DELETE) are supported by each method.

  • GET

    • primary request ID: none
    • secondary request ID: none
    • additional input: none
    • output: basic information about all available methods in this API. Data included includes:
      • Method Name
      • The list of actions (GET, POST, etc) and a boolean denoting whether or not the action is available in the method.
      • The method's status.
        • indev: This method is in development. Input or output may change without notice.
        • active: This method is operating normally.
        • deprecated: The functionality of this method is being superseded by another as described in the method description.
        • sunset: This method is no longer available.
      • A One to Two sentence description of the method.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/listmethods';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$response = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

This method provides all of the IDX IDs and names for all of the paperwork approved MLSs on the client's account.

Note: This method was previously camelcased as "approvedMLS" but was made lower case to fit the API naming convention. Calls to "approvedMLS" will be forwarded to "approvedmls" and "approvedMLS" is listed as deprecated in the method list.

  • GET

    • primary request ID: none
    • secondary request ID: none
    • additional input:
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: available cities along with applicable city ID, property type, and state as well as a count of the number of occurrences for each value.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/approvedmls';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$cities = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

All cities represented in the current set of MLS data are available from this method. The output can be filtered using additional GET parameters.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • filterField optional the field to use when filtering output. Available values:
        • cityID - the IDX assigned cityID value
        • cityName - the name of a city
        • stateAbrv - the 2 letter state abbreviation
        • mlsPtID - the IDX assigned ID of the MLS property type (see the propertytypes method)
      • filterValue conditional on use of filterField - the value by which to filter
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: available cities along with applicable city ID, property type, and state as well as a count of the number of occurrences for each value.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/cities/a001?filterField=stateAbrv&filterValue=Or';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$cities = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

All counties represented in the current set of MLS data are available from this method. The output can be filtered using additional GET parameters.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • filterField optional the field to use when filtering output. Available values:
        • countyID - the IDX assigned countyID value
        • countyName - the name of a county
        • stateAbrv - the 2 letter state abbreviation
        • mlsPtID - the IDX assigned ID of the MLS property type (see the propertytypes method)
      • filterValue conditional on use of filterField - the value by which to filter
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: available counties along with applicable county ID, property type, and state as well as a count of the number of occurrences of each value.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/counties/a001?filterField=stateAbrv&filterValue=Wa';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$counties = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

All zip codes represented in the current set of MLS data are available from this method. The output can be filtered using additional GET parameters.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • filterField optional the field to use when filtering output. Available values:
        • zipcode - a 5 digit zip code (can be used to see if a certain zip code is in the current day's MLS data)
        • stateAbrv - the 2 letter state abbreviation
        • mlsPtID - the IDX assigned ID of the MLS property type (see the propertytypes method)
      • filterValue conditional on use of filterField - the value by which to filter
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: available zipcodes along with applicable property type and state as well as a count of the number of occurrences of each value.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/zipcodes/a001?filterField=stateAbrv&filterValue=Wa';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$zipcodes = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

The sum total of properties listed in a given MLS as well as sums for each property type in the MLS.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: a multidimensional array with the total sum and the sum for each property type.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/prices/a001';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$prices = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

Gives the property type information for all types that are available on a given MLS.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • filterField optional the field to use when filtering output. Available values:
        • mlsPtID - the IDX assigned numeric ID of the MLS property type as seen in a typical results page URL
        • mlsPropertyType - the name of the property type as given by the MLS.
      • filterValue conditional on use of filterField - the value by which to filter
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: an array of property type information including MLS property type ID, MLS property type name, parent property type, and subtypes.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/propertytypes/a001?filterField=mlsPtID&filterValue=1';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$count = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

Gives a total number of listings available for a given city, county, or zipcode.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • countType required specify if you are looking for the count of a city, county, or zipcode. Available values:
        • city
        • county
        • zipcode
      • countSpecifier required The numeric city ID, county ID, or zipcode for which you want to get a property count.
    • output: an integer count of the number of properties
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/propertycount/a001?countType=city&countSpecifier=37536';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$count = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

Gives the date and time a particular MLS was last downloaded, processed and the last time images gathering was completed.

Note: dates/times given are UTC.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: an array of timestamps for last downloaded, last processes and last images gathered
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/age/a001';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$age = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

All the fields in a given MLS that are currently allowed to be searched according to MLS guidelines.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • filterField optional the field to use when filtering output. Available values:
        • mlsPtID - the IDX assigned ID of the MLS property type(s). See the propertytypes method in this API/Component for a lookup of property type IDs.
        • parentPtID - the IDX assigned parent property type ID; use any time multiple MLSs are being searched at once.
          • note: This method will return fields ("advanced" fields) that are only searchable when only 1 MLS and/or property type are involved. For this reason use of the parentPtID is not recommended.
      • filterValue conditional on use of filterField - the value by which to filter
      • rf optional array of fields to return in the output
        • List of available return fields can be obtained via the listmethods method.
        • rf[]=* or rf=* returns all the available fields in the output
        • Specified fields that are not in the available return fields list will be ignored
    • output: an array containing all MLS fields that are searchable according to MLS rules and IDX guidelines. Array contains the field's name (which is the field to be used as a key when performing a search), the display name (as should be displayed in a search form), and both the mlsPtID and parentPtID to which the field belongs.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/searchfields/a001?filterField=mlsPtID&filterValue=1';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$fields = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None

Field values in a given MLS that are currently allowed to be searched according to MLS guidelines.

  • GET

    • primary request ID: idxID required (format: x000)
    • secondary request ID: none
    • additional input:
      • mlsPtID required mlsPtID - the IDX assigned ID of the MLS property type(s). See the propertytypes method in this API/Component for a lookup of property type IDs.
      • name required mls field name - the IDX assigned name of the MLS field name. See the searchfields for the list of searchable fields.
    • output: an array containing all the values for the given mls field.
    // access URL and request method
    $url = 'https://api.idxbroker.com/mls/searchfieldvalues/a001?mlsPtID=1&name=subdivision';
    $method = 'GET';
    
    // headers (required and optional)
    $headers = array(
    	'Content-Type: application/x-www-form-urlencoded', // required
    	'accesskey: abcdefghijklmnopqrstuvwx', // required - replace with your own
    	'ancillarykey: ABCDEFGHIJKLYMNOPRSTUVWX', // optional and for partners only - replace with your own
    	'outputtype: json' // optional - overrides the preferences in our API control page
    );
    
    // set up cURL
    $handle = curl_init();
    curl_setopt($handle, CURLOPT_URL, $url);
    curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
    
    // exec the cURL request and returned information. Store the returned HTTP code in $code for later reference
    $response = curl_exec($handle);
    $code = curl_getinfo($handle, CURLINFO_HTTP_CODE);
    
    if ($code >= 200 || $code < 300)
    	$fields = json_decode($response,true);
    else
    	$error = $code;
    											
  • POST None

  • PUT None

  • DELETE None