Zillow API Network

CalculateTaxSavings API

The CalculateTaxSavings API calculates how much you would save in taxes over the life of a mortgage.

The CalculateTaxSavings API Web Service is located at: http://www.zillow.com/webservice/mortgage/CalculateTaxSavings.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
terminmonthsThe term of the loan in months. If omitted, a 360 month term is assumed.No
rateThe annual interest rate for the first loan.Yes
taxbracketThe income tax bracket of the borrower. Used to incorporate tax savings.Yes
scheduleThe type of amortization schedule to return in the result set. If omitted, no table will be returned. Options:
  • yearly
  • monthly
  • both
  • none
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.
taxsavingsThe total tax savings, in dollars, over the life of the loan.
resultA string explaining the result: "Based on your marginal tax rate of XX.X%, you would end up saving $XX,XXX on your taxes over the life of the loan."
Amortization Schedule

A table of integers that shows payment details for a traditional loan. The type of table returned is based on schedule input parameter. If ""none"" was passed or field was omitted, no schedule is returned.

List by month or year of the following fields:

  • period
  • beginningbalance
  • payment
  • interest
  • endingbalance
  • taxsavings

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 termMake sure the 'terminmonths' parameter is specified and is a valid integer.
502Invalid interest rateMake sure the 'rate' parameter is specified and is a valid float.
503Invalid tax bracketMake sure the 'taxbracket' parameter is specified and is a valid float.
504Invalid amortization schedule typeMake sure the 'schedule' parameter is specified and matches one of the expected values.

Sample API Calls

Below is an example call to the API returning XML data:
http://www.zillow.com/webservice/mortgage/CalculateTaxSavings.htm?zws-id=<ZWSID>&amount=1000000&rate=6.504&terminmonths=360&schedule=yearly&taxbracket=3.50&output=xml

Sample API Output (XML)

<?xml version="1.0" encoding="utf-8"?>
<TaxSavings:taxsavings xsi:schemaLocation="http://www.zillow.com/static/xsd/TaxSavings.xsd http://wfc-dev-cov-007.uni.zillow.local:8080/vstatic/301d3d6d429ae53192cff6e00c9b3723/static/xsd/TaxSavings.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:TaxSavings="http://www.zillow.com/static/xsd/TaxSavings.xsd">
<request>
    <amount>1000000</amount>
    <terminmonths>360</terminmonths>
    <rate>6.504</rate>
    <taxbracket>3.5</taxbracket>
    <schedule>yearly</schedule>
    <output>xml</output>
</request>
<message>
    <text>Request successfully processed</text>
    <code>0</code>
</message>
<response>
    <monthlyprincipalandinterest>6323</monthlyprincipalandinterest>
    <taxsavings>44674</taxsavings>
    <result>Based on your marginal tax rate of 3.50%, you would end up saving $44,674 on your taxes over the life of the loan.</result>
    <amortizationschedule frequency="annual">
        <payment>
            <period>1</period>
            <beginningbalance>1000000</beginningbalance>
            <payment>75880</payment>
            <interest>64711</interest>
            <endingbalance>988831</endingbalance>
            <taxsavings>2265</taxsavings>
        </payment>
        <payment>
            <period>2</period>
            <beginningbalance>988831</beginningbalance>
            <payment>75880</payment>
            <interest>63963</interest>
            <endingbalance>976914</endingbalance>
            <taxsavings>2239</taxsavings>
        </payment>
        <payment>
            <period>3</period>
            <beginningbalance>976914</beginningbalance>
            <payment>75880</payment>
            <interest>63164</interest>
            <endingbalance>964198</endingbalance>
            <taxsavings>2211</taxsavings>
        </payment>
        <payment>
            <period>4</period>
            <beginningbalance>964198</beginningbalance>
            <payment>75880</payment>
            <interest>62312</interest>
            <endingbalance>950630</endingbalance>
            <taxsavings>2181</taxsavings>
        </payment>
        <payment>
            <period>5</period>
            <beginningbalance>950630</beginningbalance>
            <payment>75880</payment>
            <interest>61403</interest>
            <endingbalance>936153</endingbalance>
            <taxsavings>2149</taxsavings>
        </payment>
        <payment>
            <period>6</period>
            <beginningbalance>936153</beginningbalance>
            <payment>75880</payment>
            <interest>60432</interest>
            <endingbalance>920705</endingbalance>
            <taxsavings>2115</taxsavings>
        </payment>
        <payment>
            <period>7</period>
            <beginningbalance>920705</beginningbalance>
            <payment>75880</payment>
            <interest>59397</interest>
            <endingbalance>904222</endingbalance>
            <taxsavings>2079</taxsavings>
        </payment>
        <payment>
            <period>8</period>
            <beginningbalance>904222</beginningbalance>
            <payment>75880</payment>
            <interest>58293</interest>
            <endingbalance>886635</endingbalance>
            <taxsavings>2040</taxsavings>
        </payment>
        <payment>
            <period>9</period>
            <beginningbalance>886635</beginningbalance>
            <payment>75880</payment>
            <interest>57114</interest>
            <endingbalance>867869</endingbalance>
            <taxsavings>1999</taxsavings>
        </payment>
        <payment>
            <period>10</period>
            <beginningbalance>867869</beginningbalance>
            <payment>75880</payment>
            <interest>55856</interest>
            <endingbalance>847845</endingbalance>
            <taxsavings>1955</taxsavings>
        </payment>
        <payment>
            <period>11</period>
            <beginningbalance>847845</beginningbalance>
            <payment>75880</payment>
            <interest>54515</interest>
            <endingbalance>826480</endingbalance>
            <taxsavings>1908</taxsavings>
        </payment>
        <payment>
            <period>12</period>
            <beginningbalance>826480</beginningbalance>
            <payment>75880</payment>
            <interest>53083</interest>
            <endingbalance>803683</endingbalance>
            <taxsavings>1858</taxsavings>
        </payment>
        <payment>
            <period>13</period>
            <beginningbalance>803683</beginningbalance>
            <payment>75880</payment>
            <interest>51555</interest>
            <endingbalance>779358</endingbalance>
            <taxsavings>1804</taxsavings>
        </payment>
        <payment>
            <period>14</period>
            <beginningbalance>779358</beginningbalance>
            <payment>75880</payment>
            <interest>49925</interest>
            <endingbalance>753403</endingbalance>
            <taxsavings>1747</taxsavings>
        </payment>
        <payment>
            <period>15</period>
            <beginningbalance>753403</beginningbalance>
            <payment>75880</payment>
            <interest>48185</interest>
            <endingbalance>725708</endingbalance>
            <taxsavings>1686</taxsavings>
        </payment>
        <payment>
            <period>16</period>
            <beginningbalance>725708</beginningbalance>
            <payment>75880</payment>
            <interest>46330</interest>
            <endingbalance>696158</endingbalance>
            <taxsavings>1622</taxsavings>
        </payment>
        <payment>
            <period>17</period>
            <beginningbalance>696158</beginningbalance>
            <payment>75880</payment>
            <interest>44349</interest>
            <endingbalance>664627</endingbalance>
            <taxsavings>1552</taxsavings>
        </payment>
        <payment>
            <period>18</period>
            <beginningbalance>664627</beginningbalance>
            <payment>75880</payment>
            <interest>42236</interest>
            <endingbalance>630983</endingbalance>
            <taxsavings>1478</taxsavings>
        </payment>
        <payment>
            <period>19</period>
            <beginningbalance>630983</beginningbalance>
            <payment>75880</payment>
            <interest>39982</interest>
            <endingbalance>595085</endingbalance>
            <taxsavings>1399</taxsavings>
        </payment>
        <payment>
            <period>20</period>
            <beginningbalance>595085</beginningbalance>
            <payment>75880</payment>
            <interest>37576</interest>
            <endingbalance>556781</endingbalance>
            <taxsavings>1315</taxsavings>
        </payment>
        <payment>
            <period>21</period>
            <beginningbalance>556781</beginningbalance>
            <payment>75880</payment>
            <interest>35009</interest>
            <endingbalance>515910</endingbalance>
            <taxsavings>1225</taxsavings>
        </payment>
        <payment>
            <period>22</period>
            <beginningbalance>515910</beginningbalance>
            <payment>75880</payment>
            <interest>32270</interest>
            <endingbalance>472300</endingbalance>
            <taxsavings>1129</taxsavings>
        </payment>
        <payment>
            <period>23</period>
            <beginningbalance>472300</beginningbalance>
            <payment>75880</payment>
            <interest>29348</interest>
            <endingbalance>425768</endingbalance>
            <taxsavings>1027</taxsavings>
        </payment>
        <payment>
            <period>24</period>
            <beginningbalance>425768</beginningbalance>
            <payment>75880</payment>
            <interest>26229</interest>
            <endingbalance>376117</endingbalance>
            <taxsavings>918</taxsavings>
        </payment>
        <payment>
            <period>25</period>
            <beginningbalance>376117</beginningbalance>
            <payment>75880</payment>
            <interest>22902</interest>
            <endingbalance>323139</endingbalance>
            <taxsavings>802</taxsavings>
        </payment>
        <payment>
            <period>26</period>
            <beginningbalance>323139</beginningbalance>
            <payment>75880</payment>
            <interest>19352</interest>
            <endingbalance>266611</endingbalance>
            <taxsavings>677</taxsavings>
        </payment>
        <payment>
            <period>27</period>
            <beginningbalance>266611</beginningbalance>
            <payment>75880</payment>
            <interest>15563</interest>
            <endingbalance>206294</endingbalance>
            <taxsavings>545</taxsavings>
        </payment>
        <payment>
            <period>28</period>
            <beginningbalance>206294</beginningbalance>
            <payment>75880</payment>
            <interest>11521</interest>
            <endingbalance>141935</endingbalance>
            <taxsavings>403</taxsavings>
        </payment>
        <payment>
            <period>29</period>
            <beginningbalance>141935</beginningbalance>
            <payment>75880</payment>
            <interest>7208</interest>
            <endingbalance>73263</endingbalance>
            <taxsavings>252</taxsavings>
        </payment>
        <payment>
            <period>30</period>
            <beginningbalance>73263</beginningbalance>
            <payment>75880</payment>
            <interest>2606</interest>
            <endingbalance>-11</endingbalance>
            <taxsavings>91</taxsavings>
        </payment>
    </amortizationschedule>
</response>
</TaxSavings:taxsavings>
                    

Below is an example call to the API returning JSON data:
http://www.zillow.com/webservice/mortgage/CalculateTaxSavings.htm?zws-id=<ZWSID>&amount=1000000&rate=6.504&terminmonths=360&schedule=yearly&taxbracket=3.50&output=json&callback=cb

Sample API Output (JSON)

cb({
"request": {
    "amount": "1000000",
    "callback": "cb",
    "output": "json",
    "terminmonths": "360",
    "taxbracket": "3.5",
    "schedule": "yearly",
    "rate": "6.504"
},
"message": {
    "text": "Request successfully processed",
    "code": "0"
},
"response": {
    "monthlyPrincipalAndInterest": "6323",
    "taxSavings": "44674",
    "result": "Based on your marginal tax rate of 3.50%, you would end up saving $44,674 on your taxes over the life of the loan.",
    "annualAmortizationSchedule": [{
        "period": "1",
        "beginningBalance": "1000000",
        "payment": "75880",
        "interest": "64711",
        "endingBalance": "988831",
        "taxSavings": "2265"
    }, {
        "period": "2",
        "beginningBalance": "988831",
        "payment": "75880",
        "interest": "63963",
        "endingBalance": "976914",
        "taxSavings": "2239"
    }, {
        "period": "3",
        "beginningBalance": "976914",
        "payment": "75880",
        "interest": "63164",
        "endingBalance": "964198",
        "taxSavings": "2211"
    }, {
        "period": "4",
        "beginningBalance": "964198",
        "payment": "75880",
        "interest": "62312",
        "endingBalance": "950630",
        "taxSavings": "2181"
    }, {
        "period": "5",
        "beginningBalance": "950630",
        "payment": "75880",
        "interest": "61403",
        "endingBalance": "936153",
        "taxSavings": "2149"
    }, {
        "period": "6",
        "beginningBalance": "936153",
        "payment": "75880",
        "interest": "60432",
        "endingBalance": "920705",
        "taxSavings": "2115"
    }, {
        "period": "7",
        "beginningBalance": "920705",
        "payment": "75880",
        "interest": "59397",
        "endingBalance": "904222",
        "taxSavings": "2079"
    }, {
        "period": "8",
        "beginningBalance": "904222",
        "payment": "75880",
        "interest": "58293",
        "endingBalance": "886635",
        "taxSavings": "2040"
    }, {
        "period": "9",
        "beginningBalance": "886635",
        "payment": "75880",
        "interest": "57114",
        "endingBalance": "867869",
        "taxSavings": "1999"
    }, {
        "period": "10",
        "beginningBalance": "867869",
        "payment": "75880",
        "interest": "55856",
        "endingBalance": "847845",
        "taxSavings": "1955"
    }, {
        "period": "11",
        "beginningBalance": "847845",
        "payment": "75880",
        "interest": "54515",
        "endingBalance": "826480",
        "taxSavings": "1908"
    }, {
        "period": "12",
        "beginningBalance": "826480",
        "payment": "75880",
        "interest": "53083",
        "endingBalance": "803683",
        "taxSavings": "1858"
    }, {
        "period": "13",
        "beginningBalance": "803683",
        "payment": "75880",
        "interest": "51555",
        "endingBalance": "779358",
        "taxSavings": "1804"
    }, {
        "period": "14",
        "beginningBalance": "779358",
        "payment": "75880",
        "interest": "49925",
        "endingBalance": "753403",
        "taxSavings": "1747"
    }, {
        "period": "15",
        "beginningBalance": "753403",
        "payment": "75880",
        "interest": "48185",
        "endingBalance": "725708",
        "taxSavings": "1686"
    }, {
        "period": "16",
        "beginningBalance": "725708",
        "payment": "75880",
        "interest": "46330",
        "endingBalance": "696158",
        "taxSavings": "1622"
    }, {
        "period": "17",
        "beginningBalance": "696158",
        "payment": "75880",
        "interest": "44349",
        "endingBalance": "664627",
        "taxSavings": "1552"
    }, {
        "period": "18",
        "beginningBalance": "664627",
        "payment": "75880",
        "interest": "42236",
        "endingBalance": "630983",
        "taxSavings": "1478"
    }, {
        "period": "19",
        "beginningBalance": "630983",
        "payment": "75880",
        "interest": "39982",
        "endingBalance": "595085",
        "taxSavings": "1399"
    }, {
        "period": "20",
        "beginningBalance": "595085",
        "payment": "75880",
        "interest": "37576",
        "endingBalance": "556781",
        "taxSavings": "1315"
    }, {
        "period": "21",
        "beginningBalance": "556781",
        "payment": "75880",
        "interest": "35009",
        "endingBalance": "515910",
        "taxSavings": "1225"
    }, {
        "period": "22",
        "beginningBalance": "515910",
        "payment": "75880",
        "interest": "32270",
        "endingBalance": "472300",
        "taxSavings": "1129"
    }, {
        "period": "23",
        "beginningBalance": "472300",
        "payment": "75880",
        "interest": "29348",
        "endingBalance": "425768",
        "taxSavings": "1027"
    }, {
        "period": "24",
        "beginningBalance": "425768",
        "payment": "75880",
        "interest": "26229",
        "endingBalance": "376117",
        "taxSavings": "918"
    }, {
        "period": "25",
        "beginningBalance": "376117",
        "payment": "75880",
        "interest": "22902",
        "endingBalance": "323139",
        "taxSavings": "802"
    }, {
        "period": "26",
        "beginningBalance": "323139",
        "payment": "75880",
        "interest": "19352",
        "endingBalance": "266611",
        "taxSavings": "677"
    }, {
        "period": "27",
        "beginningBalance": "266611",
        "payment": "75880",
        "interest": "15563",
        "endingBalance": "206294",
        "taxSavings": "545"
    }, {
        "period": "28",
        "beginningBalance": "206294",
        "payment": "75880",
        "interest": "11521",
        "endingBalance": "141935",
        "taxSavings": "403"
    }, {
        "period": "29",
        "beginningBalance": "141935",
        "payment": "75880",
        "interest": "7208",
        "endingBalance": "73263",
        "taxSavings": "252"
    }, {
        "period": "30",
        "beginningBalance": "73263",
        "payment": "75880",
        "interest": "2606",
        "endingBalance": "-11",
        "taxSavings": "91"
    }]
}
});
                    

Have a question? Find help from a Pro here.