8000
Skip to content

Latest commit

ย 

History

65 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›’ Shopping Truth Agent

The AI That Tells You What Amazon Won't

Python 3.10+ License: MIT PRs Welcome

Paste any Amazon link. Get the truth in under 10 seconds.

Fake reviews detected. Real prices compared. Expert opinions gathered. AI verdict delivered.




Quick Start ยท How It Works ยท Features ยท API Keys ยท Sample Output


๐Ÿ’ก The Problem

61% of Amazon reviews are fake. You know it. We know it. But you still buy based on them.

Every product page tells you the same story: โญโญโญโญโญ "Great product!" โ€” posted by accounts that reviewed 47 products in one day.

Shopping Truth Agent fixes this. It pulls data from 10+ independent sources, runs fake review detection, compares prices across stores, finds coupons, and gives you an honest BUY / WAIT / AVOID verdict.


โšก Quick Start

git clone https://github.com/sujalmanpara/shopping-agent-marketplace.git
cd shopping-agent-marketplace
pip install -r requirements.txt

Minimum setup โ€” just ONE LLM key required:

# .env file โ€” only one LLM key is required to get started
OPENAI_API_KEY=sk-your-key-here
# Or use: ANTHROPIC_API_KEY / GEMINI_API_KEY / GROK_API_KEY / OPENROUTER_API_KEY

Run it:

import asyncio
from agent.executor import execute

async def main():
    keys = {"OPENAI_API_KEY": "sk-your-key"}
    async for event in execute("https://www.amazon.in/dp/B09R4SF5SP", keys):
        if event["event"] == "status":
            print(event["data"])
        elif event["event"] == "result":
            print(event["data"])

asyncio.run(main())

That's it. No complex setup. No 10 API keys to configure. Just paste a link and get the truth.


๐Ÿ” How It Works

๐Ÿ“Ž Paste Amazon Link
        โ”‚
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ๐Ÿ”„ Parallel Data Collection (3-8s)     โ”‚
โ”‚                                         โ”‚
โ”‚  Amazon Product Page โ”€โ”€โ–บ Price, specs   โ”‚
โ”‚  Rating Widget โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ 2000+ ratings  โ”‚
โ”‚  YouTube โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Video reviews  โ”‚
โ”‚  Google Shopping โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Price compare  โ”‚
โ”‚  Wirecutter โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Expert picks   โ”‚
โ”‚  RTINGS โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Lab-tested     โ”‚
โ”‚  Trustpilot โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Brand trust    โ”‚
โ”‚  Reddit โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Real opinions  โ”‚
โ”‚  Keepa โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Price history  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ๐Ÿง  AI Analysis (<2s)                   โ”‚
โ”‚                                         โ”‚
โ”‚  Fake Review Detection (star patterns)  โ”‚
โ”‚  Price Benchmarking (vs category avg)   โ”‚
โ”‚  Review Quality Scoring                 โ”‚
โ”‚  Timeline Analysis (organic vs fake)    โ”‚
โ”‚  Coupon & Cashback Finder               โ”‚
โ”‚  Alternative Product Search             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚
        โ–ผ
   ๐ŸŽฏ BUY / WAIT / AVOID

Total time: 5-15 seconds depending on your connection.


๐ŸŽ What You Get

๐Ÿ“ฆ Product Intelligence

  • Price with context โ€” Is โ‚น24,990 a good price? Agent tells you it's 10% below category average.
  • Star distribution analysis โ€” A J-shaped curve (90% 5-star + 10% 1-star) = fake farm. Natural products have a bell curve.
  • Review quality scoring โ€” Detailed reviews vs one-liners. Verified purchases vs unverified.

๐Ÿ•ต๏ธ Fake Review Detection

  • Star distribution analysis from 2,000+ ratings (not just the 8 reviews on the page)
  • J-score metric โ€” detects the signature pattern of paid review farms
  • Review timeline analysis โ€” organic products gain reviews steadily, fakes get 500 reviews in one week
  • Keyword flagging โ€” detects generic praise patterns

๐Ÿ’ฐ Price Intelligence

  • Cross-store comparison โ€” Same product on Amazon, Flipkart, brand stores, and 5+ retailers
  • Category benchmarking โ€” "This AC costs 10% less than similar models"
  • Best deal calculator โ€” Combines cashback + credit card rewards for actual lowest price
  • Price history โ€” Was it cheaper last month? (with Keepa API key)

๐Ÿ’ณ Savings Engine

  • Cashback platforms โ€” CashKaro, Magicpin, Amazon Pay
  • Credit card rewards โ€” ICICI Amazon Pay (5%), HDFC Millennia (5%), Axis Flipkart (5%)
  • UPI cashback โ€” Amazon Pay UPI deals
  • Coupon codes โ€” Automatically discovered from multiple sources

๐Ÿ“บ Expert & Community Reviews

  • YouTube โ€” Top video reviews with view counts
  • Wirecutter โ€” New York Times expert picks
  • RTINGS โ€” Lab-tested ratings for electronics
  • Trustpilot โ€” Brand reputation scores
  • Reddit โ€” Real user experiences (with API key)

๐Ÿค– AI Verdict

Clear, actionable advice powered by your choice of LLM:

  • BUY โœ… โ€” Good product, fair price, real reviews
  • WAIT โณ โ€” Price drop expected or better alternative exists
  • AVOID ๐Ÿšซ โ€” Fake reviews, overpriced, or quality issues

๐Ÿ”‘ API Keys โ€” Optional Upgrades

The agent works with just ONE key (any LLM provider). Everything else is optional.

Key What It Adds Free Tier Cost
LLM Key (Required) AI verdicts & summaries โ€” Varies
OPENAI_API_KEY GPT-4 verdicts Pay-per-use ~$0.01/query
ANTHROPIC_API_KEY Claude verdicts Pay-per-use ~$0.01/query
GEMINI_API_KEY Gemini verdicts Free tier! Free
GROK_API_KEY Grok verdicts Pay-per-use ~$0.01/query
Optional โ€” Data Sources
YOUTUBE_API_KEY Better video results Free (10K/day) Free
SERPAPI_KEY Google Shopping prices 100 free/mo $50/mo
RAINFOREST_API_KEY 100+ Amazon reviews โ€” $80/mo
SCRAPINGDOG_API_KEY Bulk Amazon reviews 1,000 free/mo $30/mo
KEEPA_API_KEY Price history graphs โ€” โ‚ฌ19/mo
REDDIT_CLIENT_ID Reddit discussions Free Free
REDDIT_CLIENT_SECRET Reddit discussions Free Free

Without any optional keys, you still get:

โœ… Amazon product data (via stealth browser) โœ… Star distribution from 2,000+ ratings โœ… YouTube video reviews โœ… Google Shopping prices (from residential IPs) โœ… Wirecutter expert reviews โœ… RTINGS lab-tested scores โœ… Trustpilot brand trust โœ… Fake review detection โœ… Price benchmarking โœ… Coupon & cashback finder โœ… AI verdict


๐Ÿ“ธ Sample Output

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘          ๐Ÿ›’  SHOPPING TRUTH AGENT  v2.0         โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

  ๐Ÿ“ฆ Daikin 0.8 Ton 3 Star Split AC
  ๐Ÿท๏ธ  DAIKIN

  ๐Ÿ’ฐ โ‚น24,990     โ˜…โ˜…โ˜…โ˜…โ˜† 4.1/5     ๐Ÿ“ 2,265 reviews

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  โœ…  VERDICT:     GO FOR IT   โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Trust  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘  64%    Fake Risk: ๐ŸŸก LIMITED    Sources: 6/8

  โ•ญโ”€โ”€โ”€ ๐Ÿ’ฒ PRICE CHECK โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
  โ”‚  ๐ŸŸข Good price โ€” 10% below average            โ”‚
  โ”‚  Category avg: โ‚น27,713 โ€ข You: โ‚น24,990 (-10%) โ”‚
  โ”‚  Compared across 10 similar products           โ”‚
  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

  โ•ญโ”€โ”€โ”€ ๐Ÿ† YOUR BEST DEAL โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
  โ”‚  CashKaro + ICICI Amazon Pay Card               โ”‚
  โ”‚  Original:  โ‚น24,990                             โ”‚
  โ”‚  You pay:   โ‚น23,241  ๐Ÿ’š SAVE โ‚น1,749 (7.0% off) โ”‚
  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

  โญ STAR DISTRIBUTION (from 2,265 ratings)
  5โ˜… โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 61%
  4โ˜… โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 18%
  3โ˜… โ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  6%
  2โ˜… โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  3%
  1โ˜… โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 12%
  โœ… Natural distribution โ€” not a fake farm

  ๐Ÿ“บ TOP VIDEO REVIEWS
  ๐ŸŽฌ Daikin 0.8T AC Unboxing โ€” 109K views
  ๐ŸŽฌ Daikin FTL28TV Review  โ€” 94K views

  ๐Ÿ›๏ธ ALTERNATIVES
  1. Lloyd 0.8T 3โ˜… Inverter โ€” โ‚น23,990 (4% cheaper)
  2. Daikin via Better Home  โ€” โ‚น25,989
  3. Havells Classic 0.8T    โ€” โ‚น29,490

  ๐Ÿ” CROSS-STORE PRICES
  Amazon.in:       โ‚น24,990 ๐Ÿ†
  TheACWala:       โ‚น24,990
  Ankur Electric:  โ‚น25,499
  Tradexact:       โ‚น25,800
  Better Home:     โ‚น25,989

  ๐Ÿ’ณ SAVINGS
  โ€ข CashKaro: 2-6% cashback
  โ€ข ICICI Amazon Pay Card: 5% back for Prime ๐Ÿ”ฅ
  โ€ข HDFC Millennia: 5% on Amazon via SmartBuy
  โ€ข Amazon Pay UPI: Up to 10% during sales

  ๐Ÿค– AI VERDICT: BUY
  Wirecutter Top Pick with 4.1โ˜… from 2,265 reviews.
  Price is 10% below average. Consider Lloyd for 4% savings.
  Trustpilot score: 4.9/5. Reliable choice.

  ๐Ÿ“Š SOURCES: โœ… Amazon โ”‚ โœ… YouTube โ”‚ โœ… Google Shopping
              โœ… Wirecutter โ”‚ โœ… RTINGS โ”‚ โœ… Trustpilot

๐Ÿ— Architecture

shopping-agent-marketplace/
โ”œโ”€โ”€ agent/
โ”‚   โ”œโ”€โ”€ executor.py          # Main orchestrator โ€” SSE streaming
โ”‚   โ”œโ”€โ”€ api_layer.py         # 10+ data sources with tiered fallbacks
โ”‚   โ”œโ”€โ”€ analyzers.py         # Fake detection, star analysis, quality scoring
โ”‚   โ”œโ”€โ”€ summarizer.py        # Beautiful terminal output formatter
โ”‚   โ”œโ”€โ”€ price_predictor_arima.py  # ARIMA-based price prediction
โ”‚   โ””โ”€โ”€ coupon_sniper.py     # Coupon & cashback discovery
โ”œโ”€โ”€ .env                     # Your API keys (gitignored)
โ”œโ”€โ”€ requirements.txt         # Python dependencies
โ””โ”€โ”€ README.md

Data Source Priority (Auto-Fallback)

Every source has a tiered fallback chain โ€” the agent tries the best method first and degrades gracefully:

Amazon Product Data:
  Tier 1: Rainforest API (best quality)
  Tier 2: ScrapingDog API
  Tier 3: Camoufox stealth browser
  Tier 4: Direct HTTP with headers

Amazon Reviews:
  Tier 1: Rainforest Reviews API (100+ reviews)
  Tier 2: ScrapingDog Reviews API
  Tier 3: Product page scrape (8 reviews)

Star Distribution:
  โ†’ Amazon Rating Widget (FREE, no auth, 2000+ ratings!)

Google Shopping:
  Tier 1: SerpAPI (structured data)
  Tier 2: Camoufox Google scrape (residential IPs)

YouTube:
  Tier 1: YouTube Data API v3
  Tier 2: YouTube search page scrape

Everything else:
  โ†’ Direct HTTP (always free)

๐ŸŒ Supported Marketplaces

Marketplace Product Data Reviews Price Compare
๐Ÿ‡ฎ๐Ÿ‡ณ Amazon.in โœ… โœ… โœ…
๐Ÿ‡บ๐Ÿ‡ธ Amazon.com โœ… โœ… โœ…
๐Ÿ‡ฌ๐Ÿ‡ง Amazon.co.uk ๐Ÿ”œ ๐Ÿ”œ ๐Ÿ”œ
๐Ÿ‡ฉ๐Ÿ‡ช Amazon.de ๐Ÿ”œ ๐Ÿ”œ ๐Ÿ”œ
More coming โ€” โ€” โ€”

๐Ÿ“š Documentation

Doc What's Inside
Setup Guide Step-by-step setup, all API key signups, troubleshooting
How It Works Full explanation of every analysis module, data sources, scoring
API Reference Function signatures, return types, web server integration

๐Ÿ”’ Privacy & Security

  • Your keys stay local โ€” never sent anywhere except the API providers you configure
  • No tracking โ€” zero analytics, zero telemetry
  • No data stored โ€” results are cached locally for performance only
  • Open source โ€” audit every line of code yourself

๐Ÿš€ Roadmap

  • Multi-source data aggregation (10+ sources)
  • Fake review detection (star distribution + keyword analysis)
  • Price comparison across stores
  • Coupon & cashback discovery
  • YouTube video reviews
  • Expert reviews (Wirecutter, RTINGS)
  • AI verdict with confidence scoring
  • Zero API key mode (works out of the box)
  • Tiered fallback for every data source
  • Price drop prediction (ARIMA model)
  • Browser extension (Chrome/Firefox)
  • Flipkart support
  • Battle Mode (two AIs debate pros/cons)
  • Telegram bot integration
  • Historical price alerts

๐Ÿค Contributing

Contributions welcome! Open an issue first to discuss what you'd like to change.

git clone https://github.com/sujalmanpara/shopping-agent-marketplace.git
cd shopping-agent-marketplace
pip install -r requirements.txt
# Make your changes
# Submit a PR

๐Ÿ“„ License

MIT License โ€” use it however you want. Attribution appreciated but not required.


โญ If this saved you from a bad purchase, star the repo!

โญ Star ยท ๐Ÿ› Report Bug ยท ๐Ÿ’ก Request Feature

Built by @sujalmanpara

About

๐Ÿ›’ AI Shopping Advisor | Multi-platform analysis, fake review detection, price prediction | Save money, avoid regret โญ

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0