# AliExpress Scraper: Products, Prices, Discounts & Deals (`mjohnson7cd/aliexpress-scraper`) Actor

Scrape AliExpress search results with sale price, original price, discount %, sold count, rating and store. Filter to real deals by minimum discount and units sold. Currency and ship-to country pinned on every row. No proxy needed. Export CSV, Excel or JSON. Beta: feedback welcome.

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

## Pricing

from $1.38 / 1,000 product scrapeds

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

Scrape **AliExpress** search results into a clean table: sale price, original
price, **discount %**, amount saved, **units sold**, star rating, store name,
Choice and free-shipping flags, images and product URL. Every row carries its own
**currency and ship-to country**, and exports to CSV, Excel, JSON or the Apify API.

Built for **deal hunting and dropshipping research**: it returns what is *actually
discounted and actually selling*, not a raw product dump. Set a minimum discount
and a minimum units-sold figure, and anything that misses either threshold is
dropped **before you are charged for it**.

> **Beta.** The output fields and the charged event are stable and covered by an
> automated regression suite. Input options may still gain fields. Problems and
> requests go on the [Issues tab](https://apify.com/mjohnson7cd/aliexpress-scraper/issues),
> which is the fastest way to reach me.

### What data can this AliExpress scraper extract?

Per product, from AliExpress search results:

- **Prices that mean something** - sale price, original price, discount percent,
  amount saved, and the currency pinned on every single row. A row never carries a
  price without its currency.
- **Sales volume** - `sold_count` as AliExpress's own number where it exists.
- **Rating**, store name, Choice badge, free shipping, sponsored flag.
- **"Lowest price in 90 days"** badge, captured as `lowest_price_days`.
- **New-shopper price flag** - AliExpress shows anonymous visitors a first-order
  "welcome deal" price. `new_shopper_price: true` marks those rows, so you can tell
  a real discount from a one-time coupon.
- Images, product URL, product id, and the query, page and position it came from.

### How to scrape AliExpress: step by step

1. Click **Try for free** and sign in to Apify.
2. Type one or more keywords into **Search queries** - `wireless earbuds`,
   `phone case`, `led strip`.
3. Optional: set **Minimum discount %** and **Minimum units sold** to keep only
   real deals, and **Sort by** `discount` or `sold`.
4. Optional: set **Currency** and **Ship to country**. AliExpress prices and taxes
   depend on the destination, so this changes the numbers you get.
5. Click **Start** and watch rows arrive. Export from the **Storage** tab as CSV,
   Excel, JSON or XML, or pull them over the [Apify API](https://docs.apify.com/api/v2).

On the Apify platform you also get [scheduling](https://docs.apify.com/platform/schedules),
run [monitoring](https://docs.apify.com/platform/monitoring),
[integrations](https://docs.apify.com/platform/integrations) (Make, Zapier, Slack,
Google Sheets, webhooks) and proxy rotation, without writing any of it yourself.

### How much does it cost to scrape AliExpress?

One paid event: **`product-scraped`**, priced per product delivered by your Apify
plan: **$0.0025** on Free, **$0.00213** on Starter, **$0.00175** on Scale and
**$0.00138** on Business and above. No monthly fee and no per-compute-unit surprise:
on the Free plan a run of 100 products costs about **$0.25**, and 1,000 products
about **$2.50**. Apify adds its own $0.00005 run-start charge, once per run: memory is
capped at 1 GB, which keeps it to a single start event.

What is **not** charged:

- Products your discount or units-sold filters removed.
- Duplicate products - one seen on two result pages, or under two of your keywords,
  is delivered and charged once (under the first keyword that found it).
- Rows that failed, and padding rows AliExpress adds to a no-match search.
- AliExpress's **"welcome gift" cards** ("free with any purchase" offers for new
  shoppers). They show no price and link to a promo page instead of the product, so
  they are dropped from the results: never delivered, never charged. The run's
  `RUN_STATS` record counts them under `quality.gift_cards_dropped`.
- A results page where most prices are missing (a sign AliExpress changed its page):
  it is skipped and reported in the run log, not delivered.
- `productUrls` / `productIds` lookups, which are **free** (see the limits below).

Your **max cost per run** is respected: the run stops cleanly when it is reached
rather than overrunning your cap. Once it is reached, **everything stops, including
the free `productUrls` / `productIds` lookups**: product ids not reached by then
return no row. Search keywords run first, so a cap that only pays for search results
leaves no product lookups. Apify also covers the first 5 seconds of compute on
every run.

**Cached rows cost the same as fresh ones.** With `useCache` on, a search result
served from the cache is charged as `product-scraped` exactly like one fetched live;
the cache saves time and load on AliExpress, not money.

### AliExpress scraper input

| Field | Meaning |
|---|---|
| `searchQueries` | Keywords, e.g. `wireless earbuds`, `phone case`, `led strip` |
| `maxPagesPerQuery` | Result pages per keyword (60 products per page). Default 2 |
| `maxResultsPerQuery` | Stop after this many delivered products. Default 100 |
| `minDiscountPercent` | Only products at least this % off. Default 0 |
| `minSold` | Only products with at least this many units sold. Default 0 |
| `sortBy` | `relevance` (AliExpress order), `discount` or `sold` |
| `currency` | Price currency, default `USD` |
| `shipToCountry` | Destination country code, default `US`. Prices and taxes depend on it |
| `productUrls` / `productIds` | Specific AliExpress products (see the limits below) |
| `proxyType` | `none` (default), `datacenter`, `residential` |
| `useCache`, `cacheMaxAgeHours`, `forceRefresh` | Freshness controls |

```json
{
  "searchQueries": ["wireless earbuds", "smart watch"],
  "maxPagesPerQuery": 3,
  "minDiscountPercent": 60,
  "minSold": 500,
  "sortBy": "discount",
  "currency": "USD",
  "shipToCountry": "US"
}
```

### AliExpress product data: output example

One row per product, same columns every time, CSV and Excel friendly:

```json
{
  "product_id": "1005011807602955",
  "title": "2026 New Air 3 Pro3 Bluetooth Wireless Earbuds ...",
  "price": 13.41, "original_price": 57.47, "discount_percent": 76,
  "discount_amount": 44.06, "currency": "USD", "formatted_price": "US $13.41",
  "new_shopper_price": true, "lowest_price_days": 90,
  "sold_count": 4244, "sold_text": "4,000+ sold", "rating": 4.9,
  "store_name": null, "is_sponsored": false, "is_choice": false, "free_shipping": false,
  "ship_to_country": "US",
  "url": "https://www.aliexpress.com/item/1005011807602955.html",
  "query": "wireless earbuds", "page": 1, "position": 1,
  "from_cache": false, "cache_age_seconds": null
}
```

Two dataset views are built in: **Products** (everything) and **Deals** (discount
first). Both render as a table in the Storage tab.

### AliExpress scraper limits, stated plainly

- **Store name appears on about 45% of search rows** - every sponsored listing and
  some organic ones. AliExpress does not put it in the search data for the rest, and
  this Actor does not guess it.
- **`productUrls` / `productIds` return title, image gallery, id and URL only, with
  no price.** AliExpress product pages load price, store and rating in the browser
  behind a captcha-protected API. Prices come from search results. Because those rows
  carry no price, they are **not charged**.
- **Welcome-gift cards are dropped.** AliExpress mixes up to 25 of them into a page of
  60 results, so a search page can return fewer than 60 rows. Raise
  `maxPagesPerQuery` if you need a set number of products per keyword.
- Rarely, a search result has **no price on AliExpress itself**. That row has empty
  price and currency fields rather than a guess, and is charged like any other search
  result.
- `sold_count` is AliExpress's exact number when present; otherwise it is parsed from
  text like "4K+ sold" and is a lower bound.
- **No proxy needed.** AliExpress serves full search pages to plain cloud IPs, so the
  default uses no proxy and you pay no proxy cost. Datacenter or residential proxy can
  be switched on if your runs ever get blocked.
- **Live by default.** Every run fetches live. An optional short-lived cache
  (`useCache`, 3 hours and never more than 6) can reuse a recent result; it lives in
  your own Apify account, expired entries are deleted, and every row shows
  `from_cache` and `cache_age_seconds`. Details below.
- **Bounded input.** Up to 200 search keywords and 100 product URLs or ids per run.
- **A blocked run stops itself.** If 5 fetches in a row stay blocked after every
  retry, the run stops cleanly with what it has, says so in its status message and
  records `stopped_blocked` in the `RUN_STATS` record. You are never charged for a
  blocked page.

### AliExpress cache: what is stored, where, and for how long

Only when you turn on `useCache` (it is **off** by default):

- **Where:** a named key-value store called **`aliexpress-cache`** in **your own**
  Apify account (Storage → Key-value stores). Nobody else's runs read it, and it is
  not shared with the developer.
- **What:** the finished product rows of each search page and product page this
  Actor fetched for you, keyed by a hash of currency, ship-to country, keyword and
  page (or product id). No login, cookies or personal data.
- **How long:** 3 hours, never more than 6 hours whatever the settings;
  `cacheMaxAgeHours` can make it stricter. An expired entry is deleted when it is
  next read, and every cached run ends with a sweep of up to 1,000 entries that
  deletes the expired ones.
- Named stores are kept by Apify until you delete them, so if you stop using the
  cache, delete `aliexpress-cache` from your Storage tab. This Actor never deletes
  a store for you.

### AliExpress scraper FAQ

**Is scraping AliExpress legal?** This Actor reads the same public search pages any
visitor sees, takes no login, and collects no personal data. You are responsible for
how you use the output, including AliExpress's terms and the law where you operate.
If you need legal certainty, ask a lawyer, not a scraper.

**Why is a price missing?** Either AliExpress shows no price for that product in its
search results (rare; those rows are still charged), or the row came
from `productUrls`/`productIds`, which have no price server-side and are free.

**Can I get prices for a specific product URL?** Not reliably, and this Actor will not
pretend otherwise - see the limits. Search for the product instead.

**Does a run stop at my budget?** Yes. Set max cost per run and the Actor stops
cleanly at the cap. The free product lookups stop with it, so raise the cap if you
need both search results and product lookups in one run.

**Is a cached result cheaper?** No. A `useCache` hit is charged like a live fetch.

**Can I run it on a schedule or from code?** Yes - schedule it in Apify, or call it
over the [API](https://docs.apify.com/api/v2) and the
[Python](https://docs.apify.com/sdk/python)/[JS](https://docs.apify.com/sdk/js) clients.

**Something is broken or missing.** Open an issue on the
[Issues tab](https://apify.com/mjohnson7cd/aliexpress-scraper/issues).

### Ready-made examples

One-click starting points. Each opens with the input filled in, ready to run or edit:

- [Find AliExpress deals over 50% off](https://apify.com/mjohnson7cd/aliexpress-scraper/examples/aliexpress-deals-over-50-percent-off)
- [List AliExpress best sellers for a keyword](https://apify.com/mjohnson7cd/aliexpress-scraper/examples/aliexpress-best-sellers-by-keyword)
- [Check AliExpress prices in EUR for Germany](https://apify.com/mjohnson7cd/aliexpress-scraper/examples/aliexpress-prices-in-euro-for-germany)

### Other Actors by the same author

| Actor | What it does |
|---|---|
| [Walmart Scraper](https://apify.com/mjohnson7cd/walmart-scraper) | Walmart search, product pages, seller offers and reviews in one Actor |
| [Walmart Search Scraper](https://apify.com/mjohnson7cd/walmart-search-scraper) | Walmart products and prices by keyword |
| [Walmart Product Scraper](https://apify.com/mjohnson7cd/walmart-product-scraper) | Walmart price, stock and seller offers by product URL or item ID |
| [Walmart Reviews Scraper](https://apify.com/mjohnson7cd/walmart-reviews-scraper) | Walmart customer reviews by product URL or item ID |
| [EU Company Registry & KYB Lookup](https://apify.com/mjohnson7cd/eu-company-registry-kyb) | Company lookups in the official FR, NO, FI and CZ registries |
| [API Endpoint Crawler](https://apify.com/mjohnson7cd/api-endpoint-crawler) | Finds the API endpoints a website's JavaScript calls |
| [Tech Stack Fingerprinter](https://apify.com/mjohnson7cd/tech-stack-fingerprinter) | Detects a website's server, CDN, frameworks, CMS, analytics and security headers |
| [Subdomain Finder](https://apify.com/mjohnson7cd/subdomain-finder) | Finds a domain's subdomains from certificate transparency and DNS, probed live |

### Affiliation

Not affiliated with or endorsed by AliExpress or Alibaba Group. AliExpress is a
trademark of its owner, used here only to describe the source of the data.

# Changelog

This Actor's version history is a separate document: https://apify.com/mjohnson7cd/aliexpress-scraper/changelog.md

# Actor input Schema

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

Keywords to search on AliExpress, exactly as you would type them in the AliExpress search box. Each results page holds up to 60 products.

## `productUrls` (type: `array`):

AliExpress product page URLs (https://www.aliexpress.com/item/<id>.html, also aliexpress.us and country subdomains). Returns the title and full image gallery; prices are only available from search (see README).

## `productIds` (type: `array`):

AliExpress product IDs (the number in /item/<id>.html). Same output as Product URLs.

## `maxPagesPerQuery` (type: `integer`):

How many search result pages to read for each keyword. AliExpress shows up to 60 products per page.

## `maxResultsPerQuery` (type: `integer`):

Stop a keyword after this many products have been delivered (after deal filters), even if more pages are allowed.

## `minDiscountPercent` (type: `integer`):

Only return products discounted by at least this percentage off the original price. 0 returns everything. Filtered-out products are not charged.

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

Only return products that have sold at least this many units. 0 returns everything. Filtered-out products are not charged.

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

relevance keeps AliExpress order and streams results page by page. discount or sold reads all requested pages first, then returns the biggest discounts (or best sellers) first.

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

Currency AliExpress should price in. Every row also carries a currency column with the currency AliExpress actually returned.

## `shipToCountry` (type: `string`):

Two-letter country code (e.g. US, DE, GB). AliExpress prices, taxes and shipping depend on the destination country.

## `proxyType` (type: `string`):

AliExpress does not need a proxy, so the default is none (no proxy cost). Switch to datacenter or residential only if your runs start getting blocked.

## `useCache` (type: `boolean`):

Off by default: every run fetches live from AliExpress. Turn on to reuse a result fetched in the last few hours (3 hours by default, never more than 6 for price data) instead of fetching it again. The cache lives in your own Apify account and expired entries are deleted. Every row shows from_cache, cached_at and cache_age_seconds.

## `cacheMaxAgeHours` (type: `integer`):

Ignore cached results older than this many hours. Leave empty to accept anything within the cache lifetime (3 hours).

## `forceRefresh` (type: `boolean`):

Only with Use short-lived cache on: skip cached results, fetch everything live for this run and refresh the cache with the new results.

## Actor input object example

```json
{
  "searchQueries": [
    "wireless earbuds"
  ],
  "maxPagesPerQuery": 2,
  "maxResultsPerQuery": 100,
  "minDiscountPercent": 0,
  "minSold": 0,
  "sortBy": "relevance",
  "currency": "USD",
  "shipToCountry": "US",
  "proxyType": "none",
  "useCache": false,
  "forceRefresh": false
}
```

# Actor output Schema

## `results` (type: `string`):

One row per product. Every row carries the same columns, including currency, ship_to_country and the freshness fields from_cache, cached_at and cache_age_seconds.

## `productsView` (type: `string`):

The Products view: price, discount, sold count, rating and store, with the query and position each product came from.

## `dealsView` (type: `string`):

The Deals view: discount first, with amount saved, units sold, new-shopper price flag, lowest-price-in-N-days badge and free shipping.

## `runStats` (type: `string`):

Rows per billing event, blocked or failed pages, currency mismatches and defects, rows removed by deal filters, HTTP bytes used, and cache hit rate.

# 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": [
        "wireless earbuds"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mjohnson7cd/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": ["wireless earbuds"] }

# Run the Actor and wait for it to finish
run = client.actor("mjohnson7cd/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": [
    "wireless earbuds"
  ]
}' |
apify call mjohnson7cd/aliexpress-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mjohnson7cd/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/5WlVX1IGyycFWtF3U/builds/pInUKjBAvRrvv9YzP/openapi.json
