Use Zillow For-Sale, Rent & Sold Listing Extractor with Python
Search Zillow by city, state or ZIP for active, rental or recently sold listings, with pricing, Zestimate, agent, school, tax and price history for each property.
1. Choose the data you need
Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.
2. Prepare a source-based input
This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.
{
"auctionOnly": false,
"endPage": 1,
"foreclosureOnly": false,
"fsboOnly": false,
"includePending": false,
"maxItems": 3,
"mode": "BUY",
"newConstructionOnly": false,
"openHouseOnly": false,
"priceReducedOnly": false,
"scrapeDetails": false,
"search": "Houston, TX"
}
Download input.example.json and save your reviewed copy as input.json.
| Field | Type | Required | Description |
|---|---|---|---|
search | string | optional | City, ZIP, neighborhood, county or state to search (for example 'Houston, TX' or '77002'). |
mode | string | required | Search active for-sale listings, rentals, or recently sold listings. |
maxItems | integer | optional | Maximum number of records for the whole run across all sources (1-5000). |
endPage | integer | optional | Maximum search result pages per search task (1-24). Zillow returns up to 41 listings per page. |
startUrls | array | optional | Property detail URLs, /apartments/ building URLs, or Zillow search page URLs. Search URLs keep their own filters and mode. |
zpids | array | optional | Zillow property IDs or URLs containing _zpid. Each ZPID is resolved to its canonical detail page. |
addresses | array | optional | Full street addresses to resolve to Zillow property pages, for example '1306 Castle Ct, Houston, TX 77006'. |
priceMin | integer | optional | Minimum listing price in US dollars. |
priceMax | integer | optional | Maximum listing price in US dollars. |
bedsMin | string | optional | Minimum number of bedrooms. |
bathsMin | string | optional | Minimum number of bathrooms. |
sqftMin | integer | optional | Minimum living area in square feet. |
sqftMax | integer | optional | Maximum living area in square feet. |
lotSizeMin | string | optional | Minimum lot size in square feet. |
lotSizeMax | string | optional | Maximum lot size in square feet. |
yearBuiltMin | integer | optional | Earliest construction year. |
yearBuiltMax | integer | optional | Latest construction year. |
hoaMax | integer | optional | Maximum monthly HOA fee in US dollars. |
parkingSpotsMin | integer | optional | Minimum number of parking spots (1-10). |
propertyTypes | array | optional | Limit results to selected property types. Leave empty for all homes. |
daysOnZillow | string | optional | Only include listings added within this period. |
sortBy | string | optional | Result order. Relevance uses Zillow's priority order in RENT mode. |
fsboOnly | boolean | optional | Only include for-sale-by-owner listings. |
foreclosureOnly | boolean | optional | Only include foreclosure listings. |
auctionOnly | boolean | optional | Only include auction listings. |
newConstructionOnly | boolean | optional | Only include new-construction listings. |
includePending | boolean | optional | Add pending and under-contract listings to active results. |
openHouseOnly | boolean | optional | Only include listings with an open house. |
priceReducedOnly | boolean | optional | Only include listings with a price reduction. |
keyword | string | optional | Free-text keyword to match in the listing, for example 'pool'. |
amenities | array | optional | Only include listings with the selected amenities. |
rentalFilters | array | optional | Rent-only filters. Ignored with a status note outside RENT mode. |
scrapeDetails | boolean | optional | Fetch each search result's detail page for description, photos, MLS, tax, open house and building floor plans. Explicit URLs, ZPIDs and addresses are always enriched. |
3. Start an Actor run
Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.
Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.
import json
import os
import urllib.request
# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
actor_input = json.load(stream)
token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
"https://api.apify.com/v2/acts/BW8wUYVb2qQuoswGw/runs?timeout=120&maxTotalChargeUsd=0.50",
data=json.dumps(actor_input).encode("utf-8"),
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.
4. Inspect the actual results
Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.
One record per Zillow property, home or rental building. Records keep the 33 legacy fields and add sold, tax, parcel, builder, agent, MLS, open-house, GraphQL-enriched detail and building fields when Zillow exposes them.
Questions before you run
Which inputs are required?
The published required fields are mode
What does this guide verify?
The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.
What if the run request times out?
Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.
Generated from source build v5Agvw4nDcoJLthFF and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.