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 "21 Onslow Road, Lake Hayes, Queenstown"
# Search specific sites only
nz-house-prices "123 Main St, Auckland" --sites homes.co.nz,qv.co.nz
# Output as JSON
nz-house-prices "21 Onslow Road" --json
# List supported sites
nz-house-prices --list-sites
Python API
from nz_house_prices import get_prices
# Get prices from all sites
prices = get_prices("21 Onslow Road, Lake Hayes, Queenstown")
for site, estimate in prices.items():
if estimate.midpoint:
print(f"{site}: ${estimate.midpoint:,.0f}")
Context Manager (recommended for multiple lookups)
from nz_house_prices import HousePriceScraper
with HousePriceScraper() as scraper:
prices1 = scraper.scrape_address("21 Onslow Road, Lake Hayes")
prices2 = scraper.scrape_address("123 Main St, Auckland")
for site, estimate in prices1.items():
print(f"{site}: {estimate.midpoint}")
Features
- 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.0.0.tar.gz
(32.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nz_house_prices-1.0.0.tar.gz.
File metadata
- Download URL: nz_house_prices-1.0.0.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94baace65b1b6f0a0db1e7deabb85bc654c342d69c4d20d1ccfbdbccae9ad3a1
|
|
| MD5 |
a73e4f860cb632e7617b07e64d785c88
|
|
| BLAKE2b-256 |
baa3d4f8b1b667013a397898a7198396a28abe4b2c3f7eeb7f238f2d18006a74
|
File details
Details for the file nz_house_prices-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nz_house_prices-1.0.0-py3-none-any.whl
- Upload date:
- Size: 44.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d09aba28722fec91a51a3f4ff224aac149ba6a63ceec425af875d7790666610
|
|
| MD5 |
e643c47a2b9a73195745963b0e17c3a4
|
|
| BLAKE2b-256 |
d9ed07b443412c030daf735334711ce193645980ec3afa52cd2e21e270aa2727
|