Zillow API Network
GetComps API
The GetComps API returns a list of comparable recent sales for a specified property. The result set returned contains the address, Zillow property identifier, and Zestimate for the comparable properties and the principal property for which the comparables are being retrieved.
The GetComps API Web Service is located at: http://www.zillow.com/webservice/GetComps.htm
The parameters to 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 | Yes |
| zpid | The Zillow Property ID for the property for which to obtain information; the parameter type is an integer | Yes |
| count | The number of comparable recent sales to obtain (integer between 1 and 25) | Yes |
The result set of the API:
The following result set is obtained for each comparable and also the target property that was provided as input to the API call.
| Parameter | Description |
|---|---|
| zpid | Zillow property id for the property |
| Full address |
The complete address for the property:
|
| Zestimate data |
Zestimate related data:
|
| Links |
URLs to specific Zillow pages for this property:
|
| Compscore | This data is provided for comparable homes. It is a number between 0 to 1 that indicates how close the comparable is to the target property. API implementations can use this data to sort the comparables by relevance, with 1 being the most relevant. |
| 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> <text>Request successfully processed</text> <code>0</code> <limit-warning>true</limit-warning> </message> This output field will not be returned if it is false. |
Messages and Codes
The following table summarizes the 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 on 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 | The specified zpid parameter was not specified or was invalid | The zpid parameter you have provided is not valid. Please check if your zpid is correct and try again. |
| 501 | The specified count parameter was not specified or invalid | The count parameter which tells the API the number of comparable homes to return is mandatory. Please check if you have specified a valid integer greater than or equal to 1 and less than or equal to 25 |
| 502 | There is no record in our database that corresponds to the specified zpid parameter | The zpid you provided didn't match to any of the property zpids in our database. Either the property is not available in our database or there might be a typo in the zpid. |
| 503 | The property identified by the specified zpid does not have a Zestimate | We found the property, but we do not have a Zestimate for this property. See our Zestimate coverage table. |
| 504 | No results | There were no comparables for the property you specified. |
Sample Calls
Below is an example of calling the GetComps API for zpid 48749425 and count of 5 comps:
http://www.zillow.com/webservice/GetComps.htm?zws-id=<ZWSID>&zpid=48749425&count=5
Sample Output
<?xml version="1.0" encoding="utf-8" ?> <Comps:comps xmlns:Comps="http://www.zillow.com/vstatic/3/static/xsd/Comps.xsd"> <request> <zpid>48749425</zpid> <count>5</count> </request> <message> <text>Request successfully processed</text> <code>0</code> </message> <response> <properties> <principal> <zpid>48749425</zpid> <links> <homedetails>http://www.zillow.com/HomeDetails.htm?city=SEATTLE+&state=WA&zprop=48749425&partner=<ZWSID></homedetails> <graphsanddata>http://www.zillow.com/Charts.htm?chartDuration=1year&zpid=48749425&cbt=7604042719451599549%7E5%7E3H0JLxtdY3zX%2F2rM093I6LYKRS2%2FYJQyYaLUNkW54os%3D&partner=<ZWSID></graphsanddata> <mapthishome>http://www.zillow.com/homes/48749425_zpid&partner=<ZWSID></mapthishome> <myestimator>http://www.zillow.com/myzestimator/MyZestimatorHomeFactsPage.htm?context=1158087975249&zprop=48749425&partner=<ZWSID></myestimator> <myzestimator deprecated="true">http://www.zillow.com/myzestimator/MyZestimatorHomeFactsPage.htm?context=1158087975249&zprop=48749425&partner=<ZWSID></myzestimator> <comparables>http://www.zillow.com/comps/48749425_zpid&partner=<ZWSID></comparables> </links> <address> <street>2114 Bigelow Ave N</street> <zipcode>98109</zipcode> <city>SEATTLE</city> <state>WA</state> <latitude>47.637934</latitude> <longitude>-122.347936</longitude> </address> <zestimate> <amount currency="USD">1124072</amount> <last-updated>09/01/2006</last-updated> <oneWeekChange currency="USD">25563</oneWeekChange> <valuationRange> <low currency="USD">966702</low> <high currency="USD">1236479</high> </valuationRange> <percentile>93</percentile> </zestimate> </principal> <comparables> <comp score="0.257106811263241"> <zpid>48749459</zpid> <links> <homedetails>http://www.zillow.com/HomeDetails.htm?city=SEATTLE+&state=WA&zprop=48749459&partner=<ZWSID></homedetails> <graphsanddata>http://www.zillow.com/Charts.htm?chartDuration=1year&zpid=48749459&cbt=7604042719451599549%7E5%7E3H0JLxtdY3zX%2F2rM093I6LYKRS2%2FYJQyYaLUNkW54os%3D&partner=<ZWSID></graphsanddata> <mapthishome>http://www.zillow.com/homes/48749459_zpid&partner=<ZWSID></mapthishome> <myzestimator>http://www.zillow.com/myzestimator/MyZestimatorHomeFactsPage.htm?context=1158087975250&zprop=48749459&partner=<ZWSID></myzestimator> <comparables>http://www.zillow.com/comps/48749459_zpid&partner=<ZWSID></comparables> </links> <address> <street>2021 5th Ave N</street> <zipcode>98109</zipcode> <city>SEATTLE</city> <state>WA</state> <latitude>47.637253</latitude> <longitude>-122.347385</longitude> </address> <zestimate> <amount currency="USD">985000</amount> <last-updated>09/01/2006</last-updated> <oneWeekChange currency="USD">140007</oneWeekChange> <valuationRange> <low currency="USD">847100</low> <high currency="USD">1083500</high> </valuationRange> <percentile /> </zestimate> </comp> <comp score="0.31179534464349695"> <zpid>48749409</zpid> <links> <homedetails>http://www.zillow.com/HomeDetails.htm?city=SEATTLE+&state=WA&zprop=48749409&partner=<ZWSID></homedetails> <graphsanddata>http://www.zillow.com/Charts.htm?chartDuration=1year&zpid=48749409&cbt=7604042719451599549%7E5%7E3H0JLxtdY3zX%2F2rM093I6LYKRS2%2FYJQyYaLUNkW54os%3D&partner=<ZWSID></graphsanddata> <mapthishome>http://www.zillow.com/homes/48749409_zpid&partner=<ZWSID></mapthishome> <myzestimator>http://www.zillow.com/myzestimator/MyZestimatorHomeFactsPage.htm?context=1158087975250&zprop=48749409&partner=<ZWSID></myzestimator> <comparables>http://www.zillow.com/comps/48749409_zpid&partner=<ZWSID></comparables> </links> <address> <street>2208 Bigelow Ave N</street> <zipcode>98109</zipcode> <city>SEATTLE</city> <state>WA</state> <latitude>47.638543</latitude> <longitude>-122.348008</longitude> </address> <zestimate> <amount currency="USD">1326256</amount> <last-updated>09/01/2006</last-updated> <oneWeekChange currency="USD">269</oneWeekChange> <valuationRange> <low currency="USD">1140580</low> <high currency="USD">1458882</high> </valuationRange> <percentile /> </zestimate> </comp> <comp score="0.35103815285082135"> <zpid>48690116</zpid> <links> <homedetails>http://www.zillow.com/HomeDetails.htm?city=SEATTLE+&state=WA&zprop=48690116&partner=<ZWSID></homedetails> <graphsanddata>http://www.zillow.com/Charts.htm?chartDuration=1year&zpid=48690116&cbt=7604042719451599549%7E5%7E3H0JLxtdY3zX%2F2rM093I6LYKRS2%2FYJQyYaLUNkW54os%3D&partner=<ZWSID></graphsanddata> <mapthishome>http://www.zillow.com/homes/48690116_zpid&partner=<ZWSID></mapthishome> <myzestimator>http://www.zillow.com/myzestimator/MyZestimatorHomeFactsPage.htm?context=1158087975251&zprop=48690116&partner=<ZWSID></myzestimator> <comparables>http://www.zillow.com/comps/48690116_zpid&partner=<ZWSID></comparables> </links> <address> <street>2009-1/2 4th Ave N</street> <zipcode>98109</zipcode> <city>SEATTLE</city> <state>WA</state> <latitude>47.636845</latitude> <longitude>-122.349886</longitude> </address> <zestimate> <amount currency="USD">1096712</amount> <last-updated>09/01/2006</last-updated> <oneWeekChange currency="USD">222</oneWeekChange> <valuationRange> <low currency="USD">943172</low> <high currency="USD">1206383</high> </valuationRange> <percentile /> </zestimate> </comp> <comp score="0.3738944725221039"> <zpid>48690106</zpid> <links> <homedetails>http://www.zillow.com/HomeDetails.htm?city=SEATTLE+&state=WA&zprop=48690106&partner=<ZWSID></homedetails> <graphsanddata>http://www.zillow.com/Charts.htm?chartDuration=1year&zpid=48690106&cbt=7604042719451599549%7E5%7E3H0JLxtdY3zX%2F2rM093I6LYKRS2%2FYJQyYaLUNkW54os%3D&partner=<ZWSID></graphsanddata> <mapthishome>http://www.zillow.com/homes/48690106_zpid&partner=<ZWSID></mapthishome> <myzestimator>http://www.zillow.com/myzestimator/MyZestimatorHomeFactsPage.htm?context=1158087975251&zprop=48690106&partner=<ZWSID></myzestimator> <comparables>http://www.zillow.com/comps/48690106_zpid&partner=<ZWSID></comparables> </links> <address> <street>1920 4th Ave N</street> <zipcode>98109</zipcode> <city>SEATTLE</city> <state>WA</state> <latitude>47.636392</latitude> <longitude>-122.349243</longitude> </address> <zestimate> <amount currency="USD">942362</amount> <last-updated>09/01/2006</last-updated> <oneWeekChange currency="USD">-16139</oneWeekChange> <valuationRange> <low currency="USD">810431</low> <high currency="USD">1036598</high> </valuationRange> <percentile /> </zestimate> </comp> <comp score="0.40222697483306563"> <zpid>48878959</zpid> <links> <homedetails>http://www.zillow.com/HomeDetails.htm?city=SEATTLE+&state=WA&zprop=48878959&partner=<ZWSID></homedetails> <graphsanddata>http://www.zillow.com/Charts.htm?chartDuration=1year&zpid=48878959&cbt=7604042719451599549%7E5%7E3H0JLxtdY3zX%2F2rM093I6LYKRS2%2FYJQyYaLUNkW54os%3D&partner=<ZWSID></graphsanddata> <mapthishome>http://www.zillow.com/homes/48878959_zpid&partner=<ZWSID></mapthishome> <myzestimator>http://www.zillow.com/myzestimator/MyZestimatorHomeFactsPage.htm?context=1158087975251&zprop=48878959&partner=<ZWSID></myzestimator> <comparables>http://www.zillow.com/comps/48878959_zpid&partner=<ZWSID></comparables> </links> <address> <street>2407 4th Ave N</street> <zipcode>98109</zipcode> <city>SEATTLE</city> <state>WA</state> <latitude>47.64023</latitude> <longitude>-122.34988</longitude> </address> <zestimate> <amount currency="USD">1163280</amount> <last-updated>09/01/2006</last-updated> <oneWeekChange currency="USD">-7330</oneWeekChange> <valuationRange> <low currency="USD">1000421</low> <high currency="USD">1279608</high> </valuationRange> <percentile /> </zestimate> </comp> </comparables> </properties> </response> </Comps:comps> <!-- H:11 T:48ms S:5037 -->
XML Schema Definition (XSD)
The XSD for the API can be found at: http://www.zillow.com/static/xsd/Comps.xsd
<?xml version="1.0" encoding="utf-8" ?> <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ZillowTypes="http://www.zillow.com/vstatic/2/static/xsd/ZillowTypes.xsd" targetNamespace="http://www.zillow.com/vstatic/2/static/xsd/Comps.xsd"> <xsd:import namespace="http://www.zillow.com/vstatic/2/static/xsd/ZillowTypes.xsd" /> <xsd:element name="comps"> <xsd:complexType> <xsd:sequence> <xsd:element name="request"> <xsd:complexType> <xsd:sequence> <xsd:element name="zpid" type="xsd:string" /> <xsd:element name="count" type="xsd:string" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="message" type="ZillowTypes:Message" /> <xsd:element minOccurs="0" name="response"> <xsd:complexType> <xsd:sequence> <xsd:element name="properties"> <xsd:complexType> <xsd:sequence> <xsd:element name="principal" type="ZillowTypes:SimpleProperty" /> <xsd:element name="comparables"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="1" maxOccurs="unbounded" name="comp" type="ZillowTypes:ComparableProperty" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>