CLI tool to interact with Shopee Malaysia from the terminal.
Search products, view details, and check your orders — all without opening a browser.
Shopee uses aggressive anti-bot measures (device fingerprinting, encrypted headers, CAPTCHAs). Instead of trying to reverse-engineer these, shopee-cli runs an off-screen Chrome browser via undetected-chromedriver and executes requests in a real browser context. The browser window is hidden — you just interact through the CLI.
For features that require login (orders), you authenticate once via shopee login, which opens a visible Chrome window for manual login. Session cookies are saved locally and reused until they expire.
Requires Python 3.12+ and Chrome installed.
# Clone and install
git clone https://github.com/shroominic/shopee-cli.git
cd shopee-cli
uv sync
# Or install with pip
pip install .shopee search "mechanical keyboard"
shopee search "phone case" --limit 10 --sort price# By URL
shopee product "https://shopee.com.my/Product-Name-i.123456.789012"
# By shop_id.item_id
shopee product 123456.789012shopee loginOpens Chrome for manual login. Cookies are saved to ~/.config/shopee-cli/.
shopee orders
shopee orders --status "Shipping" --limit 10If Shopee triggers a CAPTCHA, shopee-cli will:
- Attempt auto-solving via 2captcha (if
2CAPTCHA_API_KEYis set) - Fall back to opening a visible browser for manual solving
To enable auto-solving, set the API key:
export 2CAPTCHA_API_KEY=your_key_hereAll data is stored in ~/.config/shopee-cli/:
| File | Purpose |
|---|---|
cookies.json |
Session cookies (auto-expires after 24h) |
chrome-profile/ |
Persistent Chrome profile |
# Install dependencies
uv sync
# Run from source
uv run shopee --help
# Scripts for API exploration
python scripts/explore_api.py /search/search_items keyword=phone limit=5
python scripts/capture_traffic.pyMIT