DEV Community

Matvey
Matvey

Posted on

I Asked for 50 Homes in Austin, TX. Ten Runs Later, All 472 Rows Came From Seven ZIP Codes Near Lake Travis

I run a visa agency in Bali. In the evenings I build data tools on Apify, and one of them is a Zillow API: you send one HTTP request with a city, ZIP code or Zillow search URL, and you get homes for sale, for rent or recently sold back as flat JSON rows.

Its default test is deliberately boring: {"listingType": "forSale", "locations": ["Austin, TX"], "maxItems": 50}. I ran that input (or the same thing with 30 rows) ten times between 18 and 22 November 2026 while changing other parts of the code. Every run succeeded and every row was a real, correctly parsed listing. Only after I had 472 rows did I count where they were.

What the rows said

Runs 10 (18–22 Nov 2026)
Rows 472, of which 91 are unique homes
ZIP codes 78732 (161), 78734 (110), 78738 (107), 78726 (48), 78730 (20), 78733 (16), 78746 (10)
Cities on the rows Austin, Bee Cave
Distance from downtown Austin closest 10.3 km, median 19.6 km, farthest 29.5 km
Median asking price $850,000 (41 of the 91 homes at $1M or more)

The ZIPs are Steiner Ranch, Lakeway, Bee Cave, Four Points, River Place and West Lake Hills. That's the lake side of the metro, west and northwest of the river. None of the rows came from central, east or south Austin. Not one from 78704.

The run log shows the actual size of the search:

Austin, TX: 5294 matching home(s) on Zillow.
Austin, TX: more than 820 results — splitting the map to get past Zillow's cap.
Done: 50 row(s) (50 from search, 0 with full details), 0 error row(s),
  2 search page set(s), 6 request(s); stopped early: max-items.
Enter fullscreen mode Exit fullscreen mode

So I asked for 50 of about 5,300 homes and got the first 50 from one corner of the map. That's 0.9% of the market, and it looked nothing like Austin as a whole.

Why: depth-first quadrants

A single Zillow search shows at most 41 results per page and 20 pages, so 820 homes. For anything city-sized, the Actor splits the map into four quadrants and searches each of them. If a quadrant still has more than 820 results, it gets split again. This is the part of the code that matters:

def split_bounds(b):
    mid_lat = (b['north'] + b['south']) / 2
    mid_lng = (b['east'] + b['west']) / 2
    return [
        {'north': b['north'], 'south': mid_lat, 'west': b['west'], 'east': mid_lng},  # NW
        {'north': b['north'], 'south': mid_lat, 'west': mid_lng, 'east': b['east']},  # NE
        {'north': mid_lat, 'south': b['south'], 'west': b['west'], 'east': mid_lng},  # SW
        {'north': mid_lat, 'south': b['south'], 'west': mid_lng, 'east': b['east']},  # SE
    ]

for quadrant in split_bounds(bounds):
    await run_search({**qs, 'mapBounds': quadrant}, ctx, lt, depth + 1)
Enter fullscreen mode Exit fullscreen mode

The recursion is depth-first, and the northwest quadrant always goes first. With no row limit that's harmless, because every quadrant gets visited and you end up with the whole city. With maxItems: 50, the run fills its quota from the first leaf it reaches and stops. Austin's map box reaches well into the hills west of the city, so that first leaf is Lakeway and Steiner Ranch.

The latitude and longitude on the rows show the same thing: 30.30 to 30.44 north and −98.04 to −97.82 west, a box about 16 by 21 km. Downtown is at 30.27, −97.74, outside the box.

This isn't a Zillow quirk. It's my code doing what it was told. The cap-bypass was written to get everything past the 820 limit, and nobody thought about a small cap combined with it until I counted ZIPs.

The sample also moves inside the corner

Same input, same corner, different days. Runs a few minutes apart on 19 November matched 49 or 50 of 50 homes. Between the run on the evening of 19 November and the one on 22 November, only 20 homes were in both.

The 30 that dropped out were still "Active" when I last saw them. They hadn't sold, they had just slipped out of the first 50 under Zillow's relevance sort. The 22 newcomers were mostly fresh listings: eight of them had been on Zillow for 0 to 2 days. Without a sort, the first page means "what Zillow ranks highest today". If you treat it as a stable panel and track it daily, you'll measure Zillow's ranking, not the market.

The 22 November run also stopped at 42 rows instead of 50. Its log says why: "The maximum cost per run set for this run is reached — finishing with the rows already paid for." That's the per-run spending cap you can set on any Apify run. A short dataset can just mean you capped the money. Check the log before you assume the source ran dry.

One field that went missing by region

While I had the rows open I counted empty fields. One was much worse than the rest:

Search Homes No zestimate No rentZestimate
Austin, TX 91 73 72
Mandeville, LA 30 2 5
Covington, LA 30 12 9
Slidell, LA 30 14 8

In Austin, 80% of search cards came without a Zestimate. In Mandeville, 7% did. I don't know why Zillow leaves it off those Austin cards, and I'm not going to guess. Price, beds, baths, square feet, lot size and tax-assessed value were filled on the large majority of rows in both states, so it's specific to this field. Where both a price and a Zestimate were present, the asking price was above the Zestimate on 75 of 76 homes, with a median gap of 2.4–3.8% depending on the town.

The practical rule: if your model needs a valuation, count nulls per region on a real pull before you build on it. A clean Louisiana test won't tell you what Texas looks like.

Here's one Austin row, trimmed, as it came back:

{
  "zpid": "144955692",
  "status": "FOR_SALE",
  "statusText": "Active",
  "price": 1275000,
  "street": "14417 Cochise Trl",
  "city": "Austin", "state": "TX", "zip": "78734",
  "latitude": 30.385109, "longitude": -97.92062,
  "beds": 4, "baths": 3, "sqft": 2980, "lotSizeSqft": 18530,
  "homeType": "house",
  "zestimate": null,
  "rentZestimate": null,
  "taxAssessedValue": 1130000,
  "daysOnZillow": 7,
  "pricePerSqft": 428,
  "rowType": "home"
}
Enter fullscreen mode Exit fullscreen mode

Another small thing: in Austin, statusText said "Active" on 89 of 91 homes. In the three Louisiana towns, the same field said "House for sale", "Lot / Land for sale", "Auction" and so on. It's a free-text label that varies by market. Filter on status, homeType and the is* flags instead. Also, auction listings came back with price 0 (priceText "$0"). There were four of them in Louisiana, and they'll pull your average down if you don't drop them.

Getting a sample that looks like the city

The same API call works. You just change the input.

1. List ZIP codes instead of the city. When a run has several locations, the row cap is split evenly between them. I checked this on a three-town run in Louisiana: maxItems: 90 across Mandeville, Covington and Slidell returned exactly 30 from each. Do the same with the Austin ZIPs you care about and every one of them gets its share.

curl -X POST "https://api.apify.com/v2/acts/lergassy~zillow-api/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"listingType":"forSale",
       "locations":["78704","78702","78745","78758","78732"],
       "maxItems":100}'
Enter fullscreen mode Exit fullscreen mode

2. Want the whole city? Drop the cap. With maxItems: 0 the split goes through all four quadrants at every level, and the result is about 5,300 homes, not a corner of the map. That's the case the split was built for.

3. Just want Zillow's own top results? Set bypassResultCap: false. The Actor then reads the city-wide search pages in Zillow's order without splitting the map. I haven't measured the geographic spread of that variant, so count it yourself before you rely on it.

In Python, here's the check I now run on any sample before trusting it:

from collections import Counter
from apify_client import ApifyClient

client = ApifyClient(TOKEN)
run = client.actor("lergassy/zillow-api").call(run_input={
    "listingType": "forSale", "locations": ["Austin, TX"], "maxItems": 50,
})
rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(Counter(r.get("zip") for r in rows).most_common())
print(sum(r.get("zestimate") is None for r in rows), "rows without a Zestimate")
Enter fullscreen mode Exit fullscreen mode

If one ZIP code has most of the rows, you have a corner, not a sample.

When this tool is the wrong choice

  • You need every home in a big metro, every day. That's thousands of rows per city per run. It's doable, but price it first: the API charges per home, and a full Austin pull is about 5,300 of them.
  • You need valuations for Texas specifically. On these search rows the Zestimate was missing four times out of five. Test includeDetails: true on a few homes before you plan around it.
  • You need MLS-grade data or agent-only fields. This returns what any visitor to Zillow sees, nothing more.
  • You want a stable panel of the same homes. Pass propertyUrls (ZPIDs) for the homes you track. Don't re-run a search and assume page one is the same set.

My own takeaway: a row cap combined with any "get past the limit" logic decides which rows you get, not just how many. My code returned exactly what I asked for. I just hadn't looked at where it came from.

Top comments (1)

Collapse
 
userxnom profile image
Abdullah Naseer •

This is a sharp catch, because every run looked correct on its own — 472 rows, all real listings — and only counting the ZIPs exposed the bias. The number that stuck with me is 78732 with 161 rows, while the whole pull was supposed to represent about 5,300 homes; asking for 50 and getting 0.9% of the city, all from one corner, is exactly the kind of silent sampling failure that would poison a model without ever raising an error. Your depth-first explanation makes it click: with maxItems 50, the run fills its quota from the first northwest leaf and stops, so the cap decides which homes you see, not just how many. The Zestimate gap is another good warning — 73 of 91 Austin homes missing one, versus 2 of 30 in Mandeville. When you list ZIP codes instead and the cap splits evenly, do you still see any ordering bias inside each ZIP, or does that split finally give you a spread you would trust for pricing?