Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zillow API General Search

Tags:

xml

api

zillow

I have a few issues using the Zillow API:

  • Querying the API
  • Fetching Specific Data

Querying Issues

The issue is that I can't seem to find a way to use the Zillow API for general searches such as searching by only by zip code. Here is a sample query from the deep search:

<SearchResults:searchresults xsi:schemaLocation="http://www.zillow.com/static/xsd/SearchResults.xsd http://www.zillowstatic.com/vstatic/419b583f682a74b83f007039dd9c49f8/static/xsd/SearchResults.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SearchResults="http://www.zillow.com/static/xsd/SearchResults.xsd">
    <request>
        <address>15096 Oak Creek Rd</address>
        <citystatezip>El Cajon, CA</citystatezip>
    </request>
    <message>
        <text>Request successfully processed</text>
        <code>0</code>
    </message>
    <response>
        <results>
            <result>
                <zpid>16893601</zpid>
                <links>
                    <homedetails>http://www.zillow.com/homedetails/15096-Oak-Creek-Rd-El-Cajon-CA-92021/16893601_zpid/</homedetails>
                    <graphsanddata>http://www.zillow.com/homedetails/15096-Oak-Creek-Rd-El-Cajon-CA-92021/16893601_zpid/#charts-and-data</graphsanddata>
                    <mapthishome>http://www.zillow.com/homes/16893601_zpid/</mapthishome>
                    <comparables>http://www.zillow.com/homes/comps/16893601_zpid/</comparables>
                </links>
                <address>
                    <street>15096 Oak Creek Rd</street>
                    <zipcode>92021</zipcode>
                    <city>El Cajon</city>
                    <state>CA</state>
                    <latitude>32.86576</latitude>
                    <longitude>-116.847964</longitude>
                </address>
                <FIPScounty>6073</FIPScounty>
                <useCode>SingleFamily</useCode>
                <taxAssessmentYear>2012</taxAssessmentYear>
                <taxAssessment>496002.0</taxAssessment>
                <yearBuilt>2006</yearBuilt>
                <lotSizeSqFt>108900</lotSizeSqFt>
                <finishedSqFt>2700</finishedSqFt>
                <bathrooms>3.0</bathrooms>
                <bedrooms>3</bedrooms>
                <totalRooms>7</totalRooms>
                <lastSoldDate>03/22/1999</lastSoldDate>
                <lastSoldPrice currency="USD">268000</lastSoldPrice>
                <zestimate>
                    <amount currency="USD">581783</amount>
                    <last-updated>05/12/2013</last-updated>
                    <oneWeekChange deprecated="true"/>
                    <valueChange duration="30" currency="USD">12050</valueChange>
                    <valuationRange>
                        <low currency="USD">523605</low>
                        <high currency="USD">692322</high>
                    </valuationRange>
                    <percentile>0</percentile>
                </zestimate>
                <localRealEstate>
                    <region id="38333" type="city" name="El Cajon">
                        <links>
                            <overview>http://www.zillow.com/local-info/CA-El-Cajon/r_38333/</overview>
                            <forSaleByOwner>http://www.zillow.com/el-cajon-ca/fsbo/</forSaleByOwner>
                            <forSale>http://www.zillow.com/el-cajon-ca/</forSale>
                        </links>
                    </region>
                </localRealEstate>
            </result>
        </results>
    </response>
</SearchResults:searchresults>

That gives us a fair amount of data but it's too specific. I have tried to simply omit the address portion of the search and it returns an error. Is there a way to get a more general search using the Zillow or some other real estate API?

Data Issue

The above response from my query is of a house that is currently for sale. No where does it actually state the list price for the house. Is there something that I am missing in my request or does the API simply not offer that?

What I've Tried

  • Looking at the other Zillow APIs
  • Manipulating the query string

Any help is appreciated! Also, if there is some API that I can use that has the functionality needed, let me know!

like image 837
djthoms Avatar asked May 14 '13 02:05

djthoms


1 Answers

After you convert the XML to JSON and console it, you should have an object returned to you. If you click the arrows next to the object they open and reveal all the key value pairs and how they are indexed. As you keep opening the arrows you will see a number of keys and one of them must provide the value for the house. In this example, I use the "GetSearchResults" API and I believe I found it under 'zestimates' labeled as "amount' See image below: enter image description here

Also just a as a tip. A great way to read an object is to use console.table() rather than console.log() this will be the result: enter image description here

like image 54
VickenCode Avatar answered Nov 06 '22 06:11

VickenCode