DEV Community

Gio Rich
Gio Rich

Posted on

Is ordering 5,000 worth it? Measuring Alibaba volume discounts and lead times with Python

I built this actor; it's a paid tool on Apify with a free trial credit.

My first post about this scraper built a supplier comparison at one order size. This one asks the question that comes before it: how much does a bigger order actually save, and what does it cost you in time? Alibaba product pages show a quantity price ladder ("2-99 pieces $3.80, 100-499 $2.90 ...") and a lead-time table by quantity. Both are easy to misread by eye, so I measured them.

The data

One real run of Alibaba Product Details Scraper on 28 Oct 2026: the yoga mat keyword plus three wireless-earbud product URLs, 20 products from 14 suppliers. Each row carries priceTiers (min/max quantity and price), leadTimes (quantity range and days), samplePrice, moq and supplierId.

from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("rel8ble/alibaba-product-details-scraper").call(run_input={
    "searchTerms": ["yoga mat"],
    "maxProductsPerSearch": 40,
    "includeAds": False,
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
Enter fullscreen mode Exit fullscreen mode

The script

import statistics

def lead_days(p, qty):
    for l in p["leadTimes"]:
        if l["minQuantity"] <= qty <= (l["maxQuantity"] or 10**9):
            return l["days"]
    return None

ladders, seen = [], {}
for p in items:
    tiers = p["priceTiers"] or []
    if len(tiers) < 2:
        continue                      # one price only: nothing to measure
    key = (p["supplierId"], tuple((t["minQuantity"], t["price"]) for t in tiers))
    seen[key] = seen.get(key, 0) + 1  # same supplier + same ladder = template pricing
    first, last = tiers[0], tiers[-1]
    ladders.append({
        "title": p["title"][:34],
        "first": f'{first["minQuantity"]} @ ${first["price"]}',
        "last": f'{last["minQuantity"]} @ ${last["price"]}',
        "off": round((first["price"] - last["price"]) / first["price"] * 100, 1),
        "lead_small": lead_days(p, first["minQuantity"]),
        "lead_1000": lead_days(p, 1000),
        "key": key,
    })

for l in sorted(ladders, key=lambda l: -l["off"]):
    dup = f'  (same ladder on {seen[l["key"]]} listings)' if seen[l["key"]] > 1 else ""
    print(f'{l["off"]:>5}% off  {l["first"]:>13} -> {l["last"]:<15} '
          f'lead {l["lead_small"] or "?"}d -> {l["lead_1000"] or "?"}d @1000  {l["title"]}{dup}')

print(f'\n{len(ladders)} of {len(items)} listings have a price ladder; '
      f'median discount first->last tier {statistics.median(l["off"] for l in ladders)}%')
Enter fullscreen mode Exit fullscreen mode

What came out

 42.1% off       2 @ $3.8 -> 10000 @ $2.2    lead 7d -> 15d @1000  Extra Large Wide Yoga Mat Thick No  (same ladder on 3 listings)
 42.1% off       2 @ $3.8 -> 10000 @ $2.2    lead 7d -> 15d @1000  Premium Natural Rubber Cork Yoga M  (same ladder on 3 listings)
 42.1% off       2 @ $3.8 -> 10000 @ $2.2    lead 7d -> 15d @1000  Eco Friendly Non Slip TPE Yoga Mat  (same ladder on 3 listings)
 34.3% off      10 @ $9.9 -> 5000 @ $6.5     lead 31d -> 35d @1000  ALOVA Latest Model Bluetooth 6.0 E
 22.6% off    20 @ $12.85 -> 5000 @ $9.95    lead 31d -> 31d @1000  Sansd Custom Logo Yoga 5mm Thick O
 16.1% off     50 @ $1.99 -> 100000 @ $1.67  lead 7d -> 35d @1000  True Wireless Earbuds with HIFI So
  9.4% off      2 @ $13.8 -> 5000 @ $12.5    lead 10d -> ?d @1000  Custom L Oval Shaped Arch Pill Sha
  9.4% off      2 @ $13.8 -> 5000 @ $12.5    lead 31d -> 31d @1000  Eco Friendly Custom Wholesale Cust
  8.0% off    100 @ $6.23 -> 50000 @ $5.73   lead 7d -> 30d @1000  U18 Bass Stereo Bluetooth Wireless
  7.8% off     20 @ $5.12 -> 500 @ $4.72     lead 7d -> ?d @1000  Cross-border Wholesale Yiwu Double
  7.4% off     1 @ $12.49 -> 1000 @ $11.56   lead 31d -> 50d @1000  Jiuzilong High Quality Pilates Eco
  7.2% off      2 @ $13.8 -> 5000 @ $12.8    lead 32d -> 32d @1000  Wave Edge PU Natural Rubber Yoga M
  4.6% off     2 @ $11.28 -> 500 @ $10.76    lead 31d -> 31d @1000  Custom Design Solid Plain Nude Col

13 of 20 listings have a price ladder; median discount first->last tier 9.4%
Enter fullscreen mode Exit fullscreen mode

Four things I didn't expect:

  1. The typical ladder is shallow. Median saving from the first tier to the last was 9.4%, and the last tier is often 5,000 or 10,000 pieces. For most of these products, ordering 50x more saves less than a tenth on the unit price. That makes a small first order much cheaper in risk than it looks.
  2. The steepest ladder was a template. The top three rows are three different mats (rubber-cork, TPE, extra-wide) from one supplier with the identical $3.80 / $2.90 / $2.30 / $2.20 ladder. Different materials don't cost the same to make, so read that as "ask me for a quote", not as a real price. Grouping by supplierId plus the ladder catches it in one line.
  3. Lead time grows faster than price falls. The HIFI earbuds go from 7 days at 50 pieces to 35 days at 1,000 for a 16% lower unit price at the very top tier. For a seller testing demand, five weeks of waiting can cost more than the discount.
  4. 7 of 20 pages had no ladder at all, just one price. Those are the ones to message: a single price usually means the supplier wants to negotiate.

Samples were the other surprise. Five products list a sample price, and it ran 1.3x to 3x the first-tier unit price ($22 vs $9.90, $30 vs $12.85, $15 vs $11.28, $38 vs $12.49, $25 vs $13.80), before shipping. Budget for it when you compare suppliers.

Things to know

  • Price: $0.95 per 1,000 products, no start fee. Failed requests and removed products are never charged.
  • Ladders are list prices shown to a US visitor (FOB, USD). Real quotes move, especially for custom logos and colors.
  • leadTimes brackets don't always reach your quantity (the ? rows); above the last bracket the supplier says "to be negotiated".
  • This is a 20-product snapshot of two categories. Run it on your own category before you trust the 9.4%.

Alibaba Product Details Scraper on Apify ยท Python repo: alibaba-product-details-scraper-python

This article was drafted with AI and published by me.

Need a custom scraper or a ready dataset? Hire me on Fiverr: https://www.fiverr.com/rel8ble

Top comments (0)