# AliExpress Scraper — Product Prices, Sales & Ratings (`zinin/aliexpress-scraper`) Actor

Search AliExpress by keyword and get price, discount, currency, sold count, star rating, free-shipping flag, badges, image and item URL for each product — for the ship-to country and currency you choose. No login or API key.

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

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 — Product Prices, Sales & Ratings

Get live AliExpress search results as clean rows: price and currency, original price and discount percent, number sold, star rating, free-shipping flag, the badges AliExpress puts on the card, image and the direct item URL — for any keyword or AliExpress search URL, priced for the ship-to country and currency you choose. No AliExpress account and no API key.

AliExpress is the largest cross-border marketplace in the world: hundreds of millions of products from Chinese manufacturers and resellers, shipped to almost every country, with prices, delivery promises and even which listings appear depending on where the buyer is. The same "wireless earbuds" search looks different for a shopper in the United States, Germany or Brazil. This Actor opens the public AliExpress search results page exactly as a logged-out shopper in your chosen country sees it and turns every product card into one structured row. You choose the keywords, the ship-to country, the currency and how many products you need, and get a dataset you can download as JSON, CSV or Excel, pull through the Apify API, or send to Google Sheets, Make, n8n, Zapier or an AI agent over MCP.

It is built for recurring sourcing and price work: run it daily on the same keywords, compare the rows, and you see which products are gaining orders, who cut a price, and how list prices and discounts move in your market (shipping cost is not included).

### What you get

One row per product card on the AliExpress search results page:

- **Product identity** — `productId` (AliExpress's own product id, stable across runs), full product `title`, direct `url` to the item page (`https://www.aliexpress.com/item/<productId>.html`).
- **Price** — `price` in `currency` (e.g. `USD`, `EUR`, `GBP`), `formattedPrice` exactly as the card shows it, `originalPrice` when the card carries a struck-through price, and `discountPct` when AliExpress shows a discount.
- **Demand** — `soldCount`, the number of orders parsed from the card's "sold" text, plus `soldText` exactly as shown (e.g. "10,000+ sold"), so you can rank products by real sales.
- **Social proof** — `rating`, the card's average star rating (0–5); newer listings often show none (`null`).
- **Delivery and promotions** — `freeShipping` (true when the card carries AliExpress's unconditional free-shipping tag) and `badges`, every text tag on the card: free shipping, delivery promise, "lowest price in 30 days", instalments, savings. Image-only tags (logos without text) are not included.
- **Store** — `storeName` and `storeUrl` when the search card names the store (often it does not; the item page always does).
- **Position** — `position` (rank in the search, 1 = top, continuing across pages) and `page`, so you can track ranking over time.
- **Context** — the `query` and `searchUrl` that produced the row, the `shipToCountry` you asked for, and a `scrapedAt` timestamp.

Every row is a real product that AliExpress showed for your search. Keywords with genuinely no matches, blocked pages, stopped pagination and budget stops are reported as **free** rows with an `error` field, so you always know what happened to each keyword and never pay for an explanation.

### Who uses it

- **Dropshippers and e-commerce sellers** finding winning products by orders and rating, and checking supplier prices before listing on Shopify, Amazon or eBay.
- **Brands and distributors** watching AliExpress listings of their products and look-alikes: price floors, discount campaigns, sales volume.
- **Pricing and sourcing teams** feeding daily AliExpress prices into a repricing tool or a BI dashboard next to their own catalogue.
- **Market researchers** sizing a niche: how many products, what price band, how concentrated the orders are, how prices differ by country.
- **Affiliate and content publishers** building "best budget earbuds" style pages from fresh prices, ratings and item links.
- **AI agents** that need a grounded answer about current AliExpress prices and can call the Actor as an MCP tool.

### How to run

1. Click **Try for free** (or **Start**) on this page. You need a free Apify account; no AliExpress account, no API key.
2. In **Search keywords**, enter one or more keywords, one per line (`wireless earbuds`, `phone case iphone 15`).
3. Pick **Ship to country** and **Currency**. Prices, shipping badges and even which products appear depend on the ship-to country.
4. Optional: choose **Sort by** (best match, most orders, price low → high, price high → low).
5. Optional: paste AliExpress search URLs (`https://www.aliexpress.com/w/wholesale-….html`) into **AliExpress search URLs**. The keyword is taken from the URL; filters and sort set on the site are not reused, order comes from the **Sort** field.
6. Optional: turn on **Include suggested results**. When AliExpress cannot match a keyword it shows products for a different, spell-corrected or loosely related query; by default you get one free row saying so instead of paying for unrelated products.
7. Set **Max products per keyword or URL** (up to 600). One results page holds 60 products.
8. Click **Start**. The prefilled example (`wireless earbuds`, United States, USD, 20 products) finishes in about 40–60 seconds in the Apify cloud (measured on 9 Nov 2026).
9. Open the **Output** tab: the *Products* view shows image, title, price, discount, sold count, rating and link; the *Errors and empty searches* view shows the free explanation rows.

To run it on a schedule, open **Schedules**, pick the Actor (or a saved task with your keywords) and choose daily or hourly.

### Pricing

This Actor uses **pay per event** pricing. You pay only for products actually delivered to your dataset, plus a small start fee:

| Event | Price | When it is charged |
|---|---|---|
| Actor start | $0.005 per GB of memory | Once per run. The default 2 GB memory means two start events. |
| Product found | $0.005 per product | For every product row delivered to the dataset. |

**Example:** with the default 2 GB memory, a run that delivers 100 products costs 2 × $0.005 + 100 × $0.005 = **$0.51**; 1,000 products cost **$5.01**. The same price applies on every Apify plan.

What you do **not** pay for:

- Rows with an `error` field — keywords with genuinely no matches, pages AliExpress did not serve, pagination that stopped early, and the note written when your spending limit is reached — are free.
- Proxy traffic, browser time and retries are included in the product price. You never see a separate proxy bill.

**Spending limit.** Apify lets you set *Max total charge* for any run. The Actor checks the remaining budget **before** every product and stops cleanly when the next product would exceed it, then writes a free row saying so.

### Input contract

| Field | Type | Default | What it does |
|---|---|---|---|
| `searchQueries` | array of strings | — (prefill `["wireless earbuds"]`) | Keywords to search. Up to 50 keywords and URLs per run; duplicates are removed. |
| `startUrls` | array of URLs | `[]` | AliExpress search URLs of the form `https://www.aliexpress.com/w/wholesale-<keyword>.html`. Only the keyword in the URL is used: query parameters (filters, sort, page) are dropped and the **sort** field decides the order. Item pages, store pages and other AliExpress paths are rejected before any work starts. |
| `maxItems` | integer 1–600 | 60 (prefill 20) | Products to return per keyword or URL. The Actor stops paginating as soon as the limit is reached. |
| `shipToCountry` | string | `US` | Delivery country AliExpress prices for (26 countries, e.g. `US`, `GB`, `DE`, `FR`, `BR`, `AU`). The page is opened through a connection in that country. |
| `currency` | string | `USD` | Currency to show prices in (18 currencies, e.g. `USD`, `EUR`, `GBP`, `BRL`). Each row's `currency` is what AliExpress actually displayed. |
| `sort` | string | `default` | `default` (best match), `orders` (most sold first), `price_asc`, `price_desc`. |

You must provide at least one keyword or one URL. An invalid input fails immediately with a clear message and costs nothing beyond the start event.

**Minimal input (the prefill):**

```json
{
  "searchQueries": ["wireless earbuds"],
  "maxItems": 20,
  "shipToCountry": "US",
  "currency": "USD"
}
```

**Best sellers in Germany, priced in euros:**

```json
{
  "searchQueries": ["usb c cable", "phone holder car"],
  "maxItems": 120,
  "shipToCountry": "DE",
  "currency": "EUR",
  "sort": "orders"
}
```

**Reuse a search URL:**

```json
{
  "startUrls": [{ "url": "https://www.aliexpress.com/w/wholesale-mechanical-keyboard.html" }],
  "maxItems": 60
}
```

### Output examples

Real rows from cloud runs on 9 November 2026.

#### Happy output (United States, USD)

```json
{
  "productId": "3256811844384040",
  "title": "Bluetooth TWS Gaming Earphones Low Latency Wireless In-Ear Headphones With Built-in Mic LED Indicator Lights",
  "url": "https://www.aliexpress.com/item/3256811844384040.html",
  "price": 1.21,
  "originalPrice": 23.43,
  "currency": "USD",
  "discountPct": 94,
  "formattedPrice": "US $1.21",
  "rating": 4.9,
  "soldCount": 3000,
  "soldText": "3,000+ sold",
  "imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/Sb270915bc0a64740a6cc734578b5500c6.jpg",
  "freeShipping": true,
  "badges": [
    "New shoppers save $22.22",
    "Free shipping"
  ],
  "storeName": null,
  "storeUrl": null,
  "position": 1,
  "page": 1,
  "query": "wireless earbuds",
  "shipToCountry": "US",
  "searchUrl": "https://www.aliexpress.com/w/wholesale-wireless-earbuds.html",
  "resultType": "exact",
  "scrapedAt": "2026-11-09T09:53:21.056Z"
}
```

#### Happy output (Germany, EUR)

```json
{
  "productId": "1005007306724394",
  "title": "NNBILI 120W A-C and C-C Phone Super Fast Charging Cable with LED Display Screen, Not Compatible Xiaomi iPhone、Samsung",
  "url": "https://www.aliexpress.com/item/1005007306724394.html",
  "price": 2.27,
  "originalPrice": null,
  "currency": "EUR",
  "discountPct": null,
  "formattedPrice": "€ 2,27",
  "rating": 4.9,
  "soldCount": 100000,
  "soldText": "100K+ sold",
  "imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/Sd0f31d0e4dc9473388d50120bba5ca84F.png",
  "freeShipping": false,
  "badges": [
    "Buy 3+, duty covered"
  ],
  "storeName": null,
  "storeUrl": null,
  "position": 1,
  "page": 1,
  "query": "usb c cable",
  "shipToCountry": "DE",
  "searchUrl": "https://www.aliexpress.com/w/wholesale-usb-c-cable.html?sortType=total_tranpro_desc",
  "resultType": "exact",
  "scrapedAt": "2026-11-09T09:53:42.196Z"
}
```

#### Partial output (some fields genuinely absent on the card)

```json
{
  "productId": "1005013461423764",
  "title": "Transparent Soft Case For iPhone 18 17 Pro Max iPhone18ProMax iPhone18Pro Ultra Thin Silicone Clear Shell Shockproof TPU Cover",
  "url": "https://www.aliexpress.com/item/1005013461423764.html",
  "price": 0.52,
  "originalPrice": null,
  "currency": "GBP",
  "discountPct": null,
  "formattedPrice": "￡0.52",
  "rating": null,
  "soldCount": null,
  "soldText": null,
  "imageUrl": "https://ae-pic-a1.aliexpress-media.com/kf/S719e1f8a74c545eeb884201aadeea9a7T.jpg",
  "freeShipping": false,
  "badges": [],
  "storeName": null,
  "storeUrl": null,
  "position": 1,
  "page": 1,
  "query": "phone case",
  "shipToCountry": "GB",
  "searchUrl": "https://www.aliexpress.com/w/wholesale-phone-case.html?sortType=price_asc",
  "resultType": "exact",
  "scrapedAt": "2026-11-09T09:44:19.604Z"
}
```

#### Failure output (no exact match for the keyword)

```json
{
  "productId": null,
  "title": null,
  "price": null,
  "currency": null,
  "url": null,
  "query": "qzxqzv kplmwq zzxv",
  "shipToCountry": "US",
  "searchUrl": "https://www.aliexpress.com/w/wholesale-qzxqzv-kplmwq-zzxv.html",
  "error": "\"qzxqzv kplmwq zzxv\" (ship to US): AliExpress found no exact match for this keyword (searchResultType \"few_result\") and showed products for a different query instead. Nothing was charged. Set includeSuggestedResults to true to get those products anyway.",
  "scrapedAt": "2026-11-09T09:44:19.825Z"
}
```

When AliExpress blocks every request in a run even through fresh residential proxy sessions, the run still ends as **Succeeded** with the status message "The site blocked all N search(es)… No result was billed, only the run start." — check that message or the `error` field to retry automatically; the error row then reads `The site did not return a result page after 3 attempts (...)`.

### Field dictionary

| Field | Type | Meaning | Notes |
|---|---|---|---|
| `productId` | string | AliExpress product id, e.g. `1005009976198364` | Stable across runs — use it as the primary key. `null` only on error rows. |
| `title` | string | Product title as shown on the card | Language follows the page locale (English is requested). |
| `url` | string | Item page, `https://www.aliexpress.com/item/<productId>.html` | Built from `productId`. |
| `price` | number | Current price on the card (the lowest SKU price for multi-variant listings) | In `currency` units, not cents. Excludes shipping and coupons unless the card included them. |
| `originalPrice` | number | Struck-through price on the card | `null` when the card shows none. AliExpress's "lowest price in 30 days" reference is not used as an original price; it stays in `badges`. |
| `currency` | string | ISO currency code AliExpress displayed | Normally equals the `currency` input; if AliExpress overrides it, the row says so truthfully. |
| `discountPct` | number | Discount percent AliExpress shows for the card | `null` when there is no discount. |
| `formattedPrice` | string | Price text exactly as rendered, e.g. `"€ 443,53"` | Format follows the page locale and currency. |
| `rating` | number | Average star rating, 0–5 | `null` when AliExpress shows no rating on the card. |
| `soldCount` | integer | Orders parsed from `soldText` | "10,000+ sold" becomes `10000` (a lower bound). `null` when the card shows no sales. |
| `soldText` | string | Sales text exactly as shown | |
| `imageUrl` | string | Main product image (AliExpress CDN) | Images are not downloaded by the Actor. |
| `freeShipping` | boolean | Card carries AliExpress's unconditional free-shipping tag | Conditional offers ("Free shipping over $10") are not counted here; they appear in `badges`. |
| `badges` | array of strings | Every text tag on the card | Delivery promise, savings, "lowest price in 30 days", instalments and similar. |
| `storeName` | string | Store name when the search card names it | Often `null` on search cards. |
| `storeUrl` | string | Store page when the search card links it | Often `null` on search cards. |
| `position` | integer | Rank in the search, 1 = top | Continues across pages (page 2 starts at 61). |
| `page` | integer | Results page the product appeared on | 1-based. |
| `query` | string | Keyword that produced the row | For URL inputs, the keyword AliExpress reports for that page. |
| `shipToCountry` | string | Ship-to country requested in the input | |
| `searchUrl` | string | First results page URL for this keyword or URL | |
| `scrapedAt` | string | ISO timestamp when the row was written | UTC. |
| `resultType` | string | `exact` for products AliExpress returned for your keyword, `suggested` for products it showed for a different query | `suggested` rows appear only when **Include suggested results** is on. |
| `error` | string | Present only on free explanation rows | Never present on paid product rows. |

### Evidence and boundaries

- **Source.** Only the public AliExpress search results pages (`www.aliexpress.com/w/wholesale-….html`), the same pages any visitor sees without logging in. The Actor does not open item pages, carts, checkout, account areas or AliExpress's internal APIs.
- **Price is the card price at run time.** AliExpress runs constant promotions (11.11, Choice Day, coupons, new-user deals). The row is what the search card said for a logged-out shopper in your ship-to country. It is not a checkout total and does not include shipping fees, taxes added at checkout or personal coupons.
- **Country matters.** Prices, free-shipping eligibility and the product mix differ by ship-to country; compare like with like.
- **Sales counts are AliExpress's own rounded figures.** "10,000+ sold" is a lower bound, not an exact count.
- **Ranking depends on context.** Result order can vary with location, time and personalisation; the Actor uses a residential connection in your ship-to country and no login, the closest thing to a neutral shopper view.
- **Depth is bounded by the site.** AliExpress lets visitors page through a limited part of a very broad search. For broad keywords, narrow the keyword rather than asking for thousands of rows.
- **Partial results are labelled.** If AliExpress stops serving pages mid-search, you keep the products already delivered and get a free row starting with `Partial:` explaining where it stopped.

How the Actor reaches the page: it opens each results page in a real, privacy-hardened browser through residential proxies in your ship-to country, waits until AliExpress's own page data is present, and reads it. Images, fonts and video are never downloaded. If a page is not usable, it retries with a fresh session up to three times and then reports the keyword as a free error row instead of guessing.

### Decision routing

| What you see in the data | What it usually means | What to do next |
|---|---|---|
| High `soldCount` with `rating` ≥ 4.7 | Proven product with satisfied buyers | Shortlist for sourcing; track price daily |
| Same product from many listings within a narrow price band | Commodity competition | Compete on shipping speed or bundle, not price |
| Large `discountPct` during a sale event | Campaign pricing, often temporary | Compare with the run from a normal week before reacting |
| `freeShipping: false` in your country but true elsewhere | Country-specific shipping policy | Check the delivered cost on the item page |
| Free row `No results found` | Keyword too narrow or misspelled | Broaden or reword the keyword |
| Free row about attempts or `Partial:` | AliExpress did not serve a page | Re-run later; nothing was charged for the missing part |

### Integration recipes

**Apify API (any language).**

```bash
curl -X POST "https://api.apify.com/v2/acts/zinin~aliexpress-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries": ["wireless earbuds"], "maxItems": 60, "shipToCountry": "US", "currency": "USD"}'
```

**Python client.**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("zinin/aliexpress-scraper").call(run_input={
    "searchQueries": ["phone case iphone 15"],
    "maxItems": 120,
    "shipToCountry": "GB",
    "currency": "GBP",
    "sort": "orders",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if not item.get("error"):
        print(item["price"], item["currency"], item["soldCount"], item["url"])
```

**JavaScript client.**

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('zinin/aliexpress-scraper').call({ searchQueries: ['usb c cable'], maxItems: 60, shipToCountry: 'DE', currency: 'EUR' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((i) => !i.error).length, 'products');
```

**Google Sheets, Make, n8n, Zapier.** Use Apify's integrations on a saved task: every finished run can append rows to a sheet or trigger "Get dataset items" in your workflow. Filter out rows where `error` is not empty.

**AI agents (MCP).** The Actor is available as a tool through the Apify MCP server (`https://mcp.apify.com`). Keep `maxItems` small for interactive use.

### Comparing runs over time

1. **Fix the input.** Save a task with the exact keywords, ship-to country, currency, sort and `maxItems`.
2. **Key on `productId`.** It is stable for the life of the listing; titles get edited and positions move every run.
3. **Store `scrapedAt` with every row.** Two rows with the same `productId` and different `price` are a price change between those two timestamps.
4. **Separate "missing" from "gone".** A product that disappears may simply have dropped out of the pages you requested.
5. **Watch `soldCount` growth.** Day-over-day growth in orders is the clearest demand signal AliExpress exposes publicly.

### Operating guide

- **Memory.** The default 2 GB is enough. In the cloud one results page (up to 60 products) takes about 10–30 seconds including the browser start.
- **Run size.** One results page = 60 products. Many keywords in one run cost one start fee instead of many.
- **One country and currency per run.** To compare countries, run one task per country.
- **Timeouts.** The default run timeout is 30 minutes. For very large jobs, raise the timeout or split keywords across runs.
- **Retries.** A keyword that failed with an attempts error is safe to run again; nothing was charged for it.

### Troubleshooting

**I got fewer products than `maxItems`.** AliExpress had fewer matching products, or stopped serving pages — in that case you also get a free `Partial:` row saying where it stopped.

**Prices are in a different currency than I asked for.** AliExpress decided the display currency for that country itself. Every row's `currency` field tells you which one it is; the run log also notes it.

**My pasted URL was rejected.** Only search results URLs like `https://www.aliexpress.com/w/wholesale-<keyword>.html` are accepted. Item pages, store pages and other paths are not read by this Actor.

**Prices look different from what I see in my browser.** Your browser may be logged in (new-user deals, coupons, Choice membership) or set to another country. The Actor sees AliExpress as a logged-out shopper in your ship-to country.

#### Related tools

Related tools for adjacent workflows in e-commerce.

| Actor | What it does |
|---|---|
| [Open Prices Product Price](https://apify.com/zinin/open-prices-product-price) | Pair it in the e-commerce workflow: Find observed product prices by barcode or date in the Open Prices dataset |
| [Shopify Catalog & Merchandising Intelligence](https://apify.com/zinin/shopify-store-intelligence) | Pair it in the e-commerce workflow: Qualify Shopify merchant leads with evidence-backed public catalog coverage, observed price positioning,... |
| [Chotot Vietnam Listings Scraper](https://apify.com/zinin/chotot-listings) | Pair it in the e-commerce workflow: Pull live classified ad listings (real estate, vehicles, electronics, jobs and more) straight from... |
| [Power.no Product Facts | Prices & Stock](https://apify.com/zinin/power-no-product-facts) | Pair it in the e-commerce workflow: Extract NOK prices, online stock and ratings from exact public Power.no product URLs |
| [Zid Product Export Intelligence](https://apify.com/zinin/zid-store-products) | Pair it in the e-commerce workflow: Turn merchant-owned, merchant-authorized, or otherwise licensed Zid product exports into stable evidence,... |

### FAQ

**Do I need an AliExpress account or API key?** No. The Actor reads public search pages.

**Is this the official AliExpress API?** No. AliExpress's official APIs require approved developer or affiliate accounts. This Actor reads the public website the way a shopper's browser does.

**Can I get product descriptions, all SKUs, reviews or seller details?** Not in this Actor — it reads search results, which is what sourcing and price work needs at scale. The `url` field takes you to the item page for anything deeper.

**Why are some fields `null`?** AliExpress only shows a rating, a sales count, a struck-through price or a store name on the card when it has one. The Actor reports exactly what the card showed rather than inventing a value.

**What happens if AliExpress changes its page?** Rows would stop appearing and keywords would return free error rows rather than wrong data.

### Sources and rights

- Data comes from publicly accessible AliExpress search result pages. The Actor does not log in, does not use AliExpress's internal APIs and does not collect personal data about shoppers; store names are business names published by AliExpress.
- Product titles, prices and images belong to AliExpress and the respective sellers. Use the data in line with AliExpress's terms and the laws that apply to you, especially for republication.
- This Actor is not affiliated with, endorsed by or sponsored by Alibaba Group or AliExpress. "AliExpress" is a trademark of its owner and is used here only to describe the data source.
- Report a bug or ask for a feature in the **Issues** tab of this Actor.

# Actor input Schema

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

Keywords to search on AliExpress, e.g. "wireless earbuds", "phone case iphone 15". One keyword per line. Each keyword opens AliExpress's own search results page (www.aliexpress.com/w/wholesale-<keyword>.html).

## `startUrls` (type: `array`):

Paste AliExpress search result URLs of the form https://www.aliexpress.com/w/wholesale-<keyword>.html. Only the keyword in the URL is used: filters and sort in the URL are dropped, the Sort field decides the order. Item pages, store pages and other AliExpress paths are not accepted. Leave empty when using keywords.

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

How many products to return for each keyword or URL. One AliExpress results page holds 60 products.

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

The delivery country AliExpress should price and filter for. Prices, shipping badges and availability depend on it. The page is also opened through a connection in this country.

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

Currency AliExpress should show prices in. Every row carries the currency the site actually displayed in its `currency` field.

## `sort` (type: `string`):

Result order, the same options as AliExpress's own sort bar: best match, most orders, lowest price first, highest price first.

## `includeSuggestedResults` (type: `boolean`):

When AliExpress cannot match your keyword it shows products for a different (spell-corrected or related) query. By default those are not delivered or charged: you get one free row explaining it. Turn this on to receive them anyway; such rows carry resultType "suggested".

## Actor input object example

```json
{
  "searchQueries": [
    "wireless earbuds"
  ],
  "startUrls": [],
  "maxItems": 20,
  "shipToCountry": "US",
  "currency": "USD",
  "sort": "default",
  "includeSuggestedResults": false
}
```

# Actor output Schema

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

API URL for the default dataset items produced by this run.

# 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"
    ],
    "startUrls": [],
    "maxItems": 20,
    "shipToCountry": "US",
    "currency": "USD"
};

// Run the Actor and wait for it to finish
const run = await client.actor("zinin/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"],
    "startUrls": [],
    "maxItems": 20,
    "shipToCountry": "US",
    "currency": "USD",
}

# Run the Actor and wait for it to finish
run = client.actor("zinin/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"
  ],
  "startUrls": [],
  "maxItems": 20,
  "shipToCountry": "US",
  "currency": "USD"
}' |
apify call zinin/aliexpress-scraper --silent --output-dataset

```

## MCP server setup

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