From a keyword to a paged category walk
Keyword search is the quickest way in, but it stops at one shortlist of about 20 offers. To go deeper:
- Call
post-1688-searchwith a term inbody.query, preferably in Chinese, and pick a row that matches what you want. - Take an id from the row's
category_ids, which run from broad to leaf: the last id names the narrowest category and an earlier one a wider category. - Send that id as
body.category_idtopost-1688-category-offers, start at page 1 and raisebody.pageby one whilehas_nextstays true.
The page length is fixed at 30 offers and consecutive pages share no offer ids, so the walk can reach up to 200 pages of one category. When no search row fits, take the id from post-1688-categories instead and prefer a node whose is_leaf is true, which keeps the listing narrow.
1688.com in brief
Offers on 1688.com can use tiered pricing, in which the unit price falls as the ordered quantity rises.
Pricing an order with the 1688 API
Search rows and category rows show a single unit price, but the cost of a real order depends on the quantity. Pass the offer id as body.offer_id to post-1688-product-detail and read price_type first:
- with
rangePrice, one ladder inprice_tiersapplies to all variants, and each tier gives its quantity range inmin_qtyandmax_qtytogether with itsprice - with
skuPrice, each entry in theskusofvariantscarries its ownpriceanddiscount_price, so price the variants you plan to buy one by one
Check the quantity against moq, and read the mixed-batch terms in mix: whether mixed batches are supported, and their min_qty and min_amount. Keyword search rows carry no ladder at all, while category offer rows include moq but no tiers, so the detail call is the step that turns a shortlist into a priced order.
Vetting a factory before first contact
Run post-1688-supplier-search with the product keyword in body.query. The rows let you weigh manufacturers on documented fields rather than on listing text:
| Fields | What they tell you |
|---|---|
workers, floor_area_sqm | the factory's scale |
repeat_buyer_rate, on_time_rate, reply_rate_30d | the factory's record with buyers |
years_on_1688 | the factory's tenure |
third_party_audit, is_super_factory | outside audits and super-factory status |
Keep the candidates that fit, take ids from their offer_ids and send each one as body.offer_id to post-1688-product-detail for prices and variants and to post-1688-product-reviews for buyer ratings and comments. Treat an empty shortlist as an answer: the keyword has no vetted factory, and a broader or Chinese keyword is the next step rather than the same call again.
Reading reviews and repeat-purchase signals
Rows from post-1688-search return offer_repurchase_rate for the offer itself and shop_repurchase_rate for the seller's whole shop, so the shortlist already carries these signals before any detail is requested. For a single offer, post-1688-product-reviews returns the average rating out of 5, good_percent and review_count, plus one page of individual reviews with the text, the quantity bought and the variant.
Read review_count with care: where the count is shown as 100+, the number is a lower bound, so two offers that both show 100+ cannot be ranked by it. An offer that nobody has reviewed comes back with an empty reviews list and review_count at zero, so a ranking script should treat it as unrated rather than as a failed call.
Browsing categories in another language
For readers who do not read Chinese:
- Start from
post-1688-categorieswithbody.languageset to one ofen,ru,es,pt,fr,de,jaorko. - Request
body.depth1 first to show the 54 top-level categories, and load depth 2 or 3 only when the reader needs more; the full 3-level tree is about 2.4 MB, which is heavy for a first screen. - Use
is_leafto tell when a node has no children left, and pass itsidto category offers.
Every node keeps its Chinese name in name_zh, and that name makes a good keyword for keyword search, because Chinese terms return the richest results.
Pitfalls in 1688 data
Prices are in CNY. Beyond that, these behaviours need care:
- Calling
post-1688-searchagain with the same keyword does not page further: it rotates within roughly 38 distinct offers, so repeated calls return many offers already seen; deduplicate rows byidbefore counting new offers. - For most keywords every search row is a promoted listing marked by
is_ad; category offers give the unpromoted view. - On a variant returned by
post-1688-product-detail,weight_kgis null when the supplier did not publish a weight, so do not fill in a shipping weight of your own. qandkeywordare also accepted in place ofquery; keepbody.max_rotationsbetween 1 and 8.
[
{
"body": {
"query": "蓝牙耳机"
}
},
{
"body": {
"category_id": "1031910",
"page": 2
}
},
{
"body": {
"offer_id": "864971848115"
}
}
][
{
"body": {
"query": "蓝牙耳机"
}
},
{
"body": {
"offer_id": "864971848115",
"max_rotations": 4
}
}
]Server-side request template
This server-side template shows authentication and request identity using the first operation of this API. Choose the operation for your use case and check its current availability and price on the API page. After a timeout, resend the unchanged request with the same Idempotency-Key.
The gateway request is always POST.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/alibaba-1688/post-1688-categories' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"depth":1,"language":"ru"}}'Integration checklist
- The API key is stored in a server-side secret manager and never sent to a browser.
- Each request carries its own Idempotency-Key, kept until the request has a final answer.
- The integration reads ok and error.code and handles each error code as the error table describes.
- An uncertain POST is inspected using its original identity, never blindly repeated with a new one.
- The operation’s current availability and price have been checked on its API page.
1688 Wholesale Marketplace API overview and prices · Read the API reference · Try it in the playground