Snare (Scam Network Anomaly Recognition Engine) is an anomaly detection tool designed to protect users from fraudulent apartment listings on platforms such as Craigslist, Zillow, and Apartments.com. By combining machine learning techniques with robust data collection, Snare helps users identify scams and make informed decisions.
Apartment rental scams cost individuals thousands of dollars each year. Snare aims to solve this problem by leveraging anomaly detection algorithms and domain-specific insights to flag suspicious listings before users fall victim.
- Machine Learning Techniques:
- Isolation Forest for identifying outliers.
- DBSCAN for clustering and density-based anomaly detection.
- Analyzed Features:
- Price metrics (e.g., price per bedroom, price per square foot).
- Presence of suspicious words in descriptions.
- Phone number patterns (e.g., multiple agent associations).
- Proximity to high-population areas and points of interest.
- Scrapes data from Craigslist, Zillow, and Apartments.com.
- Two scraping functions:
- Scrape individual listings based on user input.
- Batch scrape listings for database analysis and model training.
- Flags anomalies based on:
- Price ratios.
- Keyword analysis (e.g., scammy language).
- Phone number and contact patterns.
- Time on market and proximity to key locations.
- Powered by PostgreSQL via Supabase for scalable and efficient data storage.
- Tracks listings, model results, and retraining logs.
- Built with FastAPI for streamlined API interactions.
- Intuitive web interface for submitting URLs and receiving detection insights.
- Implements logic for retraining anomaly detection models based on new data, ensuring continuous refinement and accuracy.
Stack Component | Technology Used |
---|---|
Frontend | HTML, CSS, JavaScript |
Backend | FastAPI, Python |
Database | PostgreSQL, Supabase |
Machine Learning | Scikit-learn, NumPy, Pandas |
Web Scraping | BeautifulSoup, Selenium |
-
Clone the repository:
git clone https://github.com/svnsvnsvn/snare.git cd snare
-
Install dependencies:
pip install -r requirements.txt
-
Set up the PostgreSQL database via Supabase:
- Follow Supabase setup instructions here.
- Add your database credentials to
.env
.
-
Run the application:
uvicorn app.main:app --reload
-
Access the web interface at
http://localhost:8000
.
- Use the web interface to submit URLs for analysis or batch scrape listings into the database.
- Analyze flagged listings directly from the web interface.
- Integrate Snare with your existing tools via its FastAPI-powered API endpoints.
- Individual Renters: Identify fraudulent listings before engaging.
- Real Estate Platforms: Enhance user trust by integrating Snare's detection engine.
- Market Analysts: Study patterns of fraudulent activity in the housing market.
- Image Analysis: Integrate AI to detect anomalies in listing photos.
- Enhanced Scalability: Add multi-threaded scraping and caching for high-performance data collection.
- Community Integration: Allow users to report and share flagged listings.