Redfin Scraper
Description
A scalable Python library that leverages Redfin's unofficial Stringray API to quickly scrape real estate data.
One-Time Setup
Zip Code Database
A database of zip codes is required to search for City, State values
It is strongly recommended to download this free version in .csv format
The Config
Parameters for the RedfinScraper class can be controlled using an optional
config.jsonfile
Getting Started
Installation
pip3 install -U redfin-scraper
Import Module
from redfin_scraper import RedfinScraper
Initialize Module
scraper = RedfinScraper()
Using The Scraper
Required Setup
scraper.setup(zip_database_path:str, multiprocessing:bool=False)
zip_database_path: Binary path to the zip_code_database.csv
multiprocessing: Allow for multiprocessing
Activating The Scraper
scraper.scrape(city_states:list[str]=None, zip_codes:list[str], sold:bool=False, sale_period:str=None, lat_tuner:float=1.5, lon_tuner:float=1.5)
city_states: List of strings representing US cities formatted as "City, State"
zip_codes: List of strings representing US zip codes
sold: Select whether to scrape for-sale data (default) or sold data
sale_period: Must be selected whenever sold is True (1mo, 3mo, 6mo, 1yr, 3yr, 5yr)
lat_tuner: Represents # of standard deviations beyond the local latitude average that a zip code may exist within
lon_tuner: Represents # of standard deviations beyond the local longitude average that a zip code may exist within
Accessing Prior Scrapes
scraper.get_data(id:str)
id: IDs are indexed at 1 and increase in the format "D00#"
Appendix
Warnings
Multiprocessing can result in the consumption of all available CPU resources for an extended period of time
Unethical use of this library can result in Redfin taking disciplinary action against your IP address
Recommendations
Requests for large amounts of data (# of zip codes > 2,000) should be split into separate requests
The
package.logfile can be used to investigate unexpected results
Metadata
Release files for redfin-scraper 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| redfin-scraper-0.2.2.tar.gz | 10.0 kB | Without provenance | Details for redfin-scraper-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| redfin_scraper-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for redfin_scraper-0.2.2-py3-none-any.whl |
Total release size: 19.9 kB
Release files / redfin-scraper-0.2.2.tar.gz
| Download URL | redfin-scraper-0.2.2.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
485cfdb638a001f4d6505e9b006e94d54af5cdb1f1997eec04afa46f746610ee
|
|
BLAKE2b-256 checksum How to use checksums |
b4451f701903f620313e8651043e76801f2f736b53edf33d5a3df99a70332789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.15
|
Release files / redfin_scraper-0.2.2-py3-none-any.whl
| Download URL | redfin_scraper-0.2.2-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a5a270921c120128941a91e4c901687bf008ce91b1e56359a1e188ef161f159
|
|
BLAKE2b-256 checksum How to use checksums |
18a1ae2f6ac8b10b09cf15d5ed4f73c275294a38a54cd8ea2f631376bc4673b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.15
|
Security for redfin-scraper 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.