Amazon Competitor Analysis (Streamlit)
Simple Streamlit app that:
- Scrapes Amazon product details and search results using Oxylabs Web Scraper API
- Stores products and competitors in local SQLite via SQLModel
- Runs a concise LLM competitor analysis using LangChain + OpenAI Quick start
- Python
- Requires Python 3.13+
-
Install pip install -U pip pip install -e .
-
Environment variables Create a .env or set in your shell:
- OXYLABS_USERNAME – your Oxylabs realtime username
- OXYLABS_PASSWORD – your Oxylabs realtime password
- OPENAI_API_KEY – your OpenAI key (optional; only for LLM analysis) On Windows PowerShell: $env:OXYLABS_USERNAME="your_user" $env:OXYLABS_PASSWORD="your_pass" $env:OPENAI_API_KEY="sk-..."
- Run the app streamlit run main.py
Usage
- Enter ASIN, Zip/Postal code, and select an Amazon domain
- Click "Scrape product" to fetch PDP details
- In "Scraped products", click "Start competitor analysis"
- After competitors are loaded, press "Analyze with LLM" to get a short write-up Notes
- Data is stored in app.db (SQLite) in the project directory.
- This app keeps the UI intentionally minimal.
- Oxylabs API reference: https://developers.oxylabs.io/scraping-solutions/web-scraper-api/targets/amazon