# AliExpress Bestsellers Scraper (`xtracto/aliexpress-bestsellers`) Actor

Get the top-selling AliExpress products for any category or keyword, ranked by orders, with price, rating, and image.

- **URL**: https://apify.com/xtracto/aliexpress-bestsellers.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.33 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AliExpress Bestsellers Scraper

Get the top-selling AliExpress products for any category or keyword — ranked by orders, with price, rating, and image, ready to drop into a spreadsheet or database.

### Why use this actor

- No AliExpress account or login required — works on fully public listing pages.
- Results come back ranked by actual orders (units sold), not "best match" relevance — so item #1 really is the bestseller.
- Just type a category name or keyword — no need to dig up internal AliExpress IDs.
- Localized results — choose your ship-to country and currency at run time.
- Stable JSON output ready to load into any spreadsheet, database, or pipeline.
- Automatic retries ensure a complete list even under heavy traffic.

### How it works

1. You give the actor a category or keyword (e.g. `"wireless earbuds"`, `"laptops"`, `"kitchen gadgets"`) and how many results you want.
2. The actor pulls AliExpress's own "sort by orders" ranking for that category and reads off each product card: title, price, rating, and how many have been sold.
3. Results stream into your dataset in rank order, #1 first.

You don't need to manage any browsers or scrapers, and you don't need to know AliExpress's internal category IDs.

### Input

```json
{
  "category": "wireless earbuds",
  "maxItems": 60,
  "country": "US",
  "currency": "USD",
  "maxRequestRetries": 6,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}
```

| Field | Type | Description |
|---|---|---|
| `category` | string | What to find bestsellers for. Either a category name/keyword (e.g. `"wireless earbuds"`, `"laptops"`) or a numeric AliExpress category ID (e.g. `"100003109"`) for a strict category filter. |
| `maxItems` | integer | Maximum number of ranked products to return. Each page has up to 60. Default: 60. |
| `country` | string | Two-letter ISO country code for localized pricing and shipping (e.g. `US`, `GB`, `DE`). Default: `US`. |
| `currency` | string | ISO currency code for displayed prices (e.g. `USD`, `EUR`, `GBP`). Default: `USD`. |
| `maxRequestRetries` | integer | Per-request retry budget before giving up. Default: 6. |
| `proxyConfiguration` | object | Apify Proxy or your own proxy list. RESIDENTIAL group is required. |

**Category name vs. category ID:** A plain keyword like `"wireless earbuds"` is the most reliable option — it works exactly like searching AliExpress yourself, just ranked by orders instead of relevance. A numeric category ID gives a stricter filter, but AliExpress's internal category tree changes over time, so double-check the ID still maps to what you expect (find one by browsing AliExpress and looking for `postCatIds=XXXXXX` in the URL).

### Output

One record per product, in bestseller rank order:

```json
{
  "rank": 1,
  "category": "wireless earbuds",
  "page": 1,
  "position": 1,
  "productId": "3256806779925038",
  "title": "Digital Display Bluetooth Earphones with Mic TWS E6S Wireless Bluetooth Headset Noise Cancelling Headset for Xiaomi Huawei Oppo",
  "price": 0.33,
  "priceMax": null,
  "currency": "USD",
  "priceFormatted": "US $0.33",
  "originalPrice": 5.47,
  "discount": 93,
  "rating": 4.9,
  "ratingCount": null,
  "orders": 100000,
  "ordersRaw": "100K+ sold",
  "freeShipping": false,
  "image": "https://ae-pic-a1.aliexpress-media.com/kf/Sc752fce18a1247459d9bf29ae6914e6dr.jpg",
  "url": "https://www.aliexpress.com/item/3256806779925038.html",
  "sponsored": false,
  "hasStorefront": true,
  "scrapedAt": "2026-08-06T10:01:38Z",
  "totalResults": 41342,
  "pageSize": 60
}
```

Real sample — top of a `"wireless earbuds"` run (20 items requested):

| rank | title | price | orders | rating |
|---|---|---|---|---|
| 1 | Digital Display Bluetooth Earphones with Mic TWS E6S... | $0.33 | 100K+ sold | 4.9 |
| 2 | 50,000+ sold-tier earphone, silicone in-ear... | $0.33 | 50,000+ sold | 4.3 |
| 3 | Wireless Earphones 9D Stereo Charging Box Sports... | $1.33 | 50,000+ sold | 4.9 |
| ... | (16 more, all 50,000+ sold) | | | |
| 19 | Lenovo XT53 Wireless Upgrade Bluetooth 5.4 Earphones... | $11.19 | 10,000+ sold | 4.8 |
| 20 | Bluetooth 5.4 Ear Hook Headphones TWS Wireless Earphones... | $5.59 | 10,000+ sold | 4.9 |

Orders drop in a clean staircase — 100K+, then a run of 50,000+, then 10,000+ — confirming these really are ranked by sales volume, not just relevance.

| Field | Type | Description |
|---|---|---|
| `rank` | integer | Bestseller rank, 1 = top seller. Sequential across pages. |
| `category` | string | The category/keyword you supplied. |
| `page` | integer | Result page this product appeared on. |
| `position` | integer | Position on that page (1-indexed). |
| `productId` | string | AliExpress product ID. |
| `title` | string | Full product title. |
| `price` | number | Current sale price. |
| `originalPrice` | number | Pre-discount price (if any). |
| `discount` | integer | Discount percentage (0 if no discount). |
| `currency` | string | ISO currency code. |
| `rating` | number | Average star rating (0–5), where shown. |
| `orders` | integer | Orders count, parsed to a plain number (e.g. `100000` for "100K+ sold"). |
| `ordersRaw` | string | The orders count as AliExpress displays it (e.g. `"100K+ sold"`). |
| `freeShipping` | boolean | Whether free shipping is offered. |
| `image` | string | Primary product image URL. |
| `url` | string | Direct link to the product page. |
| `sponsored` | boolean | `true` for paid-placement cards. |
| `hasStorefront` | boolean | Whether the seller has a visible storefront. |
| `totalResults` | integer | Total products AliExpress reports for this category/keyword. |
| `scrapedAt` | string | ISO 8601 timestamp of when the record was collected. |

### Other AliExpress Scrapers

| Actor | Description |
|---|---|
| [AliExpress Search Scraper](https://apify.com/search?q=aliexpress-search-scraper) | Keyword search results across multiple pages. |
| [AliExpress Category Scraper](https://apify.com/search?q=aliexpress-category-scraper) | Browse products by category ID. |
| [AliExpress Bestsellers Scraper](https://apify.com/search?q=aliexpress-bestsellers) | Top-selling products ranked by orders. |
| [AliExpress Product Scraper](https://apify.com/search?q=aliexpress-product-scraper) | Full product detail from individual product URLs. |
| [AliExpress Store Scraper](https://apify.com/search?q=aliexpress-store-scraper) | Store profile and identity data from seller pages. |
| [AliExpress Review Scraper](https://apify.com/search?q=aliexpress-review-scraper) | Per-product review aggregates for every item in a store. |

# Actor input Schema

## `category` (type: `string`):

What to find bestsellers for. Either a category name/keyword (e.g. 'wireless earbuds', 'laptops') or a numeric AliExpress category ID (e.g. '100003109') for a strict category filter.

## `maxItems` (type: `integer`):

Maximum number of ranked products to return. Each page of results has up to 60 products.

## `country` (type: `string`):

Two-letter ISO country code for pricing and shipping (e.g. US, GB, DE).

## `currency` (type: `string`):

ISO currency code for displayed prices (e.g. USD, EUR, GBP).

## `maxRequestRetries` (type: `integer`):

How many times a blocked request will be retried with a new proxy and TLS profile before giving up.

## `proxyConfiguration` (type: `object`):

Apify Proxy or your own proxy list. RESIDENTIAL group is required to bypass the AliExpress WAF.

## Actor input object example

```json
{
  "category": "wireless earbuds",
  "maxItems": 60,
  "country": "US",
  "currency": "USD",
  "maxRequestRetries": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `rank` (type: `string`):

Position in the ranking. Whole number.

## `page` (type: `string`):

Page as reported by the source.

## `position` (type: `string`):

Position in the result list. Whole number.

## `productId` (type: `string`):

Product Id as reported by the source.

## `title` (type: `string`):

Title of the item.

## `price` (type: `string`):

Price of the item. Numeric value.

## `priceMax` (type: `string`):

Price Max as reported by the source.

## `priceFormatted` (type: `string`):

Price as displayed by the source.

## `originalPrice` (type: `string`):

Price before discount. Numeric value.

## `discount` (type: `string`):

Discount. Whole number.

## `rating` (type: `string`):

Rating score. Numeric value.

## `ratingCount` (type: `string`):

Number of ratings. Whole number.

## `orders` (type: `string`):

Orders.

## `ordersRaw` (type: `string`):

Orders Raw as reported by the source.

## `freeShipping` (type: `string`):

Free Shipping as reported by the source.

## `image` (type: `string`):

Image URL.

## `url` (type: `string`):

Direct link to the scraped item.

## `sponsored` (type: `string`):

Sponsored as reported by the source.

## `hasStorefront` (type: `string`):

Has Storefront. Boolean value.

## `scrapedAt` (type: `string`):

Scraped At as reported by the source.

## `totalResults` (type: `string`):

Total Results.

## `pageSize` (type: `string`):

Page Size as reported by the source.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "category": "wireless earbuds",
    "maxItems": 60,
    "country": "US",
    "currency": "USD",
    "maxRequestRetries": 6
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/aliexpress-bestsellers").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "category": "wireless earbuds",
    "maxItems": 60,
    "country": "US",
    "currency": "USD",
    "maxRequestRetries": 6,
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/aliexpress-bestsellers").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "category": "wireless earbuds",
  "maxItems": 60,
  "country": "US",
  "currency": "USD",
  "maxRequestRetries": 6
}' |
apify call xtracto/aliexpress-bestsellers --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/aliexpress-bestsellers"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vE9op7Myq41dsbSdL/builds/cTtYBESKz3HK9oV6o/openapi.json
