Onionomics is a modular TOR-native market intelligence system designed to:
- Crawl
.onionmarketplaces - Normalize vendor pricing data
- Build a structured analytics database
- Present price/value comparisons through a clean TOR website
This is NOT a simple scraper.
It is a long-term data intelligence platform.
┌──────────────────────────┐
│ TOR MARKETPLACES │
└─────────────┬────────────┘
│
TOR Network (.onion)
│
┌─────────────▼────────────┐
│ DATA INGEST PLATFORM │
│ Crawler / Scraper │
└─────────────┬────────────┘
│
PostgreSQL Database
│
┌─────────────▼────────────┐
│ TOR CATALOG SITE │
│ Read Only │
└──────────────────────────┘
Two independent applications:
| Tool | Purpose |
|---|---|
| Data Ingest | Crawl + normalize market data |
| Catalog Website | Present analytics safely |
- ✔ Modular site adapters
- ✔ Human-assisted automation
- ✔ Failure tolerant crawling
- ✔ Zero-JS TOR compatibility
- ✔ Data normalization first
- ✔ Presentation isolated from ingestion
Separation of concerns = long-term survivability.
Continuously discover and ingest marketplace data into a structured database.
- Crawl category pages
- Discover product listings
- Handle pagination
- Resume after failure
Collect:
- Product Name
- Vendor
- Price
- Currency
- Weight / Volume
- Listing URL
- Category
- Timestamp
- Source Marketplace
All values converted into comparable units.
| Raw | Stored |
|---|---|
| 1oz | 28.349g |
| 1000mg | 1g |
| 3.5 grams | 3.5g |
| Layer | Technology |
|---|---|
| Backend | Python |
| Automation | Playwright |
| Routing | TOR SOCKS5 |
| Database | PostgreSQL |
| Control UI | FastAPI + HTMX |
Tor Daemon → SOCKS5 Proxy → Playwright Browser
Advantages:
- Visible browsing session
- Manual captcha solving
- Stable automation
- True TOR identity parity
/sites/ base_site.py example_market.py
Each site defines:
- start URLs
- product discovery
- extraction rules
- pagination logic
- captcha detection
Adding new marketplaces requires no engine changes.
Queue-driven architecture:
crawl_jobs
url site status retry_count last_attempt
Capabilities:
- Pause / Resume
- Crash recovery
- Parallel workers
- Full audit history
- Crawl pauses
- User solves captcha in browser
- User presses Resume
- Crawl continues
Plugin system reserved:
captcha_handlers/
Future:
- AI solvers
- External APIs
- Behavioral automation
Crawler rules:
- Extraction failure → log + continue
- Timeout → retry
- Page error → abandon safely
- Site outage → isolate failure
Crawler never stops globally.
Canonical listing data.
- normalized weight
- normalized price
- vendor identity
- site origin
- fingerprint hash
Every scrape recorded.
Enables:
- trend tracking
- deal detection
- analytics
Independent vendor identity table.
Cross-site grouping.
- Vendor reviews
- Product ratings
- Sentiment analysis
- Reputation scoring
Architecture already prepared.
Provide a fast, private comparison interface accessible only through TOR.
Database read-only.
- No JavaScript
- Server-rendered HTML
- Ultra lightweight
- Hardened TOR compatibility
- FastAPI
- HTMX
- Server templates
- PostgreSQL (read-only)
- TOR Hidden Service
Products grouped automatically.
Price per Volume
Cheapest value → Most expensive.
Products grouped when within:
±10% value difference
Shows direct price competitors instantly.
- Category
- Vendor
- Weight range
- Price range
- New listings
- Price drops
- Value ranking
System stores only path:
/product/abc123
Users may:
- open known mirror
- append to private mirror
- copy segmented link
Users may submit new onion URLs.
System will:
- normalize URLs
- remove duplicates
- queue for review
- maintain marketplace registry
- No tracking
- No analytics cookies
- No client JS
- No external requests
- Continuous crawler
- TOR service
- DB write access
- Local admin interface
- Read-only DB
- Public TOR hidden service
Separation protects crawler infrastructure.
- Ingest never public-facing
- Website cannot control crawler
- Database role separation
- No remote execution surface
- TOR isolation per service
onionomics/ │ ├── ingest/ │ ├── crawler/ │ ├── sites/ │ ├── captcha_handlers/ │ └── workers/ │ ├── catalog/ │ ├── web/ │ ├── templates/ │ └── routes/ │ ├── database/ │ ├── migrations/ │ └── models/ │ ├── infra/ │ ├── docker/ │ └── tor/ │ └── docs/
- Docker
- Docker Compose
- TOR
- Python 3.11+
git clone cd onionomics docker compose up
| Service | Port |
|---|---|
| Ingest UI | localhost:8000 |
| Catalog Site | TOR Hidden Service |
| PostgreSQL | internal |
- Architecture design
- Base crawler engine
- First marketplace adapter
- Manual captcha workflow
- Database normalization
- Catalog TOR website
- Value index sorting
- Competition grids
- Review ingestion
- Vendor reputation scoring
- Distributed crawler nodes
- Multi-VM scaling
- Predictive price analytics
- Deal alerting engine
Development follows:
- modular adapters
- isolated components
- reproducible crawling
- privacy-first design
New site integrations occur via:
sites/<market_name>.py
- Resilient TOR scraping
- Human-assisted automation
- Modular expansion
- Anonymous browsing
- Market intelligence analytics
This system evolves from a personal research tool into a full TOR market analytics platform without redesign.
Private / Internal Development
Turning hidden markets into structured intelligence.