Search
按关键词搜索 AliExpress,支持价格和类目过滤,并使用你选择的货币和语言。
GET | POST /v1/aliexpress/search参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 请求体发送,两者等价。
请求
curl "https://gateway.apinoa.com/v1/aliexpress/search?query=phone+case" \
-H "x-api-key: $APINOA_API_KEY"参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | Keywords. Required — AliExpress keyword search cannot be asked anything without words. |
categoryId | string | AliExpress category id; narrows the search. | |
currency | string | Presentment currency. | |
language | string | Presentment language. | |
page | integer ≥ 1 | 1-based page number. | |
pageSize | integer ≥ 1 | Results per page, 1-50. | |
priceMax | number ≥ 0 | Highest price to return, in decimal major units. | |
priceMin | number ≥ 0 | Lowest price to return, in decimal major units. | |
region | string | Buyer country (ISO 3166-1 alpha-2); sets shipping and availability. | |
sort | enum | Result ordering, in the shared vocabulary. price_asc price_desc best_seller |
这些参数及所有响应类型也写在OpenAPI 文档中。
响应
在 data 中返回 SearchResult。 真实响应的节选:数组只保留前几项,长文本已截断。
{
"data": {
"marketplace": "aliexpress",
"query": "phone case",
"page": {
"index": 1,
"size": 20,
"total": 1469144
},
"items": [
{
"marketplace": "aliexpress",
"id": "1005012583726882",
"url": "https://www.aliexpress.com/item/1005012583726882.html",
"title": "New Floating Airbag Waterproof Swimming Bag Phone Case For iPhone Samsung Xiaomi Redmi Huawei Google OPPO Vivo Phone Co…",
"price": {
"currency": "USD",
"amount": 4.98
},
"listPrice": {
"currency": "USD",
"amount": 9.96
},
"seller": {
"id": "1105624218",
"url": "https://www.aliexpress.com/store/1105624218"
},
"salesCount": 2,
"badges": [],
"promotions": [
"50%"
],
"attributes": [],
"imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/Se9739ac4e32a46deaae06bba6a6d0003l.jpg"
}
]
},
"requestId": "890b2694ae514175823bbd0427cfa5e9",
"success": true
}错误
| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | INVALID_PARAMS | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 401 | UNAUTHORIZED | 缺少 x-api-key 请求头,或密钥已吊销或未知。 |
| 402 | INSUFFICIENT_BALANCE | 余额不足以支付本次调用。请在控制台充值。 |
| 503 | TOKEN_EXPIRED | AliExpress 暂时不可用。请稍后重试。 |
全部错误代码见 Errors。失败的调用不计费。
价格
价格 每次调用 $0.001。标价;单日调用超过 1,000 次后单价下调。
说明
- AliExpress 会遵循
currency和language;其他平台按region本地化。 - 按
page分页。 没有cursor。 - 不支持:
brands、ratingMin、condition、freeShipping、inStock,以及best_match和newly_listed排序。