In Python, call GET https://api.zillodata.com/v1/properties/{zpid}/zestimate with requests and a ZilloData key. It returns the Zestimate, rent Zestimate, tax-assessed value and last sale price for 1 credit ($0.005 on the Monthly plan).

Endpoint GET /v1/properties/{zpid}/zestimate
You need The home’s zpid (the number before _zpid in a Zillow URL)
Cost 1 credit per home
Returns zestimate, rent_zestimate, tax_assessed_value, last_sold_price, currency
MCP tool get_home_value

Setup

Install requests, create a free key at zillodata.com/signup (100 credits, no card), and keep the key out of your code:

pip install requests
export ZILLODATA_KEY="zdk_paste_your_key_here"

Get one Zestimate

This function does one lookup and turns the API’s error responses into Python exceptions you can act on. It retries the failures that are free to retry (rate limits, timeouts and server errors) and gives up on anything that would fail the same way again.

import os
import time
import requests
API = "https://api.zillodata.com/v1"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['ZILLODATA_KEY']}"
RETRYABLE = {429, 500, 502, 504}
class ZilloDataError(Exception):
def __init__(self, status, code, message):
super().__init__(f"{status} {code}: {message}")
self.status, self.code = status, code
def get_zestimate(zpid: str, attempts: int = 4) -> dict:
for attempt in range(attempts):
r = session.get(f"{API}/properties/{zpid}/zestimate", timeout=60)
if r.status_code == 200:
return r.json()["data"]
try:
err = r.json().get("error", {})
except ValueError: # a proxy error page instead of JSON
err = {}
if r.status_code in RETRYABLE and attempt < attempts - 1:
time.sleep(2 ** attempt * 2) # 2s, 4s, 8s
continue
raise ZilloDataError(r.status_code, err.get("code"), err.get("message"))
value = get_zestimate("29384412")
print(value["zestimate"], value["rent_zestimate"])

A successful response looks like this (the zpid and numbers are examples):

{
"data": {
"zestimate": 598400,
"rent_zestimate": 3150,
"tax_assessed_value": 541200,
"last_sold_price": 455000,
"currency": "USD"
},
"request_id": "3a6cf1e09b7d42d8"
}

The errors you’ll actually see are property_not_found (404: the zpid doesn’t match a home), invalid_zpid (400: something other than digits), out_of_credits (402) and rate_limited (429). The full list is on the errors page.

A CSV of zpids with pandas

For a spreadsheet’s worth of homes, read the zpids with pandas, look each one up, and write the values back next to them. The free plan allows 20 requests a minute and paid plans 200 to 300, so the loop pauses to stay under the limit.

import pandas as pd
df = pd.read_csv("homes.csv", dtype={"zpid": str}) # needs a "zpid" column
rows = []
for zpid in df["zpid"]:
try:
v = get_zestimate(zpid)
rows.append({"zpid": zpid, **v, "error": None})
except ZilloDataError as e:
if e.code == "out_of_credits":
break # stop instead of failing every remaining row
rows.append({"zpid": zpid, "error": e.code})
time.sleep(3.1) # about 19 a minute; use 0.35 on a paid plan
out = df.merge(pd.DataFrame(rows), on="zpid", how="left")
out["gross_yield"] = out["rent_zestimate"] * 12 / out["zestimate"]
out.to_csv("homes_with_zestimates.csv", index=False)

The last line computes a gross rent yield for each home, a quick screen for rentals. It comes out empty wherever either estimate is missing.

If you have addresses or Zillow URLs instead of zpids, don’t loop. Send them all to POST /v1/properties/batch (up to 500 per job, 1 credit per home returned, even for addresses) and read the results when the job finishes. The Zestimate API guide has a complete batch script.

Pitfalls

  • Keep zpids as strings. pandas reads a numeric column as integers or floats, and a float zpid like 29384412.0 gives you an invalid_zpid error. Pass dtype={"zpid": str}.
  • Don’t treat None as zero. A missing Zestimate is None, and averaging it as 0 drags your numbers down.
  • A Zestimate is an estimate, not an appraisal. Don’t present it as one, and don’t use it alone for lending decisions.
  • Store the zpid when you start from an address. The address lookup costs 3 credits, and every lookup after that can use the 1-credit zpid call.

Do it with an AI assistant

ZilloData runs a hosted MCP server, so Claude, Claude Code, Cursor and other MCP clients can make these calls for you. In Claude Code:

claude mcp add --transport http zillodata https://api.zillodata.com/mcp \
  --header "Authorization: Bearer $ZILLODATA_KEY"

Other clients, and OAuth sign-in without a key: MCP setup. Then ask, for example:

  • Get the Zestimate and rent Zestimate for zpid 29384412 and tell me the gross rent yield.
  • Here are five zpids. Which home has the highest rent Zestimate relative to its Zestimate?