# AliExpress Search Scraper (`jaybird/aliexpress-search-scraper`) Actor

Scrape AliExpress search and category results into clean JSON: product ID, title, price, rating, sold count, image. Pay per result, $2.50 per 1,000 results. No detail pages.

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

## Pricing

$2.50 / 1,000 search results

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

### What does AliExpress Search Scraper do?

**AliExpress Search Scraper** extracts product cards from public [AliExpress](https://www.aliexpress.com/) **search and category result pages**. It reads the inline `itemList` JSON in the HTML with plain HTTP and Cheerio. It does not open a browser, and it does not open item detail pages.

A fetch of `https://www.aliexpress.com/w/wholesale-wireless-earbuds.html?page=1&SearchText=wireless%20earbuds` through Apify residential proxy in the US on 2026-11-10 returned an `itemList` of 60 products. A direct HTTP fetch of one `/item/<id>.html` URL returned a short anti-bot interstitial and no product fields.

### Why use AliExpress Search Scraper?

Use it to collect titles, prices, ratings, and sold counts from search or category listings for assortment checks, price monitoring, and catalog research.

Each request uses its own Apify proxy session. Sessions are retired when a response looks like a block, captcha, slider, or a page with no product JSON. The run exits with an error only when every page fails. Partial results are kept.

On Apify you can schedule runs, call the Actor over the API, and download the dataset as JSON, CSV, Excel, or HTML. This Actor is part of the jaybird store and is meant to sit alongside the other jaybird e-commerce Actors.

### What data can AliExpress Search Scraper extract?

| Field | Type | Description |
| --- | --- | --- |
| `productId` | string | AliExpress product id |
| `url` | string | `https://www.aliexpress.com/item/<id>.html` |
| `title` | string or null | `title.displayTitle` |
| `image` | string or null | Absolute `https` image URL |
| `salePrice` | number or null | `prices.salePrice.minPrice`, or a formatted price when that is the only number |
| `originalPrice` | number or null | Explicit original-price object, otherwise the first number of `trace.utLogMap.oip` when that field is present |
| `currency` | string or null | `currencyCode` from the price object. A `$` symbol alone is not turned into `USD` |
| `discountPercent` | number or null | Discount field on the card, usually `prices.salePrice.discount` |
| `starRating` | number or null | `evaluation.starRating` |
| `soldCount` | number or null | Number parsed from `trade.tradeDesc` (`20K+ sold` becomes `20000`) |
| `soldCountText` | string or null | Raw `trade.tradeDesc` |
| `deliveryTag` | string or null | Delivery-time tag when present, otherwise a shipping tag |
| `query` | string or null | Search text for this result |
| `page` | number | Results page |
| `position` | number | 1-based position on that page before the price filter |
| `scrapedAt` | string | ISO timestamp |

Missing fields are `null`. The Actor does not calculate a discount from two prices, and it does not invent a sold count when `tradeDesc` has no number.

### How to scrape AliExpress search results

1. Open the Actor and add one or more search queries, such as `wireless earbuds`. Each query is requested as `https://www.aliexpress.com/w/wholesale-<slug>.html?page=N&SearchText=<query>`.
2. Or paste search and category URLs in **Search or category URLs**. Detail URLs under `/item/` are rejected.
3. Set **Maximum items** and **Maximum pages per query**. Pagination stops when a page has no products, the item cap is reached, or the max charge is reached.
4. Optionally set a minimum and maximum price. Products with a known price outside that range are skipped. Products with no price are kept.
5. Leave the proxy on Apify Residential in the US unless you need prices for another country.
6. Run the Actor and download the dataset.

See the input tab for the full field list.

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

This Actor uses pay per event. There is **no start fee**. Each saved product is one `result` event at **$0.0025**.

100 products cost $0.25. 1,000 products cost $2.50. Pages that return no new products are not charged. Duplicate product ids inside the same query are not charged again.

If you set a maximum charge on the run, the Actor stops when the platform reports that another `result` event would pass that limit. That check uses the charging result from `Actor.pushData`.

### Input

| Field | Default | What it does |
| --- | --- | --- |
| Search queries | `wireless earbuds` in the form | Terms turned into wholesale search URLs |
| Search or category URLs | empty | Existing search or category links |
| Maximum items | 100 | Stop after this many saved products |
| Maximum pages per query | 5 | Page cap for each query or start URL |
| Minimum price | empty | Skip known prices below this |
| Maximum price | empty | Skip known prices above this |
| Proxy | Apify Residential, country US | One session per request |

The price filter is applied inside the Actor, after each page is parsed: products with a known price outside your range are skipped and not charged. When both bounds are set, the request URL also gets `pr=<min>-<max>`. In a live test (usd 2 to 5, 2 pages) every priced result fell inside the range, but AliExpress did not return only in-range products on its own, so a narrow range can save well under 60 items per page. Products with no price on the card are kept and charged, because they cannot be checked.

Example input:

```json
{
  "queries": ["wireless earbuds"],
  "maxItems": 100,
  "maxPagesPerQuery": 5,
  "minPrice": 5,
  "maxPrice": 40,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

Memory defaults to 512 MB. The allowed range is 256–2048 MB.

### Output

You can download the dataset in JSON, HTML, CSV, or Excel.

This row matches the first product in the wholesale earbuds page fetched on 2026-11-10. `soldCount` is the number printed on the card (`20K+`), not a separate exact order count. `originalPrice` is the first number of `trace.utLogMap.oip` (`17.23,0`). That page did not include a `prices.originalPrice` object.

```json
{
  "productId": "3256812408115438",
  "url": "https://www.aliexpress.com/item/3256812408115438.html",
  "title": "HTC NE79 TWS Bluetooth 6.0 Earbuds AI Translation 135 Languages ENC Noise Cancelling HiFi Stereo Headphones with LED Display",
  "image": "https://ae-pic-a1.aliexpress-media.com/kf/Sff7e4be36c804173b8bf2ad0f4a81b0bA.png",
  "originalPrice": 17.23,
  "salePrice": 1.09,
  "currency": "USD",
  "discountPercent": 93,
  "starRating": 4.9,
  "soldCount": 20000,
  "soldCountText": "20K+ sold",
  "deliveryTag": "Fastest delivery in 7 days",
  "query": "wireless earbuds",
  "page": 1,
  "position": 1,
  "scrapedAt": "2026-11-10T18:00:00.000Z"
}
```

### Tips

- Live tests on 2026-11-10 (US residential proxy, keyword queries such as `usb c cable`, `phone case`, `smart watch`) returned 60 products on every search page requested, up to 4 pages deep. AliExpress repeats products across result pages, and the repeats grow on deeper pages (a 4-page query typically yields 180-230 distinct products, not 240). The Actor drops repeats within a query and does not charge for them.
- About 9% of cards in those tests had no price on the card (for example free-gift promotion cards). Their `salePrice`, `originalPrice` and `currency` are `null`. The Actor still saves and charges them.
- Category URLs were tested live with `https://www.aliexpress.com/category/100003109/women-clothing.html` (2 pages, 115 distinct products, all with a price). Only that URL form was tested.
- Prices, currency, and shipping tags depend on the country of the proxy. The direct fetch above returned USD. A residential proxy in another country can return different amounts.
- Blocked pages are retried up to 4 times, each time with a new session. A blocked page is never written as a result.
- The run still succeeds when some pages fail, as long as one page returns a real result list (including a genuine empty list).
- `20K+ sold` is stored as `20000`. The raw text stays in `soldCountText`.

### FAQ, disclaimers, and support

**Does it scrape product detail pages, SKU variants, or reviews?**
No. Detail pages are out of scope. A direct HTTP fetch of one item URL on 2026-11-10 returned an anti-bot interstitial (`_____tmd_____` / captcha) and no product JSON. Variants and reviews are not in the search card.

**Why is originalPrice sometimes null?**
It is set from `prices.originalPrice` when that object exists. On the page fetched on 2026-11-10 it did not. The fallback is `trace.utLogMap.oip` when present. One card on that page had `originPriceAmount` and no `oip`; `originalPrice` is null there, because that amount's scale is not labeled. The discount is not used to compute a price.

**Which fixtures were checked against the live site?**
`test/fixtures/search-itemlist-excerpt.html` is a real excerpt: four `itemList` products from that 2026-11-10 response, with gallery and tracking blobs removed. The other HTML fixtures are synthetic and say so in the file.

Our Actors are ethical and do not extract private user data, such as email addresses, gender, or location. They only extract what the page shows publicly. You should be aware that results could still contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you are unsure whether your reason is legitimate, consult your lawyers.

Questions and bugs can go to the Issues tab. The API tab shows how to run the Actor programmatically.

# Actor input Schema

## `queries` (type: `array`):

Product search terms. Each term becomes an AliExpress wholesale search URL: https://www.aliexpress.com/w/wholesale-<slug>.html?page=N\&SearchText=<query>.

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

AliExpress search or category result URLs. Item detail URLs (/item/<id>.html) are rejected. The page query parameter is set automatically while paginating.

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

Stop after this many products have been saved.

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

How many result pages to open for each query or start URL. Pagination stops early when a page has no products.

## `minPrice` (type: `number`):

Optional lower price bound, in the currency returned for the proxy country. When both minimum and maximum are set, the request adds pr=<min>-<max>. Products with a known price below this bound are skipped.

## `maxPrice` (type: `number`):

Optional upper price bound, in the currency returned for the proxy country. When both minimum and maximum are set, the request adds pr=<min>-<max>. Products with a known price above this bound are skipped.

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

Proxy used for each request. A new Apify proxy session is used per request. Residential proxies in the US are the default. Prices and currency follow the country the request comes from.

## Actor input object example

```json
{
  "queries": [
    "wireless earbuds",
    "usb c cable"
  ],
  "startUrls": [
    {
      "url": "https://www.aliexpress.com/w/wholesale-phone-case.html?page=1&SearchText=phone+case"
    }
  ],
  "maxItems": 100,
  "maxPagesPerQuery": 5,
  "minPrice": 5,
  "maxPrice": 40,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "queries": [
        "wireless earbuds"
    ],
    "maxItems": 100,
    "maxPagesPerQuery": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jaybird/aliexpress-search-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 = {
    "queries": ["wireless earbuds"],
    "maxItems": 100,
    "maxPagesPerQuery": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("jaybird/aliexpress-search-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 '{
  "queries": [
    "wireless earbuds"
  ],
  "maxItems": 100,
  "maxPagesPerQuery": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call jaybird/aliexpress-search-scraper --silent --output-dataset

```

## MCP server setup

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