Plenty of code written between 2010 and 2020 still calls https://www.zillow.com/webservice/GetSearchResults.htm with a ZWSID key. It has been failing since 2021: developers started seeing 410 Gone early that year, and the program was formally retired on 30 September 2021. If you’ve inherited a script, a spreadsheet macro or a small app that depends on it, this guide shows how to move it to a working API with as little rewriting as possible.
We use ZilloData here because it answers the same questions the old API did (what’s this home’s zpid, what’s its Zestimate, what are its facts) from the same inputs. For background on what Zillow Group offers today and the other options, see Is there a Zillow API?.
Old calls and their replacements
| Old Zillow API call | What it did | ZilloData replacement | Credits |
|---|---|---|---|
GetSearchResults |
Address and city/state/ZIP to zpid, Zestimate and links | GET /v1/properties/by-address |
3 |
GetDeepSearchResults |
The same, plus beds, baths, square feet, year built, last sale and tax assessment | GET /v1/properties/by-address (the full record includes all of these) |
3 |
GetZestimate |
zpid to Zestimate, optionally rent Zestimate | GET /v1/properties/{zpid}/zestimate |
1 |
GetUpdatedPropertyDetails |
zpid to listing facts and photos | GET /v1/properties/{zpid}, or /facts and /photos |
1 each |
GetComps, GetDeepComps |
Comparable recent sales for a zpid | GET /v1/properties/{zpid}/nearby (nearby homes, each with its own zpid) |
1 |
GetChart |
A chart image of value over time | No image. GET /v1/properties/{zpid}/price-history gives you the data to chart yourself. |
1 |
GetRegionChildren |
Child regions (neighborhoods, ZIPs) of a region | No equivalent. To list homes in an area, search by bounding box with POST /v1/search. |
1 per result |
Mortgage calls (GetRateSummary, GetMonthlyPayments) |
Mortgage rates and payment estimates | Not offered |
Two differences matter more than the rest:
- Comps are not the same thing. The old comps calls returned Zillow’s own selection of comparable sales.
/nearbyreturns homes near the subject property. If you were relying on Zillow’s comp choice, pull/nearby, then filter by status, size and sale date yourself. - One address call returns everything. You no longer need a second “deep” call. Ask for the fields you want with
?fields=and the response stays small.
Before and after in Python
Old code usually looked something like this:
# Old: stopped working in 2021 (410 Gone)import requestsimport xml.etree.ElementTree as ET
r = requests.get( "https://www.zillow.com/webservice/GetDeepSearchResults.htm", params={ "zws-id": ZWSID, "address": "731 Larkspur Ave", "citystatezip": "Boise, ID 83702", "rentzestimate": "true", },)result = ET.fromstring(r.content).find(".//result")zpid = result.findtext("zpid")zestimate = result.findtext("zestimate/amount")rent = result.findtext("rentzestimate/amount")sqft = result.findtext("finishedSqFt")The replacement takes one address string instead of two fields and returns JSON:
# New: ZilloData REST APIimport osimport requests
r = requests.get( "https://api.zillodata.com/v1/properties/by-address", params={ "address": "731 Larkspur Ave, Boise, ID 83702", "fields": "zpid,zestimate,rentZestimate,livingArea,bedrooms,bathrooms,yearBuilt", }, headers={"Authorization": f"Bearer {os.environ['ZILLODATA_KEY']}"}, timeout=120,)if r.status_code == 404: raise LookupError("no home matched that address")r.raise_for_status()home = r.json()["data"]zpid = home["zpid"]zestimate = home.get("zestimate")rent = home.get("rentZestimate")sqft = home.get("livingArea")The address in both examples is made up; use a real, complete one. If you have a list of addresses that you used to join as address plus citystatezip, join them with a comma and a space before sending.
Field mapping
The old XML used element names; ZilloData uses the JSON field names below. Use these names in ?fields= too.
| Old XML element | ZilloData field |
|---|---|
zpid |
zpid |
address/street, city, state, zipcode |
address.streetAddress, address.city, address.state, address.zipcode |
address/latitude, address/longitude |
latitude, longitude |
zestimate/amount |
zestimate |
rentzestimate/amount |
rentZestimate |
bedrooms, bathrooms |
bedrooms, bathrooms |
finishedSqFt |
livingArea |
yearBuilt |
yearBuilt |
useCode |
homeType (for example SINGLE_FAMILY) |
taxAssessment |
tax_assessed_value on /zestimate, or the yearly entries in taxHistory |
lastSoldPrice |
last_sold_price on /zestimate, or the sale events in priceHistory |
links/homedetails |
Build it from the zpid if you need it, or keep the URL you looked up |
Any of these can be null when the listing doesn’t show a value. Old code often assumed elements were present and broke on missing ones, so this is a good moment to handle None explicitly.
Error handling
The old API returned HTTP 200 with a message code inside the XML. ZilloData uses HTTP status codes and a stable error.code:
| Situation | Status | error.code |
|---|---|---|
| No home matched the address | 404 | property_not_found |
| Address too short to be real | 400 | invalid_address |
| Missing or wrong key | 401 | missing_api_key, invalid_api_key |
| Out of credits | 402 | out_of_credits |
| Too many requests per minute | 429 | rate_limited |
| The lookup failed or timed out | 502, 504 | property_lookup_failed, lookup_timeout |
Rejected requests, timeouts and server errors cost nothing. A completed lookup that finds no home costs 1 credit, so validate addresses before you send them. The full list is on the errors page.
Moving a whole list at once
If the old code looped over hundreds of addresses, don’t port the loop. Send them in one batch job instead:
curl https://api.zillodata.com/v1/properties/batch \ -H "Authorization: Bearer $ZILLODATA_KEY" \ -H "Content-Type: application/json" \ -d '{"addresses": ["731 Larkspur Ave, Boise, ID 83702", "18 Quarry Ln, Asheville, NC 28801"]}'You get back a job_id. Poll GET /v1/jobs/{id} until the status is succeeded, then read GET /v1/jobs/{id}/results?format=csv to get a spreadsheet-ready file. A batch takes up to 500 entries and costs 1 credit per record returned, which is cheaper than single address lookups at 3 credits each. You can also register a webhook instead of polling.
Checklist
- Create a free ZilloData account and a key at zillodata.com/signup, and store it as
ZILLODATA_KEY. - Replace each old call using the table above.
- Swap XML parsing for JSON, using the field mapping.
- Branch on
error.codeinstead of XML message codes. - Move large loops to
POST /v1/properties/batch. - Once you know a home’s zpid, store it. Later lookups by zpid cost 1 credit instead of 3.
The quickstart covers the first request in curl, JavaScript, Python and Go, and the properties reference lists every parameter.