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+
  • Chrome browser (for Selenium WebDriver)

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-1.1.0.tar.gz (41.1 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-1.1.0-py3-none-any.whl (54.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nz_house_prices-1.1.0.tar.gz
  • Upload date:
  • Size: 41.1 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-1.1.0.tar.gz
Algorithm Hash digest
SHA256 54454eea5b138540197f84c2ddfe11dcb7e5f3e532da762f9da1f04ae51ada37
MD5 14d866df60998b58f67a866d54db3b00
BLAKE2b-256 e7d03dac8607ad0e744c11a652be3a380090d2c4adce365497db48759c08b89d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nz_house_prices-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a41114a7a61c996a69a29ffbe0b011abbb95b25be40cc1c0899343640d21ccb9
MD5 83fc1f248431a1a5dec03c7cf5d08e0a
BLAKE2b-256 bf90a9d78500dc1662ea8f794609dcff1665b7ffaa6a0bda13b64e8b1ae79923

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