Taobao APIs require an active paid subscription. The 7-day free trial includes 1688 and Weidian only. Calls without the required subscription return HTTP 403 with PAID_SUBSCRIPTION_REQUIRED. Upgrade in the developer center and continue using the same API key.

Product image search API

POST /v1/products/search-by-image — find similar products by image on 1688, Taobao and Weidian.

Choose one channel per request. For 1688/Taobao, reuse an image_id from upload image, or provide image_url / image_base64. Weidian image search requires image_url and does not use the two-step image-ID flow. Taobao requires an active paid subscription.

Image input by channel

ChannelAccepted input and processing
1688image_id, image_url or image_base64. Without an ID, HIOBuy prepares/uploads the image before searching. image_address is supplemental metadata and cannot replace these inputs.
taobaoimage_id, image_url or image_base64. An ID skips image preparation. standard URL/Base64 requests stage an image and send pic_url; upstream passes a URL directly or uploads Base64 first.
weidianA public image_url is required and is fetched by Weidian. image_id and image_base64 are not substitutes.

Request body

FieldRequiredDescription
channelYes1688 | taobao | weidian
image_idOne ofFrom upload-image
image_base64 / image_urlOne ofUpload + search in one step
image_address1688Supplemental 1688/alicdn URL; cannot replace image_id, image_url or image_base64
regionNo1688: Crop box, e.g. 266,799,48,581
keywordNo1688: Refine within image results
page / page_sizeNoPagination
languageNoDefault en

Example

POST /v1/products/search-by-image
{
  "channel": "taobao",
  "image_id": "img_1234567890",
  "page": 1,
  "page_size": 20,
  "language": "en"
}

Response

Same as keyword search — StandardProductList, plus optional pic_region_info (detected subject region).

Option A — two steps (reuse image_id):

POST /v1/products/upload-image      → { image_id }
POST /v1/products/search-by-image → { items[], total, ... }

Option B — one step:

POST /v1/products/search-by-image
{ "channel": "1688", "image_base64": "..." }

Image limits and URLs

The complete JSON body is limited to 6 MiB (6,291,456 bytes), including Base64 and JSON overhead. With image_url, this is not the downloaded image file-size limit. No universal source-file byte or pixel maximum is guaranteed across marketplaces; upstream acceptance rules still apply. JPEG/PNG are recommended for compatibility. For 1688, recognized WebP input is converted to JPEG.

Use a stable public HTTPS URL with the correct Content-Type, no authentication or cookies, and preferably no redirects. The current Taobao standard URL preparation follows redirects without an endpoint-specific redirect policy. Marketplace-side URL fetching can behave differently.

Optional image optimization

As a starting point, use a clear JPEG with a long edge around 1024 px, quality around 80, and a file around 200 KB–1 MB where detail permits. Preserve the aspect ratio and product detail. These are recommendations, not API limits, and do not prevent upstream throttling.

Timeouts and retries

The current image-fetch and Taobao request paths do not impose an explicit end-to-end application deadline; no fixed response-time SLA is provided. Suggested client settings are 60 seconds per attempt and a 120-second total retry budget; stop when the budget is exhausted. Upstream response times can vary.

The Taobao standard flow makes at most 3 upstream attempts total only for an empty successful result. That loop does not retry upstream errors. Taobao throttling can currently appear as HTTP 502 CHANNEL_UPSTREAM_ERROR; a 502 alone does not identify an image-size problem or a Worker timeout.

For confirmed temporary errors, allow at most 2 client retries, waiting roughly 2–3 seconds, then 4–6 seconds, with independent random jitter. Honor Retry-After when present, coordinate across client instances, and start with one Taobao image search in flight per application. This is a client recommendation, not an upstream QPS entitlement. Do not blindly retry validation, authentication, subscription or unsupported-channel errors, exhausted daily quota, or empty HTTP 200 results. Avoid overlapping retries after a timeout because the original request may still complete.

API Units and caching

A billable successful production image search costs 2 API Units. A separate successful image upload costs another 2 Units. Internal upstream attempts within one public request do not each incur another API charge; new client attempts are separate requests.

Failures returned before the successful-response billing step are not charged. An empty HTTP 200, an upstream-format business failure inside HTTP 200, or a server success after a client timeout can still be billable. A zero-Unit log describes that request, not any earlier upload.

Image-search result caching is BYPASS, including when an image ID is reused. Cache hits on other billable endpoints do not waive their normal Unit charge.

Dashboard channel statistics

By Channel counts requests, not Units. Each image search selects one channel; new logs retain a known resolved marketplace even when the request fails. Unknown can still contain requests rejected before channel resolution, missing/invalid channels, platform or fulfillment operations without a marketplace, and older incomplete logs. Older entries are not automatically reclassified. The Dashboard Today range uses UTC boundaries.

Get Support

Need integration help? Contact Developer Support at support@hiobuy.com · Response within 1–2 business days

Email support