Search
Use this API with an AI coding agent
One prompt adds this API to your codebase. The agent reads the OpenAPI 3.1 spec and keeps your key in the ZILLAPI_KEY env var.
POST /v1/search
Cost · 1 credit per result returned (minimum 1) · an empty result costs 1 credit · other failed calls are free
Sync if maxItems ≤ 50, async otherwise.
How a search is charged
You pay for the homes a search returns: 1 credit per home. A search without maxItems returns up to 50 homes, so it can cost up to 50 credits. A search that finds nothing costs 1 credit. maxItems caps both the results and the cost: "maxItems": 10 costs at most 10 credits. Invalid input (4xx), rate limits (429) and upstream failures (5xx) cost nothing. Charged responses show what they cost in the X-Credits-Charged header (an async search is charged when its job completes; see /v1/usage).
Saving credits on scheduled searches
- Ask for fewer results per call. Set
maxItemsto what you use, for example the 10 newest listings instead of the default 50. - Poll less often. Each run is charged again for every home it returns. For alerts and dashboards, once or a few times a day is usually enough.
- Store zpids and refresh only what you need. Keep the zpids from the first run, then re-check the homes you track with
GET /v1/properties/{zpid}(1 credit each) instead of re-running a wide search.
Body, option A: structured filters (recommended)
{ "filters": { "status": "for_sale", "location": "San Francisco, CA", "bbox": { "west": -122.55, "south": 37.70, "east": -122.35, "north": 37.85 }, "price": { "min": 500000, "max": 1500000 }, "beds": { "min": 2 }, "baths": { "min": 1 }, "sqft": { "min": 800 }, "yearBuilt": { "min": 1990 }, "homeTypes": ["house", "townhouse"], "daysOnZillow": "30", "hasPool": false, "hasGarage": true, "isWaterfront": false }, "extractionMethod": "PAGINATION", "maxItems": 50, "async": false}bbox is required. A free-text location/city/ZIP/neighborhood alone
(without coordinates) isn’t enough, the search engine needs a real bounding box
to render results. Requests missing bbox are rejected with 400 invalid_filters
and never hit upstream. location is still accepted as a hint, but it’s optional and
decorative.
How to get a bbox: open the area on zillow.com’s map and read
west,south,east,north off the map viewport in the URL, or skip the math and
paste the whole map URL into searchUrls (option B). Either way the search is
anchored to real coordinates, not a place name.
homeTypes accepts an array here (POST): any of house, condo,
townhouse, multi_family, manufactured, lot, apartment. The GET wrapper
(/v1/listings) takes the same values as a comma-separated string in
home_types, same set, different shape.
Body, option B: pre-built Zillow URL (advanced)
{ "searchUrls": [{ "url": "https://www.zillow.com/homes/for_sale/?searchQueryState=..." }]}The URL must contain a ?searchQueryState=... query parameter ,
pretty URLs like https://www.zillow.com/austin-tx/houses/ are rejected
with 400 invalid_search_url. Open the area on zillow.com, apply your
filters in the UI, then copy the resulting URL, it’ll have
searchQueryState baked into the query string.
extractionMethod
| Value | When |
|---|---|
PAGINATION (default) |
Standard search; returns up to ~820 results |
MAP_MARKERS |
Fastest; up to ~500 results, less data per row |
PAGINATION_WITH_ZOOM_IN |
Exhaustive; recursive map-tile zoom; can return huge result sets |
PAGINATION_WITH_ZOOM_IN always runs async.
Sync 200 response
{ "data": [ { "zpid": "...", "address": "1 Main St, San Francisco, CA 94105", "addressCity": "San Francisco", "price": "$1,250,000", "unformattedPrice": 1250000, "beds": 2, "baths": 2, "area": 1100, "latLong": { "latitude": 37.78, "longitude": -122.41 }, "statusType": "FOR_SALE", "hdpData": { "homeInfo": { "homeStatus": "FOR_SALE", "daysOnZillow": 8, "...": "..." } } } ], "meta": { "count": 50 }, "request_id": "..."}address is the full one-line listing address, including a building or community name
when our data source provides one, for example
Main Street Lofts, 300 S Tulane Ave #8200, Oak Ridge, TN 37830. The parts stay available
separately in addressStreet, addressCity, addressState and addressZipcode.
Async 202 response
{ "data": { "job_id": "...", "status": "running" }, "request_id": "..." }POST /v1/search/with-details
Cost · 1 credit per detail record returned, minimum 1 (the search stage is not billed separately) · an empty result costs 1 credit · other failed calls are free
Runs a search, then enriches each zpid with the full property-detail blob, in one chained job. Always async.
Body
{ "filters": { "status": "for_sale", "bbox": { "west": -97.94, "south": 30.10, "east": -97.56, "north": 30.52 }, "beds": { "min": 3 } }, "extractionMethod": "PAGINATION", "maxItems": 25, "propertyStatus": "FOR_SALE", "extractBuildingUnits": "disabled"}202 response
{ "data": { "job_id": "...", "status": "running", "stage": "search" }, "request_id": "..." }When the job completes, GET /v1/jobs/{id}/results returns the detail rows
(not the search rows). The intermediate search dataset is discarded.
Output formats
Sync responses support ?format=csv and ?format=ndjson. See Output formats.