Apinoa Docs

Search

按关键词搜索 AliExpress,支持价格和类目过滤,并使用你选择的货币和语言。

查看原始 .mdx
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"

参数

参数类型必填说明
querystring是Keywords. Required — AliExpress keyword search cannot be asked anything without words.
categoryIdstringAliExpress category id; narrows the search.
currencystringPresentment currency.
languagestringPresentment language.
pageinteger ≥ 11-based page number.
pageSizeinteger ≥ 1Results per page, 1-50.
priceMaxnumber ≥ 0Highest price to return, in decimal major units.
priceMinnumber ≥ 0Lowest price to return, in decimal major units.
regionstringBuyer country (ISO 3166-1 alpha-2); sets shipping and availability.
sortenumResult 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
}

错误

状态代码含义
400INVALID_PARAMS参数缺失、未知或超出范围。消息中会指出是哪一个。
401UNAUTHORIZED缺少 x-api-key 请求头,或密钥已吊销或未知。
402INSUFFICIENT_BALANCE余额不足以支付本次调用。请在控制台充值。
503TOKEN_EXPIREDAliExpress 暂时不可用。请稍后重试。

全部错误代码见 Errors。失败的调用不计费。

价格

价格 每次调用 $0.001。标价;单日调用超过 1,000 次后单价下调。

说明

  • AliExpress 会遵循 currency 和 language;其他平台按 region 本地化。
  • 按 page 分页。 没有 cursor。
  • 不支持: brands、ratingMin、condition、freeShipping、inStock,以及 best_match 和 newly_listed 排序。

本页内容