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.1.tar.gz (41.2 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.1-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nz_house_prices-1.1.1.tar.gz
  • Upload date:
  • Size: 41.2 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.1.tar.gz
Algorithm Hash digest
SHA256 e6bcc19c35fd5e515e708123decd28f282b6da692fbf5bc8c817cde82e4799a4
MD5 de4795d165482dcf84e406797c771f1b
BLAKE2b-256 37cfab97a3fac2f9f3bbf8b87ce644300520490155e0717541288c9e3110dd42

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nz_house_prices-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eaf4d040d418c3868b5cbb69d375e106f36d1a246dd203f0125df287b9f968f8
MD5 f66e9815753ebe07b4e1bb70e7d4d189
BLAKE2b-256 a9de827c0dc739b6b060bff32af8429afa25ff9a157f3525f3177111f7f6c68f

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