Buildings (multi-unit)
Some Zillow pages describe a whole building rather than a single home. Their URLs look like /b/<id>, /apartments/<id>, or /community/<id>. This endpoint takes one of those URLs and returns the individual units inside.
GET /v1/buildings/by-url
Cost: 1 credit per unit returned, with a minimum of 1. Rejected and failed requests are free.
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | yes | A building page URL on https://www.zillow.com using the /b/, /apartments/, or /community/ path. |
include_units |
enum | no | Which units to return: all (default), for_sale, for_rent, recently_sold, or off_market. |
sync |
boolean | no | true (default) waits for the result. false starts a background job and returns a job_id. |
Waiting for the result
GET /v1/buildings/by-url?url=https://www.zillow.com/b/the-lofts-at-harbor-view-portland-me-5Xk2Qp/&include_units=for_rentAuthorization: Bearer zdk_your_key{ "data": { "units": [ { "zpid": "2087731940", "unitNumber": "3B", "price": 2350, "beds": 1, "baths": 1, "...": "..." }, { "zpid": "2087731952", "unitNumber": "5A", "price": 3100, "beds": 2, "baths": 2, "...": "..." } ] }, "meta": { "count": 18, "include_units": "for_rent" }, "request_id": "6c90e2a4b81d3f57"}The first entry in units is sometimes a record for the building itself. You can spot it because it has no unitNumber.
Running it in the background
Large buildings can have hundreds of units, which may take longer than you want to hold a connection open. Add sync=false and you get 202 Accepted straight away:
{ "data": { "job_id": "b72d0c5e-19a4-4f63-8e07-3d5a6c1f9b20", "status": "running" }, "request_id": "d41f7a092c6e8b35" }Poll GET /v1/jobs/{id} or use a webhook, then read the units from GET /v1/jobs/{id}/results. Background building jobs show up in the jobs list with type batch_detail. Credits are charged when the job succeeds.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | missing_url |
No url parameter. |
| 400 | invalid_url |
The URL isn’t a /b/, /apartments/, or /community/ page. For single homes, use /v1/properties/by-url. |
| 400 | invalid_include_units |
include_units isn’t one of the allowed values. |
Billing example
A synchronous request that returns 120 units costs 120 credits. If you only care about what’s for sale, set include_units=for_sale so you aren’t paying for rentals and off-market units.