> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AliExpress API

> AliExpress の商品を検索して JSON で受け取ります。ストアが表示する順に、商品の順位と価格、評価を返します。

AliExpress（aliexpress.com）の商品を非同期タスク API で検索します。`COMMERCE_SERP` に `site` `aliexpress` を指定すると、検索結果の商品をストアの順に受け取ります。このストアの商品ページは `COMMERCE_PRODUCT` では読み取りません。完了した検索 1 件につき **0.5 クレジット**です。

## 検索

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "COMMERCE_SERP", "payload": { "site": "aliexpress", "query": "wireless earbuds", "limit": 3 } }'
```

タスクを送信したあと、`GET /v1/async/task/{id}` をポーリングするか Webhook で受け取ります。[非同期タスク](https://docs.querying.ai/ja/concepts/async-tasks.md)を参照してください。

### パラメータ

* `site`: 必須。`aliexpress` です。
* `query`: 必須。検索語で、1-500 文字です。
* `limit`: 任意の整数、1-40。デフォルトは 20 です。
* `country`: 任意。デフォルトはストアの国の `US` です。ほかの国は `422 REGION_UNSUPPORTED` で拒否されます。

受け付けるペイロードフィールドは上記のみです。`include` は省略してください。`include: {}` でも、クレジットを確保する前に `payload.include` の `422 VALIDATION_ERROR` を返します。

### レスポンス例

```json theme={"theme":"css-variables"}
{
  "site": "aliexpress",
  "query": "wireless earbuds",
  "country": "US",
  "returnedCount": 3,
  "products": [
    {
      "rank": 1,
      "productId": "3256813273775472",
      "title": "Wireless Earbuds, Bluetooth 5.4 Earbuds Stereo Bass, Bluetooth Headphones in Ear Noise Cancelling Mic, Earphones IP7 Waterproof Sports, 36H Playtime USB C Mini Charging Case Ear Buds for Android iOS",
      "url": "https://www.aliexpress.com/item/3256813273775472.html",
      "price": 13.95,
      "currency": "USD",
      "imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/Seafc726f8c6247c48e492e80361dbb0ah.jpg"
    },
    {
      "rank": 2,
      "productId": "3256811621288203",
      "title": "2026 New Air 3【 Pro3 】 Bluetooth Wireless Earbuds With Heart Rate Monitoring, Active Noise Cancellation Headphones, Waterproof for Daily Use, For IPhone IOS Smartphone, Gaming /Sports /Fitness Earphones.",
      "url": "https://www.aliexpress.com/item/3256811621288203.html",
      "price": 13.25,
      "currency": "USD",
      "rating": 4.9,
      "imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/Sa57a4580c1274b01988d5df3fa8e76cbx.jpg"
    },
    {
      "rank": 3,
      "productId": "3256813271161904",
      "title": "Smart Touch Control True Wireless Earbuds, Active Noise Cancelling, Portable Mini Charging Case Easy To Carry, Low Latency For Gaming, Long Battery Life, Instant Connection, Spatial Audio, Ergonomic In-Ear Comfort Fit, Air Bluetooth Headphones.",
      "url": "https://www.aliexpress.com/item/3256813271161904.html",
      "price": 27.39,
      "currency": "USD",
      "imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/S9675a1dc8aa545959180535f79ea4ddd2.jpg"
    }
  ]
}
```

### 結果フィールド

* `site`、`query`、`country` はリクエストの値です。`returnedCount` は `products` の件数です。
* 各商品は `rank`、`productId`、`title`、`url` を含みます。`productId` はストア独自の商品 ID です。`rank` はストアのデフォルトの並び順で、ストアが広告と表示した商品は除きます。
* `price`、`rating`、`imageUrl` は、検索結果の画面に表示されている場合に含みます。`price` は商品ごとの `currency`（ISO 4217）の数値で、容量ごとに価格が異なる場合は最も低い価格です。 AliExpress の価格は、ログインしていない米国の購入者に表示されるセール価格です。
* `rating` は 5 点満点です。 AliExpress は評価件数なしで星だけを表示するため、`reviewCount` はありません。
* 検索ごとに、ストアの検索結果の 1 ページ目から商品を取得します。

## エラーと課金

* 商品が 1 つもない検索は、失敗したタスクとして終了します。
* 課金は完了した検索だけで、1 件につき 0.5 クレジットです。

## 関連

* [Amazon](https://docs.querying.ai/ja/engines/amazon.md)
* [Walmart](https://docs.querying.ai/ja/engines/walmart.md)
* [Target](https://docs.querying.ai/ja/engines/target.md)
* [Commerce のストア一覧](https://docs.querying.ai/ja/engines/overview.md#commerce)
* [クレジットと上限](https://docs.querying.ai/ja/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.