
Zillow API Network
GetRateSummary API
The GetRateSummary API returns the current rates per loan type — as well as rates from a week ago — from Zillow Mortgage Marketplace. Current supported loan types are 30-year fixed, 15-year fixed, and 5/1 ARM. Rates are computed from real quotes borrowers receive from lenders just seconds before the rate data is returned. The GetRateSummary API returns rates for a specific state if the optional state parameter is used.
The GetRateSummary API Web Service is located at: http://www.zillow.com/webservice/GetRateSummary.htm
Also, check out Zillow's prebuilt mortgage rate widgets.
The parameters of the API are:
| Parameter | Description | Required |
|---|---|---|
| zws-id | The Zillow Web Service Identifier. Each subscriber to Zillow Web Services is uniquely identified by an ID sequence and every request to Web services requires this ID. Click here to get yours. | Yes |
| state | The state for which to return average mortgage rates. Two-letter state abbreviations should be used (AK, AL, AR, AZ, CA, CO, CT, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, DC, WI, WV, WY). If omitted, national average mortgage rates are returned. | No |
| output | The type of output desired. Specify 'xml' for XML output and 'json' for JSON output. If omitted, 'xml' is assumed. | No |
| callback | The name of the JavaScript callback function used to process the returned JSON data. If specified, the returned JSON will be wrapped in a function call with the specified function name. This parameter is intended for use with dynamic script tags. The callback function is only used for JSON output. | No |
The API result set:
| Parameter | Description |
|---|---|
| Today's Rates | A list of three rates for the following loan types as well as the number of quotes used to calculate the rates. The rates are determined by the last 24 hours of data.
|
| Last Week's Rates | A list of three rates (for the same loan types listed for "Today's Rates") as well as the number of quotes used to calculate the rates. The rates are determined by the last week of data. |
| Limit-warning | If this field is set to "true," it means you are approaching your call limit. It appears under the "message" element in the API result set: <message> This output field will not be returned if it is false. |
Messages and Codes
The following table summarizes possible return codes from the API:
| Error code | Description | Resolution |
|---|---|---|
| 0 | Request successfully processed | |
| 1 | Service error-there was a server-side error while processing the request | Check to see if your url is properly formed: delimiters, character cases, etc. |
| 2 | The specified ZWSID parameter was invalid or not specified in the request | Check if you have provided a ZWSID in your API call. If yes, check if the ZWSID is keyed in correctly. If it still doesn't work, contact Zillow to get help with fixing your ZWSID. |
| 3 | Web services are currently unavailable | The Zillow Web Service is currently not available. Please come back later and try again. |
| 4 | The API call is currently unavailable | The Zillow Web Service is currently not available. Please come back later and try again. |
| 500 | Rate data unavailable | Zillow Mortgage Marketplace rate data is currently unavailable. Please come back later and try again. |
| 501 | Invalid state abbreviation specified | The state abbreviation specified for the "state" parameter isn't valid. Please make sure the abbreviation is a valid two-letter state abbreviation (or omitted). |
Sample API Call
Below is a sample call to the API returning XML data:
http://www.zillow.com/webservice/GetRateSummary.htm?zws-id=<ZWSID>
Sample API Output (XML)
<?xml version="1.0" encoding="utf-8"?>
<RateSummary:rateSummary xsi:schemaLocation="http://www.zillow.com/static/xsd/RateSummary.xsd /vstatic/9a7665f1f221ad96757e028b5f570e08/static/xsd/RateSummary.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:RateSummary="http://www.zillow.com/static/xsd/RateSummary.xsd">
<request></request>
<message>
<text>Request successfully processed</text>
<code>0</code>
</message>
<response>
<today>
<rate loanType="thirtyYearFixed" count="1252">5.91</rate>
<rate loanType="fifteenYearFixed" count="839">5.68</rate>
<rate loanType="fiveOneARM" count="685">5.49</rate>
</today>
<lastWeek>
<rate loanType="thirtyYearFixed" count="8933">6.02</rate>
<rate loanType="fifteenYearFixed" count="5801">5.94</rate>
<rate loanType="fiveOneARM" count="3148">5.71</rate>
</lastWeek>
</response>
</RateSummary:rateSummary>
<!-- H:1 T:1076ms S:630 R:Thu Sep 11 13:54:50 PDT 2008 B:3.0-comp_rel_b-SNAPSHOT -->
Below is a sample call to the API returning JSON data:
http://www.zillow.com/webservice/GetRateSummary.htm?zws-id=<ZWSID>&output=json&callback=cb
Sample API Output (JSON)
cb( {
"request" : {
"output" : "json",
"callback" : "cb"
},
"message" : {
"text" : "Request successfully processed",
"code" : "0"
},
"response" : {
"today" : {
"thirtyYearFixed" : "5.91",
"thirtyYearFixedCount" : "1252",
"fifteenYearFixed" : "5.68",
"fifteenYearFixedCount" : "839",
"fiveOneARM" : "5.49"
"fiveOneARMCount" : "685"
},
"lastWeek" : {
"thirtyYearFixed" : "6.02",
"thirtyYearFixedCount" : "8933",
"fifteenYearFixed" : "5.94",
"fifteenYearFixedCount" : "5801",
"fiveOneARM" : "5.71"
"fiveOneARMCount" : "3148"
}
}
} );