Tutorial

How to Find Winning Amazon Products with Scavio

Replace dashboard clicking with a Python script that finds winning Amazon products using ASIN search, ratings filter, and custom scoring.

Finding winning Amazon products in 2026 is a script, not a dashboard cycle. The criteria are simple: high demand (BSR), low review count (room to compete), good rating (4.0+). This tutorial walks the script that runs the discovery in 60 seconds for under $1 in fast-tier credits.

Prerequisites

  • Python 3.10+
  • Scavio API key

Walkthrough

Step 1: Search a category

Scavio Amazon search returns top sellers.

Python
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']

def search(category):
    r = requests.post('https://api.scavio.dev/api/v1/amazon/search',
        headers={'x-api-key': API_KEY},
        json={'query': category, 'sort_by': 'best_sellers'})
    return r.json().get('products', [])

Step 2: Filter by criteria

Pre-filter by review count and rating to save calls.

Python
def filter_winners(products, max_reviews=200, min_rating=4.0):
    return [p for p in products if p.get('review_count', 0) <= max_reviews and p.get('rating', 0) >= min_rating]

Step 3: Fetch full product detail per winner

Per-ASIN call returns pricing, fulfillment, seller info.

Python
def fetch(asin):
    r = requests.post('https://api.scavio.dev/api/v1/amazon/product',
        headers={'x-api-key': API_KEY},
        json={'asin': asin})
    return r.json()

Step 4: Score against your criteria

Custom scoring formula by demand, competition, price.

Python
def score(p):
    bsr = p.get('best_sellers_rank', 99999)
    revs = p.get('review_count', 9999)
    price = p.get('price', 0)
    return (1/bsr * 1e6) - (revs * 5) + (price * 2)

Step 5: Emit ranked CSV

Top 25 ASINs with score for niche review.

Python
import csv
def emit(category):
    products = filter_winners(search(category))
    detailed = [fetch(p['asin']) for p in products[:50]]
    ranked = sorted(detailed, key=score, reverse=True)[:25]
    with open(f'{category}.csv', 'w') as f:
        w = csv.DictWriter(f, fieldnames=['asin','title','price','rating','review_count','score'])
        w.writeheader()
        for r in ranked: w.writerow({**r, 'score': score(r)})

Python Example

Python
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']

def discover(category):
    s = requests.post('https://api.scavio.dev/api/v1/amazon/search',
        headers={'x-api-key': API_KEY},
        json={'query': category, 'sort_by': 'best_sellers'}).json()
    return [p for p in s.get('products', []) if p.get('review_count',0) <= 200 and p.get('rating',0) >= 4]

for p in discover('wireless earbuds')[:10]:
    print(p.get('asin'), p.get('title'), p.get('rating'))

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
export async function discover(category) {
  const r = await fetch('https://api.scavio.dev/api/v1/amazon/search', { method:'POST', headers:{'x-api-key':API_KEY,'Content-Type':'application/json'}, body: JSON.stringify({ query: category, sort_by: 'best_sellers' }) });
  const data = await r.json();
  return (data.products || []).filter(p => p.review_count <= 200 && p.rating >= 4);
}

Expected Output

JSON
Ranked CSV of 25 ASINs in the category meeting your criteria. Total runtime ~60 seconds, total cost under $1 in fast-tier credits.

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.10+. Scavio API key. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 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

Replace dashboard clicking with a Python script that finds winning Amazon products using ASIN search, ratings filter, and custom scoring.