Tutorial

How to Build a Multi-Platform Dropshipping Price Scanner

Scan Amazon, Walmart, and Google Shopping for product prices daily. Alert on deals and track price history. Python pipeline at $0.005/query.

Dropshipping margins depend on catching price differences across platforms. A product selling for $25 on Amazon might be $19 on Walmart or $22 on Google Shopping. This scanner checks prices across all three platforms daily, tracks history, and alerts when margins open up. Each platform check costs $0.005 through Scavio, so scanning 50 products across 3 platforms costs $0.75/day.

Prerequisites

  • Python 3.8+
  • requests library
  • A Scavio API key from scavio.dev
  • A list of products or ASINs to track

Walkthrough

Step 1: Search products across platforms

Query the same product on Amazon, Walmart, and Google Shopping.

Python
import os, requests, json, re
from datetime import datetime

API_KEY = os.environ['SCAVIO_API_KEY']
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}

def search_product(query, platform):
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': query, 'platform': platform, 'country_code': 'us'}).json()
    results = data.get('organic_results', data.get('shopping_results', []))[:3]
    parsed = []
    for r in results:
        price_str = str(r.get('price', '')).replace('$', '').replace(',', '')
        try: price = float(re.search(r'[\d.]+', price_str).group())
        except: price = None
        parsed.append({'title': r.get('title', '')[:60], 'price': price,
                       'rating': r.get('rating', 'N/A'), 'link': r.get('link', '')})
    return parsed

def multi_platform_search(product):
    results = {}
    for platform in ['amazon', 'walmart', 'google']:
        results[platform] = search_product(product, platform)
    return results

results = multi_platform_search('wireless earbuds')
for platform, items in results.items():
    if items and items[0]['price']:
        print(f'  {platform:10}: ${items[0]["price"]:.2f} - {items[0]["title"][:40]}')

Step 2: Find price differences across platforms

Compare prices for the same product across platforms and calculate margins.

Python
def find_margins(product):
    results = multi_platform_search(product)
    prices = {}
    for platform, items in results.items():
        if items and items[0]['price']:
            prices[platform] = {'price': items[0]['price'], 'title': items[0]['title']}
    if len(prices) < 2:
        return None
    lowest = min(prices.items(), key=lambda x: x[1]['price'])
    highest = min(prices.items(), key=lambda x: x[1]['price'])
    margins = []
    platforms = list(prices.keys())
    for i in range(len(platforms)):
        for j in range(i+1, len(platforms)):
            p1, p2 = platforms[i], platforms[j]
            diff = abs(prices[p1]['price'] - prices[p2]['price'])
            if diff > 0:
                buy_from = p1 if prices[p1]['price'] < prices[p2]['price'] else p2
                sell_on = p2 if buy_from == p1 else p1
                margin_pct = diff / prices[buy_from]['price'] * 100
                margins.append({'product': product, 'buy_from': buy_from,
                    'buy_price': prices[buy_from]['price'],
                    'sell_on': sell_on, 'sell_price': prices[sell_on]['price'],
                    'margin': round(diff, 2), 'margin_pct': round(margin_pct, 1)})
    return margins

margins = find_margins('wireless earbuds')
if margins:
    for m in margins:
        print(f'  Buy on {m["buy_from"]:10} ${m["buy_price"]:7.2f} -> Sell on {m["sell_on"]:10} ${m["sell_price"]:7.2f} | Margin: ${m["margin"]} ({m["margin_pct"]}%)')

Step 3: Track prices over time

Store daily prices and detect significant changes.

Python
import sqlite3

db = sqlite3.connect('price_tracker.db')
db.execute('''CREATE TABLE IF NOT EXISTS prices (
    product TEXT, platform TEXT, price REAL, checked_at TEXT
)''')
db.commit()

def track_price(product, platform, price):
    db.execute('INSERT INTO prices VALUES (?,?,?,?)',
        (product, platform, price, datetime.now().isoformat()))
    db.commit()

def price_change(product, platform):
    rows = db.execute(
        'SELECT price, checked_at FROM prices WHERE product=? AND platform=? ORDER BY checked_at DESC LIMIT 2',
        (product, platform)).fetchall()
    if len(rows) < 2: return None
    curr, prev = rows[0][0], rows[1][0]
    if curr == prev: return None
    change = ((curr - prev) / prev) * 100
    return {'product': product, 'platform': platform, 'prev': prev, 'curr': curr, 'change': round(change, 1)}

def daily_scan(products):
    alerts = []
    for product in products:
        results = multi_platform_search(product)
        for platform, items in results.items():
            if items and items[0]['price']:
                track_price(product, platform, items[0]['price'])
                change = price_change(product, platform)
                if change and abs(change['change']) > 5:
                    alerts.append(change)
    cost = len(products) * 3 * 0.005  # 3 platforms each
    print(f'Scanned {len(products)} products x 3 platforms. Cost: ${cost:.3f}')
    for a in alerts:
        print(f'  ALERT: {a["product"]} on {a["platform"]}: ${a["prev"]} -> ${a["curr"]} ({a["change"]:+.1f}%)')

daily_scan(['wireless earbuds', 'portable charger', 'phone case'])

Step 4: Generate daily margin report

Combine price tracking with margin analysis for a daily opportunity report.

Python
def margin_report(products):
    print(f'\n=== Dropshipping Margin Report - {datetime.now().strftime("%Y-%m-%d")} ===')
    opportunities = []
    total_cost = 0
    for product in products:
        margins = find_margins(product)
        total_cost += 3 * 0.005  # 3 platform searches
        if margins:
            for m in margins:
                if m['margin_pct'] > 10:  # Only significant margins
                    opportunities.append(m)
    opportunities.sort(key=lambda x: x['margin_pct'], reverse=True)
    print(f'\nOpportunities (>{10}% margin):')
    for o in opportunities[:10]:
        print(f'  {o["product"]:25} | Buy: {o["buy_from"]:8} ${o["buy_price"]:6.2f} | Sell: {o["sell_on"]:8} ${o["sell_price"]:6.2f} | {o["margin_pct"]}%')
    print(f'\nTotal cost: ${total_cost:.3f}')
    print(f'Products scanned: {len(products)}')
    print(f'Opportunities found: {len(opportunities)}')

margin_report(['wireless earbuds', 'portable charger', 'phone case', 'laptop stand', 'ring light'])

Python Example

Python
import os, requests, re
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}

def compare_prices(product):
    for platform in ['amazon', 'walmart', 'google']:
        data = requests.post('https://api.scavio.dev/api/v1/search',
            headers=SH, json={'query': product, 'platform': platform, 'country_code': 'us'}).json()
        top = (data.get('organic_results') or [{}])[0]
        price = top.get('price', 'N/A')
        print(f'{platform:10}: {price:>10} | {top.get("title", "N/A")[:40]}')
    print(f'Cost: $0.015 (3 searches)')

compare_prices('wireless earbuds')

JavaScript Example

JavaScript
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
async function comparePrices(product) {
  for (const platform of ['amazon', 'walmart', 'google']) {
    const data = await fetch('https://api.scavio.dev/api/v1/search', {
      method: 'POST', headers: SH,
      body: JSON.stringify({ query: product, platform, country_code: 'us' })
    }).then(r => r.json());
    const top = (data.organic_results || [{}])[0];
    console.log(`${platform.padEnd(10)}: ${(top.price||'N/A').toString().padStart(10)} | ${(top.title||'N/A').slice(0,40)}`);
  }
}
await comparePrices('wireless earbuds');

Expected Output

JSON
  amazon    : $24.99 - Sony WF-1000XM5 Wireless Earbuds
  walmart   : $19.88 - Sony WF-1000XM5 True Wireless
  google    : $22.50 - Sony WF-1000XM5 Earbuds

  Buy on walmart   $ 19.88 -> Sell on amazon    $ 24.99 | Margin: $5.11 (25.7%)
  Buy on walmart   $ 19.88 -> Sell on google    $ 22.50 | Margin: $2.62 (13.2%)

=== Dropshipping Margin Report - 2026-05-19 ===
Opportunities (>10% margin):
  wireless earbuds          | Buy: walmart  $ 19.88 | Sell: amazon   $ 24.99 | 25.7%
  portable charger          | Buy: walmart  $ 12.99 | Sell: amazon   $ 16.49 | 26.9%

Total cost: $0.075

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Python 3.8+. requests library. A Scavio API key from scavio.dev. A list of products or ASINs to track. A Scavio API key gives you 250 free credits per month.

Yes. The free tier includes 250 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Scan Amazon, Walmart, and Google Shopping for product prices daily. Alert on deals and track price history. Python pipeline at $0.005/query.