Rentometer Logo
US flag CA flag GB flag
USA Canada London
Rentometer Logo

Rentometer API 2.0


Outbound API Web Service


The Outbound API web service is limited to performing Rental Data Search through a single HTPP resource and a simple query. For example, the following will retrieve Rental Statistics (in XML format) for 2 bedroom apartments in the US 02115 ZIP code:


  
  http://out.rentometer.com/ws/query?token=[API Key]&citystatezip=02115&rent=2800&beds=2
  

Note: [API Key] should be replaced with a valid Outbound API Key. 


The search function handles a range of query parameters, many of which are optional, as described below.


Query Parameter(s)

Required

Description

token

Required

Outbound API token

citystatezip

Required

Location of the search; city with state, and or postal code

address

Optional

Street Address

city

Optional

City

country

Optional

Country. Use two letter country code like "US", "CA" or "GB". Defaults to "US" if not specified.

rent, rent_amount

Optional

Monthly or Weekly Rent, as appropriate for the location, in local currency or a "symbol". Do not include currency units, etc.

If not specified, rental statistics (such as high, low and median) will not be returned, nor will the "compare link".  Symbols include "med" (for median), "high", "low". If a symbol is used, the value of the appropriate rental statistic (from the search) will be used in place of the symbol.

beds

Required

Number of bedrooms: 0 (studio) to 8

bt, building_type

Optional

Specifies number of apartments in the building. Currently does not affect search results.

content

Optional

Specifies the algorithm used for search. Defaults to "medzip" if not specified. 

"medzip" = "by_zip": search algorithm requires that all candidate listings are within the specified postal code. Closest (by distance) comparable listings within the postal code are returned.

"medarea" = "by_proximity":  search is performed by distance from the specified location

"by_neighborhood": search algorithm requires all candidate listings are within a neighborhood (or "census tract" in the US). Closest (by distance) comparable listings within the neighborhood are returned.

"by_zip_area" : algorithm considers listings within an expanded area based on the postal code. In the US, search uses the first 3 digits of the postal code.

"auto": iterates through a series of algorithms to return the results for the smallest geographical area possible. This algorithm is very similar to the one used by the Rentometer Web Application.

compare, include_comps

Optional

Specifies the number of "comparable" rental listings to return. If not specified, no rental listings will be returned. Data is not returned for PNG requests. Use an integer ( ‚â§ 25) or "yes" or "true" (for up to 25 "comps")

format

Optional

Specified output format. May be given as format parameter or as file type (as in "query.xml"). Valid formats are "XML", "JSON" or "PNG". Defaults to "xml" if not specified

verbose

Optional

Provides debugging information, including query parameters and error messages


Search Results


Outbound API Search Results are returned in 3 formats; XML, JSON, and PNG.  Successful XML and JSON request results may contain Query information, Rental Statistics and optionally comparable Rental Listings and a "link" to a similar Rentometer Web Application search. PNG formatted results contain an image.  Bad Requests and Unauthorized access will result in error responses.


XML Requests


Valid XML requests return a "200" status code and XML in the following format, for the above sample request (whitespace added for clarity). When there is insufficient data available to compute statistics (and the request is otherwise valid) values for the rental statistics will be omitted and comps will not be returned. The returned address tag contains the full address and additional information from geocoding is included when available.


  
  <!-- Rentometer Outbound API ver 2.0 -->
  <rentometer>
  <address>Boston, MA 02115</address>
    <rent>$2,800</rent>
    <beds>2</beds>
    <bt/>
    <city>Boston</city>
    <state>MA</state>
    <zip>02115</zip>
    <country>US</country>
    <longitude>-71.09286</longitude>
    <latitude>42.340411</latitude>
    <low_rent>$550</low_rent>
    <median_rent>$2,400</median_rent>
    <high_rent>$5,200</high_rent>
    <entered>2008-08-31T16:06:57Z</entered>
    <generator>http://www.rentometer.com</generator>
    <link>http://www.rentometer.com/?show=results&beds=2&citystatezip=02...</link>
    <comps>
        <comp>
            <rent>$2,000</rent_amount>
            <latitude>42.33918</latitude>
            <longitude>-71.09223</longitude>
            <distance>0.09 (miles)</distance>
        </comp>
        <comp>
            <rent>$1,895</rent_amount>
            <latitude>42.33884</latitude>
            <longitude>-71.09248</longitude>
            <distance>0.11 (miles)</distance>
        </comp>
        ...
        ...
    </comps>
  </rentometer>
  


Invalid Requests Examples (assuming verbose query parameter is used; HTTP status codes are set appropriately). Note that returned address here is from the request.


  
  <response success="false">
    <error code="401" kind="401 Unauthorized">
  ApiUser with token=Invalid_Token could not be found
    </error>
  </response>
  

  
  <!-- Rentometer Outbound API ver 2.0 -->
  <rentometer>
    <address/>
    <rent>$-1,000</rent>
    <beds>44</beds>
    <bt/>
    <citystatezip>00000</citystatezip>
    <city/>
    <country>US</country>
    <error id="0">Please check the zipcode.</error>
    <error id="1"> Please specify a valid positive number as your monthly rent. </error>
    <error id="2">Please specify between 0 and 8 bedrooms.</error>
  </rentometer>
  


If the Outbound API is unable to geocode (find) your location, it will return an error like:


  
  <!-- Rentometer Outbound API ver 2.0 -->
  <rentometer>
    ...
    <error id="0">Can't find that place... Please try again.</error>
  </rentometer>



JSON Formatted Requests


Valid JSON requests return a "200" status code and JSON (Javascript Object Notation) in the following format, for the above sample request (whitespace added for clarity). When there is insufficient data available to compute statistics (and the request is otherwise valid) values for the rental statistics will be returned as null and comps will not be returned.


  
  {
    generator: "http://www.rentometer.com",    
    beds: 2,
    rent: "$2,800",
    low_rent: "$550",
    entered: "2008-08-31T16:41:19Z",
    city:"Boston",
    state: "MA"
    zip: "02115",
    country: "US",
    latitude: 42.340411,
    longitude: -71.09286,
    bt: null,
    comps: [
        {
         latitude: 42.33918,    
         distance: "0.09 (miles)",
         longitude: -71.09223,
         rent: "$2,000"
        },
        {
         latitude: 42.33884,
         distance: "0.11 (miles)",
         longitude: -71.09248,
         rent: "$1,895"
        },
        ],
    median_rent: "$2,400",
    link: "http://www.rentometer.com/?show=results&beds=2&citystatezip=02... ,
    address: "Boston MA 02115",
    high_rent: "$5,200"
  }
  


Invalid Requests Examples (assuming verbose query parameter is used; HTTP status codes are set appropriately). Note that returned address here is from the request


  
 {error: {message: "ApiUser with token=.... could not be found", code: 401}}
 


  
 {errors: [
   "Please specify a valid positive number as your monthly rent.", 
   "Please specify between 0 and 8 bedrooms."
   ]
  }
  


If the Outbound API is unable to geocode (find) your location, it will return an error like:


  
  {errors: ["Can't find that place...  Please try again."]}
  


PNG Formatted Requests


Valid PNG requests return a "200" status code and an image in PNG format  for the above sample request (whitespace added for clarity). When there is insufficient data available to compute statistics (and the request is otherwise valid) values for the rental statistics will be omitted from the image.


Png_example


Invalid Requests Examples (assuming verbose query parameter is used; HTTP status codes are set appropriately). Responses are returned as images.


Png_invalid


Png_invalid_2


Png_cant_find

AK | AL | AZ | AR | CA | CO | CT | DE | DC | FL | GA | HI | ID | IL | IN | IA | KS | KY | LA | ME | MD | MA | MI | MN | MS | MO | MT | NE | NV | NH | NJ | NM | NY | NC | ND | OH | OK | OR | PA | RI | SC | SD | TN | TX | UT | VT | VA | WA | WV | WI | WY
AK | AL | AZ | AR | CA | CO | CT | DE | DC | FL | GA | HI | ID | IL | IN | IA | KS | KY | LA | ME | MD | MA | MI | MN | MS | MO | MT | NE | NV | NH | NJ | NM | NY | NC | ND | OH | OK | OR | PA | RI | SC | SD | TN | TX | UT | VT | VA | WA | WV | WI | WY