ScavioScavio
FeaturesPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Automate Product Research for Dropshipping with APIs
Tutorial

How to Automate Product Research for Dropshipping with APIs

Automate dropshipping product research by querying Amazon and Walmart via the Scavio API. Find profitable products by comparing prices, ratings, and demand signals.

Get Free API KeyAPI Docs

Successful dropshipping starts with finding products that have strong demand, good margins, and manageable competition. Manual product research across Amazon and Walmart is tedious and slow. This tutorial builds an automated product research pipeline that queries both platforms via the Scavio API, calculates potential margins from price differences, filters by review quality, and outputs a ranked list of product opportunities.

Prerequisites

  • Python 3.10 or higher
  • requests library installed
  • A Scavio API key
  • A list of product niches to research

Walkthrough

Step 1: Define product niches to research

Start with broad product categories that tend to perform well in dropshipping. The script will search both platforms for each niche.

Python
NICHES = [
    "portable blender",
    "posture corrector",
    "led strip lights",
    "phone tripod",
]

Step 2: Search both platforms for each niche

Query Amazon and Walmart through the Scavio API and collect the top products from each.

Python
from concurrent.futures import ThreadPoolExecutor

def search_platform(platform: str, query: str) -> list[dict]:
    r = requests.post(
        "https://api.scavio.dev/api/v1/search",
        headers={"x-api-key": API_KEY},
        json={"platform": platform, "query": query, "marketplace": "US"}
    )
    r.raise_for_status()
    return r.json().get("products", [])[:10]

def research_niche(niche: str) -> dict:
    with ThreadPoolExecutor(max_workers=2) as ex:
        amazon_fut = ex.submit(search_platform, "amazon", niche)
        walmart_fut = ex.submit(search_platform, "walmart", niche)
        return {"amazon": amazon_fut.result(), "walmart": walmart_fut.result()}

Step 3: Score products by opportunity

Calculate an opportunity score based on price, rating, and review volume. Higher ratings with lower competition signal good opportunities.

Python
def score_product(product: dict) -> float:
    price = float(product.get("price", "0").replace("$", "").replace(",", "") or 0)
    rating = float(product.get("rating", "0") or 0)
    reviews = int(product.get("reviews_count", 0) or 0)
    if price < 10 or price > 200:
        return 0
    review_score = min(reviews / 1000, 5)
    return round(rating * review_score * (1 if 20 < price < 80 else 0.5), 2)

Step 4: Output ranked opportunities

Sort all products across both platforms by opportunity score and print the top candidates.

Python
def find_opportunities(niches: list[str]) -> list[dict]:
    all_products = []
    for niche in niches:
        data = research_niche(niche)
        for platform, products in data.items():
            for p in products:
                p["platform"] = platform
                p["niche"] = niche
                p["score"] = score_product(p)
                all_products.append(p)
    return sorted(all_products, key=lambda x: x["score"], reverse=True)[:20]

Python Example

Python
import os
import requests
from concurrent.futures import ThreadPoolExecutor

API_KEY = os.environ.get("SCAVIO_API_KEY", "your_scavio_api_key")
ENDPOINT = "https://api.scavio.dev/api/v1/search"
NICHES = ["portable blender", "posture corrector", "led strip lights"]

def search(platform: str, query: str) -> list[dict]:
    r = requests.post(ENDPOINT, headers={"x-api-key": API_KEY},
                      json={"platform": platform, "query": query, "marketplace": "US"})
    r.raise_for_status()
    return r.json().get("products", [])[:10]

def score(p: dict) -> float:
    price = float((p.get("price") or "0").replace("$", "").replace(",", "") or 0)
    rating = float(p.get("rating") or 0)
    if price < 10 or price > 200 or rating < 3.5:
        return 0
    return round(rating * min(int(p.get("reviews_count") or 0) / 500, 5), 2)

if __name__ == "__main__":
    results = []
    for niche in NICHES:
        for platform in ["amazon", "walmart"]:
            for p in search(platform, niche):
                p["score"] = score(p)
                p["src"] = platform
                results.append(p)
    for p in sorted(results, key=lambda x: x["score"], reverse=True)[:10]:
        print(f"[{p['src']}] {p.get('title', '')[:50]} | {p.get('price')} | score: {p['score']}")

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY || "your_scavio_api_key";
const ENDPOINT = "https://api.scavio.dev/api/v1/search";

async function search(platform, query) {
  const res = await fetch(ENDPOINT, {
    method: "POST",
    headers: { "x-api-key": API_KEY, "Content-Type": "application/json" },
    body: JSON.stringify({ platform, query, marketplace: "US" })
  });
  const data = await res.json();
  return (data.products || []).slice(0, 10);
}

async function main() {
  const niches = ["portable blender", "posture corrector"];
  const results = [];
  for (const niche of niches) {
    const [amazon, walmart] = await Promise.all([
      search("amazon", niche), search("walmart", niche)
    ]);
    amazon.forEach(p => results.push({ ...p, src: "amazon" }));
    walmart.forEach(p => results.push({ ...p, src: "walmart" }));
  }
  results.forEach(p => {
    const price = parseFloat((p.price || "0").replace(/[$,]/g, ""));
    p.score = price > 10 && price < 100 ? parseFloat(p.rating || 0) * 2 : 0;
  });
  results.sort((a, b) => b.score - a.score).slice(0, 10)
    .forEach(p => console.log(`[${p.src}] ${p.title?.slice(0, 50)} | ${p.price}`));
}
main().catch(console.error);

Expected Output

JSON
[amazon] BlendJet 2 Portable Blender | $29.99 | score: 22.5
[walmart] Portable Blender USB Rechargeable | $19.99 | score: 18.0
[amazon] VOKKA Posture Corrector for Men and Women | $25.99 | score: 17.5
[amazon] Govee LED Strip Lights 50ft | $34.99 | score: 16.8

Related Tutorials

  • How to Build a Price Comparison Tool for Amazon and Walmart
  • How to Monitor Amazon Prices Across Multiple ASINs

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 or higher. requests library installed. A Scavio API key. A list of product niches to research. 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.

Related Resources

Best Of

Best Dropshipping Research APIs for Product Discovery (2026)

Read more
Best Of

Best API for Dropshipping Product Research in 2026

Read more
Use Case

Walmart Seller Product Intelligence

Read more
Use Case

Dropship Product Research via API

Read more
Glossary

Walmart Product Data API Landscape (2026)

Read more
Solution

Product Validation via Search APIs

Read more

Start Building

Automate dropshipping product research by querying Amazon and Walmart via the Scavio API. Find profitable products by comparing prices, ratings, and demand signals.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy