Using the AliExpress API from a keyword to full product detail
A search box can go from typed keywords to a product's full record:
- Send the keyword as
body.querytoaliexpress-search, withbody.countryandbody.currencyset for the shopper you are serving. - Take the
product_idof the row that interests you from the results. - Send that
product_idtoaliexpress-product-detailfor the full price range, SKU variants, store and shipping summary.
body.product_id and body.url are interchangeable on aliexpress-product-detail, so a product URL copied straight from a listing works just as well as the id taken from a search row.
Checking a store before trusting its listings
A store's own metrics only surface once a product confirms them:
- Take
store_idfrom a product'sstoreblock, orstore_urlif that is what you have. - Send it to
aliexpress-store-infoon its own for the store's basic profile. - Send it again together with
body.queryset to one of that store's own products to also receiveseller_metrics.
An id that does not belong to a store answers NOT_FOUND rather than an empty profile, so a lookup that fails this way is worth treating as a wrong id rather than a call worth repeating unchanged.
Comparing shipping across destinations for one product
The same product can be checked against several destinations in a short loop:
- Take the product's
product_idorurl. - Call
aliexpress-shippingonce per destination, changing onlybody.country— andbody.province/body.citywhere a precise estimate matters — between calls. - Compare each call's
optionsandoption_countside by side, since a different country can offer entirely different carriers rather than just a different price.
Leaving body.province unset falls back to a major region of body.country, which is enough for a rough comparison across countries but not for an estimate precise enough to quote a shopper.
Paging through a product's reviews
Reviews are pulled a budget at a time rather than in one unbounded call:
- Call
aliexpress-reviewswithbody.product_idandbody.page_sizeset to 20, the largest page it accepts. - Raise
body.max_pagesto pull several pages in one call, up to the 20-page ceiling, or setbody.max_resultsdirectly for a review count instead. - Read
summary.total_reviewsto see how many exist in total, since a product with fewer than 400 reviews is reached well beforebody.max_results's ceiling.
body.filter narrows the same pull to just the reviews that carry images, or just the ones with an additional follow-up comment, in place of all, its default. Leaving body.filter unset pulls every kind of review together, which is the better starting point before narrowing down to just one kind.
Finding deals and tracking them over time
A keyword's deals can be watched across repeated calls rather than only read once:
- Send a keyword as
body.querytoaliexpress-deals, withbody.min_discountset to the smallest discount worth acting on. - Store each result's
product_idtogether with itsdiscount_pctandprice. - Repeat the same call later and compare
discount_pctperproduct_idto see which listings deepened their discount rather than only which ones are currently discounted.
Results already come back sorted by discount_pct, so the first rows of each run are the ones worth comparing first.
Replacing a missing product with similar listings
A product that disappears can be replaced with a phrase instead of an id:
- Call
aliexpress-similarwith the originalproduct_idorurlwhen the listing is still known. - Once a product disappears, call it again with
body.queryset instead — this skips the lookup of the original product's own title entirely. - Read
seed_queryon the response to confirm which phrase the comparison actually used.
body.query on aliexpress-similar overrides the seed product's own title rather than combining with it, so a value sent there replaces the title-based search outright.
Cross-checking review counts against seller feedback
A product's own reviews and its seller's overall standing answer different questions:
- Pull
review_countfor the product fromaliexpress-product-detail. - Pull
seller_feedback_countfor the same product's store from the same response. - Treat the two as separate measures rather than comparable figures: one counts feedback on the seller as a whole, the other counts reviews of this one product, so a small
seller_feedback_countnext to a largereview_countis ordinary rather than a sign of a mismatch.
aliexpress-store-info repeats seller_feedback_count inside seller_metrics once body.query matches one of the store's products, which is useful for watching the same seller figure without a product lookup each time.
AliExpress explained
AliExpress Choice is a channel the platform introduced in early 2023. Through Choice, AliExpress itself takes on sales support, logistics and customer service for the merchants that join it, rather than leaving every part of the sale to the seller alone. Choice listings sit alongside the independent-seller listings the catalogue has always carried, so a Choice label marks which kind of support stands behind a given listing rather than which company runs the site.
[
{
"body": {
"query": "wireless earbuds",
"country": "US",
"currency": "USD"
}
},
{
"body": {
"product_id": "3256808363596774",
"country": "US",
"currency": "USD"
}
}
]{
"body": {
"product_id": "3256808363596774",
"page_size": 20,
"max_pages": 5,
"country": "US"
}
}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/aliexpress/aliexpress-deals' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"query":"wireless earbuds"}}'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.
AliExpress API: search, product detail, reviews, shipping overview and prices · Read the API reference · Try it in the playground