General Questions
How often are prices checked?
How often are prices checked?
The bot automatically checks all tracked product prices every 2 hours.This is configured using a cron job at index.mjs:733:Schedule breakdown:
0- At minute 0*/2- Every 2 hours* * *- Every day, month, day of week
- Trigger manual checks using
/checkcommand - The bot checks prices when you first add a product
What Amazon regions are supported?
What Amazon regions are supported?
The bot works with any Amazon domain including:Regional considerations:
- 🇺🇸 Amazon.com (United States)
- 🇲🇽 Amazon.com.mx (Mexico)
- 🇬🇧 Amazon.co.uk (United Kingdom)
- 🇩🇪 Amazon.de (Germany)
- 🇫🇷 Amazon.fr (France)
- 🇮🇹 Amazon.it (Italy)
- 🇪🇸 Amazon.es (Spain)
- 🇯🇵 Amazon.co.jp (Japan)
- 🇨🇦 Amazon.ca (Canada)
- 🇦🇺 Amazon.com.au (Australia)
- And any other Amazon regional site
The bot extracts prices by looking for common Amazon CSS selectors that work across regions. However, some regional sites may have different page structures.
- Currency symbols are preserved from the page
- Product titles appear in the site’s language
- Price parsing removes non-numeric characters (index.mjs:128)
How much price history is kept?
How much price history is kept?
The bot stores up to 120 price history entries per product.This limit is defined at index.mjs:69:How history works:
- Recording: Every price check adds a new entry (index.mjs:195)
- Trimming: If history exceeds 120 entries, oldest entries are removed (index.mjs:196)
- Storage: History is saved in
prices.jsonwith timestamps
- 120 entries × 2 hours = 240 hours
- ≈ 10 days of continuous tracking
prices.json:Can I track non-Amazon products?
Can I track non-Amazon products?
No, the bot is specifically designed for Amazon products only.Why Amazon-only?The scraper uses Amazon-specific CSS selectors (index.mjs:73-136):Title selectors:Price selectors:These selectors are unique to Amazon’s HTML structure and won’t work on other e-commerce sites.Alternative for other sites:
- Modify the CSS selectors in
scrapeProduct()function - Add conditional logic for different domains
- Test thoroughly with the target site
How are prices compared?
How are prices compared?
The bot uses a simple but effective comparison system:Notification includes (index.mjs:200-204):
Price Storage
Each product stores (index.mjs:182-192):price- Current/most recent pricelowestPrice- Lowest price ever seenhistory- Array of all price checks
Comparison Logic
When checking prices (index.mjs:199):- Previous price (
originalPrice) - New current price (
scraped.price) - Savings amount (dollar difference)
- Savings percentage
- Historical lowest price
Example Scenario
-
Product added: $299.99
price = 299.99lowestPrice = 299.99
-
First check (2 hours later): $289.99
scraped.price (289.99) < originalPrice (299.99)✅- Notification sent: “¡Precio reducido! $10.00 (3.3% menos)”
price = 289.99lowestPrice = 289.99
-
Second check (4 hours later): $289.99
scraped.price (289.99) < originalPrice (289.99)❌- No notification (price unchanged)
-
Third check (6 hours later): $309.99
scraped.price (309.99) < originalPrice (289.99)❌- No notification (price increased)
price = 309.99lowestPrice = 289.99(unchanged)
-
Fourth check (8 hours later): $279.99
scraped.price (279.99) < originalPrice (309.99)✅- Notification sent: “¡Precio reducido! $30.00 (9.7% menos)”
- Also shows lowest: $279.99
The bot only notifies on price decreases, never on increases. This prevents notification fatigue.
What data is stored about my products?
What data is stored about my products?
All product data is stored locally in Fields explained:
prices.json (index.mjs:20).Product data structure:url- Sanitized product URL (without query params)title- Product name from Amazonprice- Most recent pricelowestPrice- Minimum price ever recordedimageUrl- Product image for notificationsaddedDate- When you first added the productaddedBy- Your Telegram chat IDlastChecked- Last time price was scrapedhistory- Up to 120 price/date pairs
- All data stored locally on your server
- No data sent to external services (except Amazon for scraping)
- Chat IDs stored only for notifications
Can multiple users track the same product?
Can multiple users track the same product?
Yes, but with current architecture, products are shared globally.How it works:
- Products are stored by URL as the key (index.mjs:21)
- If User A adds a product, User B sees the same product
- All registered chats receive notifications for all products (index.mjs:223)
- User A adds
amazon.com/dp/B08N5WRWNW - User B tries to add the same URL
- Bot responds:
⚠️ Este producto ya está en seguimiento(index.mjs:404-405)
- Price drops notify all registered chats (index.mjs:223-244)
- Chat registration happens automatically on first message (index.mjs:705-712)
- Consider running separate bot instances per user
- Or modify the code to associate products with specific chat IDs
What happens if Amazon blocks the bot?
What happens if Amazon blocks the bot?
Amazon may occasionally block or challenge automated requests.Bot behavior on blocking:
-
Error logged (index.mjs:165-166):
-
Continues checking other products (index.mjs:170-172)
- Doesn’t stop entire check process
- Updates
lastCheckedtimestamp - Moves to next product
- Retries on next scheduled check (2 hours later)
- Delays between requests: 800-900ms (index.mjs:78, 214)
- Headless browser: Appears more like real user
- Reasonable check frequency: Every 2 hours, not aggressive
- Browser flags:
--no-sandboxfor compatibility (index.mjs:148)
- Multiple consecutive scraping failures
- “Título no encontrado” errors
- “Precio inválido” errors
- Captcha pages (not handled by bot)
- Wait several hours before retrying
- Reduce check frequency (modify cron at index.mjs:733)
- Track fewer products simultaneously
- Use residential proxy (requires code modification)
Does the bot work with Amazon deals/lightning deals?
Does the bot work with Amazon deals/lightning deals?
Partially - the bot can track deals, but with limitations.What works:Best practices:
- Tracking current deal prices
- Detecting when deal price drops further
- Recording deal price in history
- Product normally $100
- Lightning deal: $60 (you add it)
- Bot tracks at $60
- Deal expires, price returns to $100
- Bot sees 60, no notification sent
- Bot continues tracking at $100
- Add products before deals start for better tracking
- Use
/chartto see when deal occurred in history - Manually remove products after deals expire if desired
Can I export my price data?
Can I export my price data?
Yes, the data is already in JSON format and easy to export.Manual export:Saved format (index.mjs:43):
-
Copy the data file:
-
Convert to CSV (using jq):
-
Extract history for specific product:
Command Questions
What's the difference between /list and /stats?
What's the difference between /list and /stats?
Both commands show product information, but with different purposes:
/list Command (index.mjs:489)
- Shows interactive menu of all products
- Click products to see details
- Buttons to delete all or check prices
- Best for: Managing your products
/stats Command (index.mjs:492-517)
- Shows aggregate statistics:
- Total products tracked
- Total chats registered
- Potential savings detected
- Products with price reductions
- Best for: Overview of activity
/stats output:How do I use the /edit command?
How do I use the /edit command?
The Example:What happens (index.mjs:545-610):
/edit command updates a product’s URL while preserving history.Syntax:- Bot scrapes the new URL
- Transfers existing history
- Preserves
addedDateandaddedBy - Keeps
lowestPricefrom both old and new - Deletes old URL entry
- Creates new URL entry
- Product URL changed (Amazon redirects)
- Wrong product added by mistake
- Variant changed (different size/color)
The lowest price is preserved across both URLs, so you won’t lose historical minimum pricing.
What does the /chart command show?
What does the /chart command show?
The Requirements (index.mjs:313-314):
/chart command generates a visual price history graph.Usage:- At least 2 history entries (minimum 4 hours of tracking)
- Valid product URL that you’re tracking
- X-axis: Timestamps (date/time)
- Y-axis: Price values
- Line graph showing price changes over time
- Product title as chart title
- Generated using Chart.js (index.mjs:268)
- Rendered via Playwright browser screenshot (index.mjs:253-307)
- Image size: 900×420 pixels (index.mjs:266)
- Sent as photo to Telegram
Need More Help?
If your question isn’t answered here:- Check the Troubleshooting guide for technical issues
- Review the Contributing guide if you want to extend functionality
- Open an issue on GitHub with your question