تتطلب واجهات Taobao اشتراكاً مدفوعاً سارياً. تشمل التجربة المجانية لمدة 7 أيام منصتي 1688 وWeidian فقط. دون الاشتراك المطلوب، تُرجع طلبات Taobao الحالة HTTP 403 والرمز PAID_SUBSCRIPTION_REQUIRED. قم بالترقية في مركز المطورين وتابع استخدام مفتاح API نفسه.

API البحث عن المنتجات بالكلمات المفتاحية

للتوافق: لا تزال GET /v1/products/search موجودة لكن معالج الإنتاج يوسمها كواجهة قديمة. تستخدم المعامل q بدل keyword وتعيد البنية القياسية. استخدم عقد POST JSON أدناه للتكاملات الجديدة؛ لا يدعم GET القديم currency أو تبديل response_format الخاص بـ POST.

POST /v1/products/search — keyword search returning a paginated product list.

  • Taobao → upstream /traffic/item/search
  • 1688 → upstream product.search.keywordQuery

Related: Product detail · Product response models · Response format

Existing channel-specific fields may be ignored by other channels. The new rating_start validates its channel and response format and returns HTTP 400 when unsupported.

Common request fields

FieldRequiredDescription
channelYes1688 | taobao
keywordYesSearch term
rating_startNoحد أدنى اختياري لـ trade_score في صفحة 1688 الحالية؛ رقم JSON ≥ 0، بالتنسيق القياسي فقط. راجع تصفية تقييمات 1688.
languageNoDefault en
page / page_sizeNoPagination (Taobao max 20 per page)
response_formatNostandard (default) or upstream
sort_fieldNoprice | sales | credit (credit is 1688-only; Taobao ignores)
sort_orderNoasc | desc (default asc; use with sort_field)
price_start / price_endNoPrice range in yuan (decimals allowed, e.g. 19.9)
ship_within_hoursNo0 (same day) | 24 | 48
category_idsNoComma-separated category IDs. 1688 only; Taobao ignores. See 1688 categories
product_collection_idNoBusiness pool ID. 1688 only; Taobao ignores

Sort (sort_field + sort_order)

sort_fieldsort_order→ 1688→ Taobao
priceasc / desc{"bid":"asc|desc"}PRICE_ASC / PRICE_DESC
salesasc / desc{"sale":"asc|desc"}SALE_QTY_ASC / SALE_QTY_DESC
creditasc / desc{"credit":"asc|desc"}Ignored

Legacy aliases for sort_field: bid → price, sale → sales.

Price

  • Gateway always uses yuan (decimals OK).
  • 1688 → priceStart / priceEnd.
  • Taobao → filters min_price / max_price in fen (Math.round(yuan * 100)).

Shipping (ship_within_hours)

Value→ 1688 filter→ Taobao filters
0shipInTodayIgnored
24shipIn24Hours24shipping
48shipIn48Hours48shipping

1688-only filters (Taobao ignores)

FieldTypeDescription
experience_score_levelinteger1…4 → totalEpScoreLv1…Lv4
product_attrsstringComma-separated: isOnePsale, isOnePsaleFreePost, new7, new30, 1688Selection, isQqyx
filterstringAdvanced comma-separated tags; merged with semantic fields above
sale_filtersobject[]Maps to saleFilterList (sale_type: sales7 | sales14 | sales30 | totalSales, optional sale_start / sale_end)
keyword_translatebooleanWhether the keyword is already translated

Deprecated aliases: category_id, category_id_list (prefer category_ids).

Examples

1688

POST /v1/products/search
{
  "channel": "1688",
  "keyword": "phone case",
  "language": "en",
  "page": 1,
  "page_size": 20,
  "sort_field": "sales",
  "sort_order": "desc",
  "price_start": 10.5,
  "price_end": 99.9,
  "ship_within_hours": 24,
  "experience_score_level": 2,
  "product_attrs": "isOnePsale,1688Selection",
  "filter": "noReason7DReturn",
  "category_ids": "123,456",
  "product_collection_id": "262105288"
}

Taobao

POST /v1/products/search
{
  "channel": "taobao",
  "keyword": "帽子",
  "language": "en",
  "page": 1,
  "page_size": 20,
  "sort_field": "price",
  "sort_order": "asc",
  "price_start": 20,
  "price_end": 100,
  "ship_within_hours": 24
}

Response

StandardProductList — summary cards in items[]. Call product detail for full SKU matrix and stock.

يتغيّر id / mi_id في Taobao دوريا. لا تخزّنه طويلا. المعرفات القديمة تفشل في detail وsimilar والطلبات. أعد الجلب قبل الدفع.

With response_format: "upstream", the response is the channel vendor payload wrapped by HIOBuy (see Response format).

تقييمات 1688: تصفية الصفحة الحالية

تتضمن النتائج القياسية لـ POST /v1/products/search و POST /v1/products/seller/search مع channel=1688 الحقل items[].trade_score، المنقول من tradeScore في بحث المصدر كسلسلة رقمية. التقييم المفقود أو غير الصالح هو null ويختلف عن القيمة الفعلية "0". لا تُجرى طلبات إضافية لتفاصيل المنتج.

يجب أن يكون rating_start الاختياري رقم JSON محدودًا وغير سالب (مثل 4.0). يحتفظ بالمنتجات التي تحقق trade_score >= rating_start ضمن صفحة المصدر الحالية فقط ويستبعد التقييمات المفقودة أو غير الصالحة. عند حذفه تُعاد الصفحة كاملة. يتطلب channel=1688 و response_format=standard (الافتراضي)؛ استخدامه مع قناة أخرى أو upstream يعيد HTTP 400 بعد التحقق من الهوية والصلاحيات. لا تغيير على Weidian.

هذه ليست تصفية لجميع منتجات المنصة ولا ترتيبًا حسب التقييم. يبقى ترتيب المصدر ولا تُجلب صفحات إضافية لاستكمال النتائج. experience_score_level مرشح مختلف لدى المصدر ولا يساوي rating_start.

تحتفظ page و page_size و total بمعناها قبل التصفية (إذا غاب إجمالي المصدر، يستخدم total العدد الأصلي في الصفحة). يشير rating_filter.source_count إلى العدد قبل التصفية و returned_count إلى العدد بعدها. قيمة rating_filter.scope دائمًا current_page، ولا تظهر هذه البيانات إلا عند طلب التصفية.

قد تكون النتائج قليلة أو مصفوفة items فارغة مع وجود صفحات لاحقة. يعتمد has_next، إن توفر، على ترقيم صفحات المصدر قبل التصفية. غيابه يعني أن معلومات الصفحات غير معروفة؛ لا تستنتج النهاية من العدد بعد التصفية. ضع حدًا أقصى للصفحات في العميل.

مثال البحث بالكلمات

POST /v1/products/search
{
  "channel": "1688",
  "keyword": "phone case",
  "page": 1,
  "page_size": 20,
  "rating_start": 4.0,
  "response_format": "standard"
}

مثال البحث داخل المتجر

POST /v1/products/seller/search
{
  "channel": "1688",
  "seller_open_id": "YOUR_1688_SELLER_OPEN_ID",
  "page": 1,
  "page_size": 20,
  "rating_start": 4.0
}

مثال توضيحي للاستجابة المصفاة

{
  "request_id": "req_example_rating",
  "channel": "1688",
  "keyword": "phone case",
  "page": 1,
  "page_size": 20,
  "total": 120,
  "has_next": true,
  "items": [
    {
      "id": "1234567890",
      "channel": "1688",
      "source_product_id": "1234567890",
      "source_url": "https://detail.1688.com/offer/1234567890.html",
      "title": {
        "original": "手机壳",
        "translated": "Phone case",
        "language": "en"
      },
      "price": {
        "original_currency": "CNY",
        "original_amount": 5.45,
        "display_currency": "CNY",
        "display_amount": 5.45
      },
      "image": "https://example.com/product.jpg",
      "seller": {
        "name": "Example seller"
      },
      "trade_score": "4.8"
    }
  ],
  "rating_filter": {
    "rating_start": 4,
    "scope": "current_page",
    "source_count": 20,
    "returned_count": 1
  }
}

Get Support

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

Email support