# 速卖通 关键词搜索 API (aliexpress.search)

- Canonical page: https://everyinfra.com/aliexpress-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "aliexpress", "action": "search", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Billing unit: every 50 rows you ask for count as one call; blocks that come back with no rows are not charged
- Returns: list, default 20, max 200 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=aliexpress&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | AliExpress 商品搜索词，例如 wireless earbuds。用于查商品列表，不是卖家 ID；商品详情、规格变体和评论使用商品链接定位。 |
| min_price | not declared | no | not declared | 商品搜索的最低价格，数值，用于排除低于该价格的商品；不是折扣百分比，也不是 API 请求预算。价格币种需以搜索结果为准。 |
| min_rating | not declared | no | not declared | 商品搜索的最低星级评分，数值范围 0–5，例如 4.5；不是评论条数或好评率百分比，也不筛选单条评论的星级。 |
| sort | enum: popular / price_asc / price_desc / relevance / top_rated | no | not declared | 按当前 action 列出的允许值选择。search：relevance 为默认综合排序，popular 为订单量优先，price_asc / price_desc 为价格升序 / 降序，top_rated 为评分优先；兼容旧值 default / orders / rating。reviews：relevance 为默认顺序，newest 为最新评论，不是商品上架时间。ratings 不公开 sort 参数。 |
| limit | integer (1–200) | no | 20 | 这次调用最多返回的条数，整数，1–200；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| product_id | 商品 ID。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| url | 该记录在原平台上的可访问链接。 |
| price | 价格数值，不含货币符号；币种见 currency。 |
| original_price | 原价（划线价）。与 price 对比可算真实折扣。 |
| currency | 价格币种代码（如 CNY、USD）。price 存在但 currency 为 null 时不要假定币种。 |
| discount | 折扣力度。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| orders_count | 累计订单数。**AliExpress 上这是比评分更硬的信任指标。** |
| review_count | 评价条数，用于商品/商家类能力。null 表示不公开，不等于 0。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| ships_from | 发货地。 |
| seller_name | 卖家名称。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| is_top_rated | 是否为平台认证的优质卖家。 |
| free_shipping | 是否包邮。 |
| images | 图片链接：商品类能力里是商品轮播图（按商品页顺序），reviews 里是买家晒图。 |
| search_rank | 在本次搜索结果中的位置（search）。 |
| seller_rating | 卖家评分（search）。 |
| seller_url | 卖家店铺链接（search）。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| tags | 标签数组。无标签时为空数组，不是 null。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "aliexpress",
  "action": "search",
  "params": {
    "keyword": "wireless keyboard"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "aliexpress",
        "action": "search",
        "params": {
            "keyword": "wireless keyboard",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "aliexpress",
  "action": "search",
  "results": [
    {
      "product_id": "•••",
      "title": "ATTACK SHARK M75 Kabellose Membran-Gaming-Tastatur mit Knopf und OLED-Display, Bluetooth/2,4 GHz, Regenbogen-Hintergrundbeleuchtung, PBT-Tastenkappen mit Farbverlauf",
      "url": "https://www.aliexpress.com/item/1005009141716642.html",
      "price": 35.79,
      "currency": "EUR",
      "rating": 4.4,
      "orders_count": 178,
      "image_url": "https://ae-pic-a1.aliexpress-media.com/kf/Sea136b941dbf41f7b21b564e9c895f1af.jpg",
      "ships_from": "US",
      "is_top_rated": false,
      "platform": "aliexpress",
      "tags": [
        "Bester Preis in ähnlichen Angeboten"
      ],
      "rating_scale": 5
    },
    {
      "product_id": "•••",
      "title": "ZIYOU LANG M96 – kabellose Gaming-Tastatur mit Display und Drehregler, Bluetooth-/2,4-GHz-Membrantastatur mit leisem Betrieb, 3000-mAh-Akku, wiederaufladbar.",
      "url": "https://www.aliexpress.com/item/1005009663809101.html",
      "price": 32.59,
      "currency": "EUR",
      "discount": "-8%",
      "rating": 4.9,
      "orders_count": 1413,
      "image_url": "https://ae-pic-a1.aliexpress-media.com/kf/S18528a11d40e45f7b8c6f26057ab5768e.jpg",
      "ships_from": "DE",
      "is_top_rated": true,
      "platform": "aliexpress",
      "tags": [
        "Niedrigster Preis seit 30 Tagen: 35,73€",
        "Kostenloser Versand",
        "Bester Preis in ähnlichen Angeboten"
      ],
      "rating_scale": 5
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=aliexpress
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
