# AliExpress Scraper - Products, Sold Count, Prices, Market Data (`centorprat/aliexpress-scraper`) Actor

Scrape AliExpress search results by keyword (sorted by orders, price or best match): price, original price, discount, units sold, rating, Choice and badges, image, link. Plus a free market summary per keyword for product research and dropshipping. No login.

- **URL**: https://apify.com/centorprat/aliexpress-scraper.md
- **Developed by:** [Centor Prat](https://apify.com/centorprat) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.68 / 1,000 products

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Scraper - Products, Sold Count, Prices, Market Data

**Scrape AliExpress search results** for any keyword, sorted by **most orders**, best match or price, with a price
range filter. One row per product: product ID, title, **sale price**, **original price**, **discount %**, currency,
**units sold** (parsed from "10,000+ sold"), **rating**, **AliExpress Choice** flag, badges (delivery promise, coupons,
top seller...), image and product link. No login, no browser.

Free with every keyword: a **market summary row**: total results, price min / median / max, units sold across the
listed products, median sold, average rating, Choice / discount shares, the **top 5 sellers** and the most common
badges. Product research in one row.

### 📥 Input

| Field | Meaning |
|---|---|
| `searchQueries` | e.g. `["magsafe case", "led strip lights"]` |
| `maxProductsPerSearch`, `sortBy` | size and order (most orders = what sells) |
| `minPrice`, `maxPrice`, `currency` | price filters |
| `minSold`, `minRating`, `onlyChoice` | keep the rows you want |

```json
{ "searchQueries": ["pet hair remover", "magnetic phone mount"], "sortBy": "orders", "maxProductsPerSearch": 120, "minSold": 500 }
```

### 📤 Output

Product:

```json
{ "productId": "3256808124849156", "title": "Luxury For Magsafe Bracket Case For iPhone 18 17 ...", "price": 2.88, "originalPrice": 6.38,
  "discountPercent": 55, "currency": "USD", "sold": 10000, "soldText": "10,000+ sold", "rating": 4.5, "isChoice": true,
  "badges": ["New shoppers save $3.5"], "url": "https://www.aliexpress.com/item/3256808124849156.html" }
```

Market summary:

```json
{ "type": "marketSummary", "searchQuery": "magsafe case", "totalResults": 79261, "price": {"min": 0.33, "median": 4.83, "max": 27.1},
  "unitsSoldListed": 810000, "medianSold": 10000, "averageRating": 4.66, "choiceShare": 0.46,
  "topSellers": [{"title": "Magnetic Luxury Lens Protector Matte Case ...", "sold": 100000}] }
```

### 💡 Uses

- **Dropshipping and e-commerce product research**: what sells (units sold), at what price, with what discounts.
- **Price monitoring**: track prices and discounts for your keywords on a schedule.
- **Sourcing**: shortlist well-rated, high-volume Choice products.

### 💰 Pricing

Pay per product returned (`product` event). Market summaries are free. Empty searches are free.

### 🤖 API / agents

```bash
curl -X POST "https://api.apify.com/v2/acts/centorprat~aliexpress-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
     -H "Content-Type: application/json" -d '{"searchQueries": ["wireless earbuds"], "sortBy": "orders", "maxProductsPerSearch": 60}'
```

MCP: `https://mcp.apify.com/?tools=actors,docs,centorprat/aliexpress-scraper`

### ❓ FAQ

- **Login needed?** No. Public search results.
- **Exact sales numbers?** AliExpress shows rounded "sold" counts (e.g. 10,000+); we parse that number.

# Actor input Schema

## `searchQueries` (type: `array`):

e.g. \["magsafe case", "led strip lights"].

## `maxProductsPerSearch` (type: `integer`):

60 per page.

## `sortBy` (type: `string`):

AliExpress sort order.

## `minPrice` (type: `integer`):

AliExpress price filter.

## `maxPrice` (type: `integer`):

AliExpress price filter.

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

Prices in this currency.

## `minSold` (type: `integer`):

Keep products with at least this many sold (as AliExpress shows it, e.g. 1,000+).

## `minRating` (type: `number`):

Keep products rated at least this.

## `onlyChoice` (type: `boolean`):

Keep Choice products only (faster shipping, AliExpress-backed).

## `marketSummary` (type: `boolean`):

Free summary per keyword: price range, units sold, top sellers, Choice / discount shares.

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

For very large runs: route through Apify Proxy if AliExpress starts rate-limiting.

## Actor input object example

```json
{
  "searchQueries": [
    "magsafe case"
  ],
  "maxProductsPerSearch": 30,
  "sortBy": "best-match",
  "currency": "USD",
  "onlyChoice": false,
  "marketSummary": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `rows` (type: `string`):

One row per product (price, original price, discount, sold, rating, Choice, badges, image, link) plus one marketSummary row per keyword.

# 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 = {
    "searchQueries": [
        "magsafe case"
    ],
    "maxProductsPerSearch": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("centorprat/aliexpress-scraper").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 = {
    "searchQueries": ["magsafe case"],
    "maxProductsPerSearch": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("centorprat/aliexpress-scraper").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 '{
  "searchQueries": [
    "magsafe case"
  ],
  "maxProductsPerSearch": 30
}' |
apify call centorprat/aliexpress-scraper --silent --output-dataset

```

## MCP server setup

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

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/AVwXFP5SuaktVFkxG/builds/8wfsekkLd9rpJphBL/openapi.json
