Zillow API Network

GetChart API

The GetChart API generates a URL for an image file that displays historical Zestimates for a specific property. The API accepts as input the Zillow Property ID as well as a chart type: either percentage or dollar value change. Optionally, the API accepts width and height parameters that constrain the size of the image. The historical data can be for the past 1 year, 5 years or 10 years.

The GetChart Web Service is located at http://www.zillow.com/webservice/GetChart.htm

The input parameters for the API are:

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 IDYes
zpidThe Zillow Property ID for the property; the parameter type is an integerYes
unit-typeA string value that specifies whether to show the percent change, parameter value of "percent," or dollar change, parameter value of "dollar"Yes
widthAn integer value that specifies the width of the generated image; the value must be between 200 and 600, inclusiveNo
heightAn integer value that specifies the height of the generated image; the value must be between 100 and 300, inclusive.No
chartDurationThe duration of past data that needs to be shown in the chart. Valid values are "1year", "5years" and "10years". If unspecified, the value defaults to "1year".No

The result set of the API:

urlThe API returns a url to an image showing the chart as specified in the API call.
Limit-warningIf 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:
<text>Request successfully processed</text>
This output field will not be returned if it is false.

The output url provided by the API points to an image like the one shown below. You can always tweak the size of the image using the height/width parameters so that they fit your site requirements.

Messages and Codes

The following table summarizes the 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 on 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.
500The specified zpid parameter was not specified or invalidThe zpid parameter you have provided is not valid. Please check if your zpid is correct and try again.
501The specified unit-type parameter was not specified or invalidCheck if you have specified the unit-type. This is mandatory. If you have specified it, check if the unit type is either "percent" or "dollar."
502The specified width parameter was invalid (not an integer) or out of boundsThe width parameter has to be within the range 200 to 600, inclusive. Check if you have specified it within this range.
503The specified height parameter was invalid (not an integer) or out of boundsThe height parameter has to be within the range 100 to 300, inclusive. Check if you have specified it within this range.

Sample Calls

Below is a sample call to the API for zpid 48749425 with a width of 300 and height of 150:

Sample Output

    <?xml version="1.0" encoding="utf-8" ?>
    <Chart:chart xmlns:Chart="http://www.zillowstatic.com/vstatic/ae764b1/static/xsd/Chart.xsd">
    <text>Request successfully processed</text>
    H:11  T:1ms  S:311

XML Schema Definition (XSD)

The XSD for the API is located at: http://www.zillow.com/static/xsd/Chart.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.zillowstatic.com/vstatic/ae764b1/static/xsd/ZillowTypes.xsd" targetNamespace="http://www.zillowstatic.com/vstatic/ae764b1/static/xsd/Chart.xsd">
    <xsd:import namespace="http://www.zillowstatic.com/vstatic/ae764b1/static/xsd/ZillowTypes.xsd" />
    <xsd:element name="chart">
    <xsd:element name="request">
    <xsd:element name="zpid" type="xsd:string" />
    <xsd:element name="unit-type" type="xsd:string" />
    <xsd:element minOccurs="0" name="width" type="xsd:string" />
    <xsd:element minOccurs="0" name="height" type="xsd:string" />
    <xsd:element name="message" type="ZillowTypes:Message" />
    <xsd:element minOccurs="0" name="response">
    <xsd:element name="url" type="xsd:string" />

Have a question? Find help from a Pro here.