AI-Powered Competitive Pricing Intelligence for E-Commerce Sellers
MarketMind is an intelligent pricing assistant that helps e-commerce sellers maximize profits through data-driven competitive analysis. By automatically scraping competitor prices from Amazon and eBay, the system uses machine learning to recommend optimal pricing strategies tailored to your costs and inventory.
- Automated Competitor Discovery: Finds up to 15 relevant competitors on Amazon & eBay using advanced search algorithms
- Smart Product Matching: Uses image hashing and fuzzy text matching to identify similar products
- Multi-Currency Support: Handles 40+ global currencies with automatic USD conversion
- XGBoost ML Model: Predicts demand at different price points
- Cost-Based Strategies: Recommends prices starting from your actual costs (e.g., Cost Γ 1.5 for 50% profit)
- Market-Aware Capping: Ensures recommendations stay competitive with market averages
- Multiple Pricing Strategies:
- π― Target (50% profit margin)
- π AI Optimal (demand-optimized)
- β‘ Market Match (competitive positioning)
- π¨ Quick Sale (volume-focused)
- Anti-Detection Technology: Selenium with stealth mode to bypass bot detection
- Retry Mechanisms: Automatic retry on failures for reliability
- Amazon Interstitial Handler: Bypasses "Continue Shopping" blocking pages
- 20+ Price Selectors: Adapts to different Amazon/eBay layouts (2024-2025)
- Clean UI: Modern dark theme with intuitive navigation
- Real-Time Progress: Live scraping status with progress indicators
- Top 10 Competitors: Focused view of best matches with similarity scores
- Detailed Logging: Full transparency with downloadable scraping logs
- Viability Alerts: Warns about unprofitable products or tight margins
- Python 3.9 or higher
- Google Chrome browser (required for Selenium)
-
Clone the repository
git clone https://github.com/MD-Code404/MarketMind.git cd MarketMind -
Create virtual environment
python -m venv venv # Windows .\venv\Scripts\activate # macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Launch the application
streamlit run app.py
-
Open your browser
- Navigate to
http://localhost:8501
- Navigate to
-
Analyze a product
- Enter your product URL (Amazon or eBay)
- Input your cost per unit
- Specify available inventory
- Click "Analyze Market & Recommend Price"
-
Review strategies
- View 2-4 pricing strategies based on market conditions
- Check competitor analysis and market snapshot
- Download detailed logs if needed
| Category | Technology |
|---|---|
| Frontend | Streamlit 1.52+ |
| ML Model | XGBoost, scikit-learn |
| Web Scraping | Selenium, selenium-stealth |
| Search | DuckDuckGo Search API |
| Image Matching | ImageHash, Pillow |
| Text Matching | thefuzz (Levenshtein distance) |
| Data Processing | pandas, numpy |
MarketMind/
βββ .streamlit/
β βββ config.toml # Streamlit theme configuration
βββ src/
β βββ scraper.py # Web scraping with Selenium
β βββ search.py # Competitor URL discovery
β βββ matcher.py # Product similarity matching
β βββ optimizer.py # ML-based price optimization
βββ app.py # Main Streamlit application
βββ demand_model.joblib # Pre-trained XGBoost model
βββ model_features.joblib # Model feature list
βββ requirements.txt # Python dependencies
βββ .gitignore # Git ignore rules
βββ README.md # This file
Your Product URL β Selenium β Extract (Title, Price, Image, Sales Volume)- Launches headless Chrome with anti-detection
- Handles Amazon "Continue Shopping" interstitials
- Extracts data using 20+ CSS/XPath selectors
Product Name β DuckDuckGo Search β Filter URLs β Top 15 Competitors- Searches Amazon & eBay (10 results per site)
- Filters for product pages (
/dp/or/itm/) - De-duplicates and limits to 15 URLs
Image Hash + Fuzzy Title Match β Combined Score β Filter (β₯65%)- Image Matching: Perceptual hashing (60% threshold)
- Title Matching: Token set ratio (75% threshold for text-only)
- Fallback: Title-only if images unavailable
Raw Competitors β Price Validation β Outlier Removal β Valid Set- Removes prices below dynamic threshold (50% of your product price)
- Applies statistical outlier detection (Β±2 standard deviations)
- Filters currency conversion failures
Cost Γ 1.5 β Check vs Market β AI Model β Recommend Price- Calculates target: Cost Γ 1.5 (50% profit)
- If target > market average, caps at market price
- Uses XGBoost to predict demand at various prices
- Recommends optimal price maximizing profit
ideal_price = cost Γ 1.5 # 50% profit margin
if ideal_price <= market_average:
β
Recommend ideal_price
Status: "Great News! Achieve 50% profit"
elif ideal_price > market_average:
β οΈ Cap at market_average
Status: "Tight Margins - Consider lower profit"
elif cost >= market_average:
β ERROR: Unprofitable product
Status: "Cannot sell profitably"if has_images:
score = (title_similarity Γ 0.6) + (image_similarity Γ 0.4)
threshold = 65%
else:
score = title_similarity
threshold = 75%Supports 40+ currencies including:
- Major: USD, EUR, GBP, JPY, CHF, CAD, AUD, NZD
- Asian: CNY, INR, KRW, SGD, HKD, THB, MYR, PHP, VND
- European: SEK, NOK, DKK, PLN, CZK, HUF, RON
- Middle East/Africa: AED, SAR, ILS, ZAR, EGP, TRY
- Latin America: MXN, BRL, ARS, CLP, COP
See app.py:DEFAULT_RATES_TO_USD for complete list.
Adjust profit margin:
# In app.py line 514
ideal_price = user_cost_per_unit * 1.5 # Change 1.5 to desired multiplierAdjust competitor limit:
# In app.py line 281
max_results_per_site=10 # Change to desired number per siteAdjust similarity threshold:
# In app.py line 322
if combined_similarity_score >= 65: # Change 65 to stricter/looser value- Scraping Speed: ~30 seconds per URL (industry standard)
- Competitor Analysis: ~7-10 minutes for 15 competitors
- Success Rate: 70-85% (depends on Amazon rate limiting)
- Accuracy: Similarity matching >90% for exact products
- Amazon Rate Limiting: Amazon may temporarily block after multiple requests. Wait 5-10 minutes and retry.
- Scraping Speed: ~30s per product is necessary to avoid bot detection.
- Regional Variations: Prices may vary by Amazon region (.com vs .co.uk, etc.).
- Model Accuracy: ML predictions are estimates based on synthetic training data.
Contributions are welcome! Please feel free to submit a Pull Request.
# Fork the repo and clone
git clone https://github.com/MD-Code404/MarketMind.git
# Create a feature branch
git checkout -b feature/amazing-feature
# Make changes and test
streamlit run app.py
# Commit and push
git add .
git commit -m "Add amazing feature"
git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
- Streamlit - Beautiful web framework
- Selenium - Robust web automation
- XGBoost - Powerful ML library
- DuckDuckGo - Privacy-focused search API
For questions or support, please open an issue on GitHub.
If you find MarketMind useful, please consider giving it a star! β
Made with β€οΈ for e-commerce sellers worldwide