> ## 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

> Search AliExpress as JSON: ranked products with prices and ratings, in the order the store shows them.

Search AliExpress (aliexpress.com) through the async task API. Send `COMMERCE_SERP` with `site` `aliexpress` to get the products a search shows, in the store's order. `COMMERCE_PRODUCT` does not read this store's product pages. A completed search costs **0.5 credits**.

## Search

```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 } }'
```

Submit the task, then poll `GET /v1/async/task/{id}` or receive its webhook. See [Async tasks](https://docs.querying.ai/concepts/async-tasks.md).

### Parameters

* `site`: Required. `aliexpress`.
* `query`: Required. The search query, 1-500 characters.
* `limit`: Optional integer from 1 to 40, default 20.
* `country`: Optional. Defaults to `US`, the store's country. Any other country is rejected with `422 REGION_UNSUPPORTED`.

Only the payload fields listed above are accepted. Omit `include`: even `include: {}` returns `422 VALIDATION_ERROR` on `payload.include` before credits are held.

### Response example

```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"
    }
  ]
}
```

### Result fields

* `site`, `query` and `country` echo the request. `returnedCount` is the number of entries in `products`.
* Each product includes `rank`, `productId`, `title` and `url`. `productId` is the store's own product ID. `rank` follows the store's default order, and listings the store marks as sponsored are left out.
* `price`, `rating` and `imageUrl` appear when the results page shows them. `price` is a number in the product's `currency` (ISO 4217); when sizes are priced apart, it is the lowest one. AliExpress prices are the sale prices shown to a signed-out shopper in the US.
* `rating` uses a five-point scale. AliExpress shows stars without a rating count, so its products carry no `reviewCount`.
* Each search returns products from the store's first results page.

## Errors and billing

* A search that returns no products ends as a failed task.
* Only completed searches are charged, 0.5 credits each.

## Related

* [Amazon](https://docs.querying.ai/engines/amazon.md)
* [Walmart](https://docs.querying.ai/engines/walmart.md)
* [Target](https://docs.querying.ai/engines/target.md)
* [All Commerce stores](https://docs.querying.ai/engines/overview.md#commerce)
* [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md)


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