Web scraping

Web Scraping House Prices: Two Ways to Build It

Pull listings, then track every price cut.

TL;DR

  • Pick a build path. Web scraping house prices means pulling listing prices and details from sites like Zillow and Redfin into structured data. You can do it with Browserless's Predefined Scrapers API, which returns Zillow search results as validated JSON, or with a BAP script that reads the listing data Redfin embeds in its pages.
  • Terms set the limits. Scraping public listing pages likely doesn't violate the CFAA, but Zillow's and Redfin's terms both prohibit automated collection, and Zillow turns away plain HTTP requests to its search pages.
  • Track changes over time. A daily job that compares each run against the last one flags price cuts and new listings, and lists the homes that left the search.

Introduction

Web scraping house prices starts to make sense the first time you follow a market by hand, checking saved Zillow searches and updating a spreadsheet every few days. Sooner or later a house you were watching drops $15,000 between checks and you miss it.

Listing sites make this harder than pointing general-purpose web scraping tools at a search page. Zillow turns away plain HTTP requests, and in our tests a scraper reading Zillow's page returned 9 of 41 listings without an error. You'll get the data two ways in this step-by-step guide, with Browserless's Predefined Scrapers API for Zillow and a BAP script for Redfin, then add a daily job that tells you what changed.

What is web scraping house prices?

Web scraping house prices means using code, or a managed service, to extract data points from the listing pages of real estate websites, such as the price, address, square footage, bedroom and bathroom counts, listing status, and a link back to the source. Copying each field by hand works for a handful of comparable listings, but to collect property data across a whole market, it takes a web scraper.

Scraped listing data isn't the multiple listing service (MLS) feed an agent works from. It's the consumer-facing version of those listings, without an MLS license.

Why the real estate industry scrapes house prices

Real estate web scraping use cases cluster around a few recurring jobs in the real estate business:

  • Investment analysis. Compare property prices against recent comparable listings and sale prices across neighborhoods, beyond the short list a single agent sends you.
  • Automated valuation models. Feed property features, such as square footage, lot size, year built, and comparable listings, into a valuation model, often a machine learning one, that estimates property values faster than a manual comparative market analysis.
  • Real estate market research. Track median list prices, price changes, and days on market across a metro over months to see market trends a single visit to a listings site can't show you.
  • Lead generation. Build a list of active listings or motivated sellers in a target area, with agent info for outreach, refreshed by the scraper each morning. Agent contact details are personal data, so see the data protection note below.

Real estate data scraping from publicly visible listing pages isn't illegal on its own in the United States, but the space between "publicly visible" and "allowed" is a gray area.

The clearest precedent is hiQ Labs v. LinkedIn. In 2022, the Ninth Circuit held that scraping a page open to the public likely doesn't violate the Computer Fraud and Abuse Act (CFAA), the federal law most often cited against scrapers. The court reached that view while upholding a preliminary injunction, so it isn't a final ruling that public scraping is always lawful.

The ruling didn't save hiQ, which lost a separate breach-of-contract claim tied to LinkedIn's terms of service, agreed to a $500,000 judgment, and shut down. A site's terms can still make scraping a civil problem where the CFAA doesn't apply.

Before you start scraping a listing site, check whether its terms mention automated access, rate-limit your requests, and stay out of anything behind a login, since authenticated areas sit in a different legal category. Zillow's terms prohibit automated queries, and Redfin's prohibit automated crawling without written permission, so treat "the page loaded" as a technical result, not a legal green light.

Agent details and data protection regulations

Agent information on a listing page, such as names and phone numbers, is personal data, so data protection regulations such as California's Consumer Privacy Act (CCPA) can apply to what you store, even when the page is public. Keep only the fields your use case needs, and leave agent names and phone numbers out of a price-tracking dataset entirely.

How real estate sites block data scraping

Beyond their terms of service, real estate companies with large listing sites run technical defenses that make scraping harder in practice, separate from whether it's allowed at all.

Bot detection services profile traffic for signals a real browser doesn't produce, such as a mismatched User-Agent, missing browser APIs, mouse movement that's too straight or fast, and a request rate no person could match. CAPTCHA challenges show up once that score crosses a threshold. Rate limiting works separately, so enough requests from one IP address in a short window get you throttled or blocked either way.

Major platforms don't all react the same way to plain HTTP clients. A curl request for a Zillow search page returned 403 in testing, even with browser-style User-Agent, Accept-Language, and Accept-Encoding headers, while the same page loaded normally in a real browser.

Redfin's answer depended on where the request came from, with an AWS WAF human-verification page on one test machine and the full search page on another. A scraper built on plain HTTP can work one day and fail the next, so neither approach below sends plain HTTP requests from your own machine.

Two approaches to real estate web scraping

There are two reasonable starting points for how to scrape real estate listings. A predefined scraper returns structured data with no browser code to maintain, and a script you write yourself lets you scrape property listings on any site, with full control over the fields.

Comparison of the Browserless Predefined Scrapers API and a custom BAP script for scraping house prices, across supported sites, input, output, maintenance, anti-bot handling and best use

The fast path: how to scrape real estate data without browser code

For a site that already has one, a predefined scraper skips selectors, pagination, and anti-bot handling. You send search parameters and get back structured real estate data as validated JSON.

Browserless's Predefined Scrapers API covers Zillow with two endpoints, zillow/search for search results and zillow/property for a single listing. Each call is billed at a fixed price in units however many listings come back. You're charged when it returns data or a definitive not-found, other errors are free, and you have no selectors to fix when Zillow changes its layout.

Here's a search for houses with three or more bedrooms for sale in Austin, Texas, under $600,000, sorted by the newest listings. The timeout gives a blocked request room to fall back to a stealth browser:

curl --request POST \
  --url "https://production-sfo.browserless.io/scrapers/zillow/search?token=$BROWSERLESS_TOKEN&timeout=90000" \
  --header 'Content-Type: application/json' \
  --data '{
    "params": {
      "query": "Austin, TX",
      "tenure": "sale",
      "bedsMin": 3,
      "priceMax": 600000,
      "sort": "days"
    }
  }'

Each result in data.results includes the price, bed and bath counts, living area, property type, listing status, and a direct URL, already parsed into fields. The via field shows whether Zillow's API path or the stealth-browser fallback returned them, which explains an occasional slow call.

Call zillow/property with a zpid for the property details, more comprehensive data on one home, including the tax-assessed value, price history, and schools. For a scraper that saves Zillow data across pages to JSON and CSV, see how to build a Zillow scraper.

The full-control path: scrape real estate listings with BAP

Not every site has a predefined scraper, and sometimes you need a field the endpoint doesn't return, or one schema that combines multiple sources. In those cases you write the scraper yourself with the TypeScript SDK for Browser Automation Protocol (BAP), which drives a hosted browser on Browserless (a Python SDK is also available). The example below scrapes Redfin, which has no predefined scraper, through the stealth route and a US residential proxy.

Redfin embeds structured property information in each search page as schema.org JSON-LD, the markup search engines read. Each listing ships as two blocks that share a URL, a residence with the address and floor size, and a Product with the asking price. The script pairs them by URL to get all the data for one home, the exact data Redfin publishes, so it doesn't depend on any of the page's class names.

Install the SDK and a TypeScript runner with npm install @browserless.io/bap-ts tsx, set BROWSERLESS_TOKEN, and run the file with npx tsx scrape-redfin.mts:

import Browserless from "@browserless.io/bap-ts";
import { writeFile } from "node:fs/promises";

const searchUrl = "https://www.redfin.com/city/30818/TX/Austin";
const maxPages = 2;

const browser = Browserless.connect({
  browserWSEndpoint: "wss://production-sfo.browserless.io/stealth/bql",
  token: process.env.BROWSERLESS_TOKEN,
  timeout: 90000,
});

type Listing = {
  url: string;
  address: string;
  price: number | null;
  sqft: number | null;
  scrapedAt: string;
};

// Runs in the page. Each listing ships as a residence block and a Product block with the price, linked by URL.
const readListings = () => {
  const blocks = [
    ...document.querySelectorAll('script[type="application/ld+json"]'),
  ].flatMap((s) => {
    try {
      return [JSON.parse(s.textContent ?? "")].flat();
    } catch {
      return [];
    }
  });
  const byUrl: Record<string, any> = {};
  for (const b of blocks) {
    if (!b.url) continue;
    byUrl[b.url] ??= {};
    if (b["@type"] === "Product")
      byUrl[b.url].price = Number(b.offers?.price) || null;
    if (b.address) {
      byUrl[b.url].address = b.name;
      byUrl[b.url].sqft = b.floorSize?.value ?? null;
    }
  }
  return JSON.stringify(
    Object.entries(byUrl)
      .filter(([, v]) => v.address)
      .map(([url, v]) => ({ url, price: null, ...v })),
  );
};

async function scrape(): Promise<Listing[]> {
  const page = await browser.newPage();
  const listings: Listing[] = [];
  try {
    // page.proxy() only proxies requests that match a url, type or method rule.
    await page.proxy({
      network: "residential",
      country: "US",
      sticky: true,
      type: ["document"],
    });
    for (let n = 1; n <= maxPages; n++) {
      const url = n === 1 ? searchUrl : `${searchUrl}/page-${n}`;
      await page.goto(url, { waitUntil: "domContentLoaded", timeout: 60000 });
      const found: Omit<Listing, "scrapedAt">[] = JSON.parse(
        await page.evaluate(readListings),
      );
      if (found.length === 0) throw new Error(`No listing data on ${url}`);
      const scrapedAt = new Date().toISOString();
      listings.push(...found.map((l) => ({ ...l, scrapedAt })));
      console.log(`Page ${n}: ${found.length} listings`);
    }
    return listings;
  } finally {
    await page.close();
  }
}

try {
  const listings = await scrape();
  await writeFile("redfin-listings.json", JSON.stringify(listings, null, 2));
  console.log(`Saved ${listings.length} listings`, listings[0]);
} finally {
  await browser.close();
}

In testing, the script returned 41 listings per page across two pages on every run. A page with no listing data throws instead of saving an empty file, and the finally blocks close the browser on both paths. A listing without a Product block, such as one with an undisclosed address, comes back with a null price.

To point it at another real estate site, check whether that site's pages carry the same Product and Offer markup. Where they don't, replace readListings with selectors for that site's listing cards. Before writing those from scratch, check the skills library, which has a real estate category of site-specific data extraction recipes.

Tracking price changes over time

A single scrape tells you what's listed today, while the more useful version runs the same search on a schedule to collect real estate data each day and keeps every run as historical data to compare against the one before.

In October 2026, 20.5% of US listings had a price cut, according to Realtor.com's research team, so cuts are common enough to be worth tracking, and a daily job catches one within a day of it happening.

How the daily price-tracking job works: today's Zillow search and the last saved snapshot are matched by zpid, producing new listings, price cuts, listings that dropped out, and a saved snapshot for the next run

A diff only means something if each run covers the whole search. The Austin search from earlier matches over 2,000 listings, more than the 24 pages the API serves, so the script below tracks one ZIP code instead and reads every page of it. It keys each listing by its zpid, compares the results against the snapshot the last run saved, and prints what's new, what got cheaper, and what's gone before saving today's results for the next run:

import { readFile, writeFile } from "node:fs/promises";

const SNAPSHOT = "78704-snapshot.json";
const SEARCH = { query: "78704", tenure: "sale", bedsMin: 3, priceMax: 800000 };

async function searchZillow(params) {
  const res = await fetch(
    `https://production-sfo.browserless.io/scrapers/zillow/search?token=${process.env.BROWSERLESS_TOKEN}&timeout=90000`,
    {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ params }),
      signal: AbortSignal.timeout(120000),
    },
  );
  const body = await res.json().catch(() => ({}));
  if (!res.ok || !body.ok)
    throw new Error(
      `Search failed with ${res.status}: ${JSON.stringify(body.error ?? body)}`,
    );
  return body.data;
}

// Each page is a separate call, and the API serves at most 24 pages per search.
async function searchAll(params) {
  const first = await searchZillow({ ...params, page: 1 });
  if (first.totalUnits > 24 * first.pageSize) {
    throw new Error(
      `Search matches ${first.totalUnits} listings, more than 24 pages hold. Narrow the filters.`,
    );
  }
  const results = [...first.results];
  for (let page = 2; results.length < first.totalUnits && page <= 24; page++) {
    const data = await searchZillow({ ...params, page });
    if (data.exhausted) break;
    results.push(...data.results);
  }
  return results;
}

const results = await searchAll(SEARCH);
const today = Object.fromEntries(
  results.map((r) => [r.zpid, { address: r.address.line, price: r.price.amount }]),
);

// The first run has no snapshot yet, so every listing reports as new.
const previous = JSON.parse(await readFile(SNAPSHOT, "utf8").catch(() => "{}"));

// A run that comes back far smaller than the last one is more likely partial than a wave of sales.
const before = Object.keys(previous).length;
if (before && Object.keys(today).length < before * 0.8) {
  throw new Error(
    `Got ${Object.keys(today).length} listings, last run had ${before}. Not saving a partial run.`,
  );
}

for (const [zpid, home] of Object.entries(today)) {
  const last = previous[zpid];
  // A run with no price keeps the last known one, so the next real cut still shows.
  if (home.price == null && last) home.price = last.price;
  if (!last) console.log(`NEW   ${home.address} at $${home.price}`);
  else if (home.price && home.price < last.price)
    console.log(`CUT   ${home.address}: $${last.price} -> $${home.price}`);
}
for (const [zpid, home] of Object.entries(previous)) {
  if (!today[zpid]) console.log(`GONE  ${home.address}`);
}

// Keep a timestamped copy of every run, so the price history builds up over time.
// It's written first, so a failed write leaves the latest snapshot untouched.
const stamp = new Date().toISOString().replace(/[:.]/g, "-");
await writeFile(
  SNAPSHOT.replace(".json", `-${stamp}.json`),
  JSON.stringify(today, null, 2),
);
await writeFile(SNAPSHOT, JSON.stringify(today, null, 2));
console.log(`Saved ${Object.keys(today).length} listings to ${SNAPSHOT}`);

Save it as track-prices.mjs and run it once a day per market from a cron job or workflow scheduler. In testing, the 78704 search returned all 47 listings across two pages, and a second run straight after reported no changes. Each page is a separate API call, so a search that matches more listings than 24 pages hold stops after the first page with an error, and you narrow it with a price band, home type, or smaller area.

Two guards keep bad runs out of the history. A listing that comes back without a price keeps its last known price, so it doesn't report as a cut and a later real cut still shows, and a run that returns under 80% of the last snapshot throws instead of overwriting it. If the market really did shrink that much, check the listings with a fresh search, then move the old snapshot aside so the next run starts a new baseline. A listing can also drop out because it sold, went under contract, or rose above your price filter, so check it with zillow/property before you record it as sold.

Structuring the collected data

Property listing data is easiest to work with as one row per listing, with the price, address, and square footage in the same fields every time. Save the collected data from each run in a format your analytics tools already read, such as a CSV or JSON file, Google Sheets for a shared view, or a database once volume justifies it.

Settle the schema before the first run, since renaming columns after months of runs means rewriting every comparison that reads them. The two scripts in this article return different shapes, with Zillow nesting the address and price and Redfin returning flat fields, so map both into one row before you store anything:

// One row shape for both sources, so every comparison reads the same fields.
const fromZillow = (r) => ({
  source: "zillow",
  id: r.zpid,
  url: r.url,
  address: r.address.line,
  price: r.price.amount,
  sqft: r.livingAreaSqft ?? null,
  scrapedAt: new Date().toISOString(),
});

const fromRedfin = (l) => ({
  source: "redfin",
  id: l.url,
  url: l.url,
  address: l.address,
  price: l.price,
  sqft: l.sqft,
  scrapedAt: l.scrapedAt,
});

With both sources in the same columns, you can compare prices across Zillow and Redfin for the same street or ZIP code.

Common pitfalls in real estate scraping

A few mistakes show up repeatedly once a real estate scraper moves from a one-off script to something that runs unattended:

  • Selectors go stale. Real estate sites update their markup often, and a scraper that depends on a generated class name breaks at the next redesign. Read embedded structured data where the page ships it, and otherwise prefer stable attributes like data-testid over hashed class names.
  • Duplicate listings pile up. Pagination and re-runs both return listings you've already captured. Dedupe on a stable identifier, like Zillow's zpid or the Redfin listing URL, not the address string, which varies in formatting between runs.
  • Rate limits bite first, bans come second. Scraping too fast gets you throttled well before a site considers a permanent block. Space out requests, and consider rotating proxies if you're scraping large volumes across several markets in parallel.
  • Partial runs look like delistings. A blocked run, or a search that only returns its first page, makes real listings appear to drop out. Read every page, and refuse to save a run much smaller than the last, as the tracking script does.

Conclusion

With the daily job running, you get a short list each morning of what changed in the market you watch. After a month you have your own price history for the market, the kind valuation models and market research are built on.

That history only holds up if every run comes back complete, because a blocked or half-empty run makes real listings look like they left the market. Browserless gives the job a steadier footing, with a Predefined Scrapers API that can fall back to a stealth browser when Zillow's API path is blocked, and stealth hosted browsers with residential proxies for Redfin and other sites, so you can stop missing price cuts in the markets you watch. To start tracking your first market, sign up for Browserless.

Web scraping house prices FAQs

Does Zillow allow web scraping?

Not under its own terms. Zillow's terms of use prohibit automated queries, including screen scraping and crawlers, and plain HTTP requests to its search pages get a 403. Review the terms against your use case before you scrape, and if you go ahead, Browserless's Zillow scraper returns search results as JSON without browser code to maintain.

Is web scraping real estate data illegal in the United States?

Scraping public listing pages is common, and under the hiQ Labs ruling it likely doesn't violate the CFAA. The guardrails that matter are a site's terms of service, staying out of pages behind a login, keeping your request rate modest, and handling agent contact details as the personal data they are.

Is AI scraping illegal?

No more than scraping with any other tool. An AI agent is bound by the same terms of service and request-rate limits as a script, and because it can send far more requests far faster, keeping the rate modest matters more once an agent is driving.

Can ChatGPT do web scraping?

It can read a page you point it at, but a chat isn't built to run the same search every day and save structured results. For recurring price tracking, a script or an agent calls a hosted browser such as Browserless to load the listing pages, and a large language model (LLM) is better used afterward to sort or classify what came back.

What's the typical cost of web scraping house prices?

Engineering time usually costs more than the requests. A script on your own infrastructure has no per-call fee, but it takes coding skills and ongoing work on selectors, proxies, and CAPTCHA challenges. A BAP script on Browserless is billed by browser time plus proxy bandwidth, and predefined real estate scraping tools like the Zillow scraper charge a fixed price per call.