Zillow API Network

CalculateNoCostVsTraditional API

The CalculateNoCostVsTraditional API calculates whether you will save money by taking the no cost or traditional mortgage over a given time period.

The CalculateNoCostVsTraditional API Web Service is located at: http://www.zillow.com/webservice/mortgage/CalculateNoCostVsTraditional.htm

The parameters of the API are:

ParameterDescriptionRequired
zws-idThe 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
amountThe requested loan amount.Yes
rateThe annual interest rate for the traditional loan. If no rate is passed, we use the current 30 year fixed rate from Zillow Mortgage Marketplace.No
nocostrateThe annual interest rate for the no cost loan.Yes
terminmonthsThe term of the loan in months. If omitted, a 360 month term is assumed.No
closingcosts"The total closing costs for the loan. We recommend you break it out for the user so they understand the different categories, and then sum up the pieces and pass it as one cost. Suggestions:
  • Discount points
  • Origination fee
  • Lender fees
  • Credit report
  • Appraisal
  • Title insurance
  • Reconveyance fee
  • Recording fee
  • Wire and courier fee
  • Endorsement fee
  • Title closing fee
  • Document prep fee
  • Other fees
Yes
rollfeesA Boolean stating whether or not the user wants the closing cost fees rolled into the loan amount. If no, it is assumed the closing cost fees will be paid at closing.Yes
costofmoneyThe opportunity cost of paying for the mortgage expressed as a percentage. If omitted, it will default to 0%.No
taxbracketThe income tax bracket of the borrower. Used to incorporate tax savings. If omitted, it will be defaulted to 0%.No
comparisonyearsThe number of years to use for the comparison. If omitted, it will use term of the longest loan.No
outputThe type of output desired. Specify 'xml' for XML output and 'json' for JSON output. If omitted, 'xml' is assumed. No
callbackThe 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:

ParameterDescription
monthlyprincipalandinterestThe monthly principal and interest payment in dollars for the traditional loan.
monthlyprincipalandinterestnocostThe initial monthly principal and interest payment for the no cost loan, in dollars.
discountedpaymentsThe total discounted payments of the traditional loan over the given time period.
nocostdiscountedpaymentsThe total discounted payments of the no cost loan over the given time period.
remainingprincipalThe remaining principal on the traditional loan at the end of the comparison period.
nocostremainingprincipalThe remaining principal on the no cost loan at the end of the comparison period.
taxsavingsThe tax savings from the traditional loan.
nocosttaxsavingsThe tax savings from the no cost loan.
paidatcloseThe sum of the closing costs paid in cash at close for the traditional loan. It will always be $0 if user selects to roll fees into loan; otherwise it is the closing cost amount. Note that the paid at close amount for the no cost loan will always be $0.
totalcostThe total cost of the traditional loan. This includes the discounted payments and remaining principal.
nocosttotalcostThe total cost of the no cost loan. This includes the discounted payments and remaining principal.
resultA string explaining the result: "The [fixed-rate/adjustable-rate] loan looks like it will save you $XX,XXX over the X year period."

Messages and Codes

The following table summarizes possible return codes from the API:

Error codeDescriptionResolution
0Request successfully processed
1Service error-there was a server-side error while processing the requestCheck to see if your url is properly formed: delimiters, character cases, etc.
2The specified ZWSID parameter was invalid or not specified in the requestCheck 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.
3Web services are currently unavailable The Zillow Web Service is currently not available. Please come back later and try again.
4The API call is currently unavailableThe Zillow Web Service is currently not available. Please come back later and try again.
500Invalid loan amountMake sure the 'amount' parameter is specified and is a valid integer.
501Invalid interest rateMake sure the 'rate' parameter is specified and is a valid float.
502Invalid no cost loan interest rateMake sure the 'nocostrate' parameter is specified and is a valid float.
503Invalid termMake sure the 'terminmonths' parameter is specified and is a valid integer.
504Invalid closing costs amountMake sure the 'closingcosts' parameter is specified and is a valid integer.
505Invalid roll fees into loan BooleanMake sure the 'rollfees' parameter is specified and is a valid Boolean.
506Invalid cost of moneyMake sure the 'costofmoney' parameter is specified and is a valid float.
507Invalid tax bracketMake sure the 'taxbracket' parameter is specified and is a valid float.
508Invalid comparison yearsMake sure the 'comparisonyears' parameter is specified and is a valid integer.

Sample API Calls

Below is an example call to the API returning XML data:
http://www.zillow.com/webservice/mortgage/CalculateNoCostVsTraditional.htm?zws-id=<ZWSID>&amount=10000000&rate=6.504&nocostrate=4.503&terminmonths=360&closingcosts=2000&rollfees=false&costofmoney=0&taxbracket=15&comparisonyears=50&output=xml

Sample API Output (XML)

<?xml version="1.0" encoding="utf-8"?>
<NoCostVsTraditional:nocostvstraditional xsi:schemaLocation="http://www.zillow.com/static/xsd/NoCostVsTraditional.xsd http://www.zillow.com/vstatic/b6056a4bb80057099e3a3d751accac26/static/xsd/NoCostVsTraditional.xsd" xmlns:NoCostVsTraditional="http://www.zillow.com/static/xsd/NoCostVsTraditional.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<request>
    <amount>10000000</amount>
    <rate>6.504</rate>
    <nocostrate>4.503</nocostrate>
    <terminmonths>360</terminmonths>
    <closingcosts>2000</closingcosts>
    <rollfees>false</rollfees>
    <costofmoney>0.0</costofmoney>
    <taxbracket>15.0</taxbracket>
    <comparisonyears>50</comparisonyears>
    <output>xml</output>
</request>
<message>
    <text>Request successfully processed</text>
    <code>0</code>
</message>
<response>
    <monthlyprincipalandinterest>63233</monthlyprincipalandinterest>
    <monthlyprincipalandinterestnocost>50686</monthlyprincipalandinterestnocost>
    <discountedpayments>37939866</discountedpayments>
    <nocostdiscountedpayments>30411815</nocostdiscountedpayments>
    <remainingprincipal>0</remainingprincipal>
    <nocostremainingprincipal>0</nocostremainingprincipal>
    <taxsavings>1914588</taxsavings>
    <nocosttaxsavings>1237063</nocosttaxsavings>
    <paidatclose>2000</paidatclose>
    <totalcost>36027278</totalcost>
    <nocosttotalcost>29174752</nocosttotalcost>
    <result>The no cost loan looks like it will save you $6,852,526 over the 50.00 year period.</result>
</response>
</NoCostVsTraditional:nocostvstraditional>
                    

Below is an example call to the API returning JSON data:
http://www.zillow.com/webservice/mortgage/CalculateNoCostVsTraditional.htm?zws-id=<ZWSID>&amount=10000000&rate=6.504&nocostrate=4.503&terminmonths=360&closingcosts=2000&rollfees=false&costofmoney=0&taxbracket=15&comparisonyears=50&output=json&callback=cb

Sample API Output (JSON)

cb({
"request": {
    "closingcosts": "2000",
    "amount": "10000000",
    "callback": "cb",
    "comparisonyears": "50",
    "output": "json",
    "terminmonths": "360",
    "taxbracket": "15.0",
    "rollfees": "false",
    "nocostrate": "4.503",
    "costofmoney": "0.0",
    "rate": "6.504"
},
"message": {
    "text": "Request successfully processed",
    "code": "0"
},
"response": {
    "monthlyPrincipalAndInterest": "63233",
    "monthlyPrincipalAndInterestNoCost": "50686",
    "discountedPayments": "37939866",
    "noCostDiscountedPayments": "30411815",
    "remainingPrincipal": "0",
    "noCostRemainingPrincipal": "0",
    "taxSavings": "1914588",
    "noCostTaxSavings": "1237063",
    "paidAtClose": "2000",
    "totalCost": "36027278",
    "noCostTotalCost": "29174752",
    "result": "The no cost loan looks like it will save you $6,852,526 over the 50.00 year period."
}
});
                    

Have a question? Find help from a Pro here.