Skip to main content

Scrape house price estimates from NZ real estate websites

Project description

NZ House Prices

A Python package to scrape house price estimates from New Zealand real estate websites.

Installation

pip install nz-house-prices

Supported Sites

  • homes.co.nz
  • qv.co.nz
  • propertyvalue.co.nz
  • realestate.co.nz
  • oneroof.co.nz

Quick Start

Command Line

# Search by address
nz-house-prices "123 Example Street, Ponsonby, Auckland"

# Search specific sites only
nz-house-prices "123 Main St, Auckland" --sites homes.co.nz,qv.co.nz

# Output as JSON
nz-house-prices "123 Example Street, Ponsonby" --json

# Use sequential mode (slower, but uses less resources)
nz-house-prices "123 Example Street" --sequential

# Skip cache for fresh results
nz-house-prices "123 Example Street" --no-cache

# List supported sites
nz-house-prices --list-sites

Python API

from nz_house_prices import get_prices

# Get prices from all sites (parallel by default, ~20-25s)
prices = get_prices("123 Example Street, Ponsonby, Auckland")

for site, estimate in prices.items():
    if estimate.midpoint:
        print(f"{site}: ${estimate.midpoint:,.0f}")

# Use sequential mode if needed
prices = get_prices("123 Example Street, Auckland", parallel=False)

Context Manager (for multiple lookups)

from nz_house_prices import HousePriceScraper

with HousePriceScraper() as scraper:
    prices1 = scraper.scrape_address("123 Example Street, Ponsonby")
    prices2 = scraper.scrape_address("123 Main St, Auckland")

    for site, estimate in prices1.items():
        print(f"{site}: {estimate.midpoint}")

Features

  • Parallel scraping - Queries all 5 sites concurrently (~20-25 seconds)
  • Geocoding-based address matching - Accurately finds properties even when suburb names differ between sites
  • Automatic address-to-URL resolution for all supported sites
  • URL caching for faster repeated lookups
  • Rate limiting to avoid overwhelming sites
  • Retry logic with exponential backoff
  • Both CLI and Python API interfaces

Requirements

  • Python 3.9+
  • Playwright (installed automatically with the package)

After installing, run once to set up browsers:

playwright install chromium

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nz_house_prices-2.0.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nz_house_prices-2.0.0-py3-none-any.whl (51.4 kB view details)

Uploaded Python 3

File details

Details for the file nz_house_prices-2.0.0.tar.gz.

File metadata

  • Download URL: nz_house_prices-2.0.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for nz_house_prices-2.0.0.tar.gz
Algorithm Hash digest
SHA256 4c6de4b22c7c63dc3ba6e08cf1fb854363f771da0ed7be4f73ddbf30f10aa0b1
MD5 d016c2c304e3fb35425b886d0e00d6da
BLAKE2b-256 7767f61f5f842cece219c3c33fe09bfeeaef5d18376eda5be3b46ba8263a7d17

See more details on using hashes here.

File details

Details for the file nz_house_prices-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nz_house_prices-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc6a7c2a302dc5b14070869d7e49b9af0e066407b51ab506b4e25614f95603d8
MD5 151bb826051038d132a838dd3dcdd3fd
BLAKE2b-256 1b385b30c0ca7b06352700880a9f09b08edf4ac76905e6dc523fb8299d6271fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page