DEV Community

Taocarts跨境
Taocarts跨境

Posted on AI-assisted

How We Built a Dual-Source Price Comparison Engine for Taobao and 1688

How We Built a Dual-Source Price Comparison Engine for Taobao and 1688

A surprising number of China-to-overseas resellers source from only one platform. They have a Taobao habit or an 1688 habit and never look at the other. The gap between the two prices for the same item is often 10–20%, and that spread is pure margin walking out the door. We built a dual-source comparison engine inside Taocarts, the system that bundles sourcing, forwarding, and warehousing for reverse-Taobao resellers, to make that gap visible automatically.

The core problem: identity, not price

Comparing prices sounds trivial until you try it. The same product exists on Taobao and 1688 under completely different listing ids, titles, and image sets. There is no shared SKU. A naive "search both and diff the first result" produces garbage because the top hit on each side is rarely the same physical item.

So the real work is item identity resolution, not price fetching.

How we resolve identity

We anchor on the manufacturer or model code when it exists (clothing has craft codes, electronics have model numbers), then use a weighted similarity score over title tokens, main-image perceptual hash, and spec table. Anything above a threshold is treated as the same item and linked into a comparison group. Below the threshold we still surface "candidate matches" but never auto-merge, because a wrong merge is worse than no merge.

This runs as a nightly batch, not on every request, because the matching is CPU-heavy and the catalog does not change by the minute.

Fetching without getting throttled

Both platforms expose data through official APIs in our integration, so we are not scraping. Still, hitting them for every comparison group would blow our rate budget. We cache the last known price per (platform, listing) with a short TTL and only refresh when a group is actually viewed or an order is about to be placed. A Redis short-TTL layer absorbs the read spikes so the upstream APIs see a smooth, predictable request pattern.

Presenting the gap honestly

The dashboard shows both source prices, the computed spread, and a confidence score for the match. We deliberately surface low-confidence matches with a warning label rather than hiding them, because a reseller making a buying decision needs to know how sure the system is.

Crucially, we never claim the cheaper source is "better". 1688 is often wholesale-oriented with higher minimums and longer lead times; Taobao is retail-paced but pricier. The engine shows the total landed cost including those factors, not just the sticker price.

What it changed

After rolling this out, the resellers who adopted it started splitting their cart between sources per item instead of per habit. The aggregate sourcing cost on mature accounts dropped noticeably within a quarter, not because they bought cheaper things, but because they stopped leaving the spread on the table.

Building the engine taught us the obvious lesson again: the hardest part of "compare prices" was never the comparison. It was agreeing on what counts as the same product.

Top comments (0)