# AliExpress Search Scraper — Prices, Ratings & Sales (`thenetaji/aliexpress-search-scraper`) Actor

Search AliExpress for any product and export each result's price, discount, star rating and sales count, sorted by best match, most orders or price. Switch on enrichment to add every variant's price and stock, shipping, the store and the spec table.

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

## Pricing

from $2.13 / 1,000 results

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 Search Scraper

The Actor searches AliExpress for a keyword and returns every matching product as a structured row:
`product_id`, `title`, `url`, `image_url`, `price`, `original_price`, `percent_discount`, `currency`,
`rating`, `sold`, `sold_count` and `sponsored`. Results can be ordered by best match, by most orders,
or by price in either direction, and a single search returns up to 3,600 products.

Titles are in English and every price is in US dollars, so rows from different searches can be
compared and summed without conversion.

### Accepted input

`keyword` is required and is matched the way AliExpress's own search box matches it. `sort` takes
`best_match` (the default), `orders`, `price_asc` or `price_desc`. `maxItems` bounds the number of
products saved and defaults to 100; a value of `0` removes the bound and lets the run continue to the
last page.

```json
{
  "keyword": "phone case",
  "sort": "orders",
  "maxItems": 60,
  "enrichProductDetails": false
}
```

### Response fields

```json
{
  "product_id": "1005009463232289",
  "title": "Ultra Thin Clear TPU Phone Cases For iPhone 18 17 16 15 14 13 12 11 Pro Max Plus Air 16E XR XS Max Transparent Silicone Cover",
  "url": "https://www.aliexpress.com/item/1005009463232289.html",
  "image_url": "https://ae-pic-a1.aliexpress-media.com/kf/Sf898ce9c147a42edb66872faa1120d79n.jpg",
  "price": 2.59,
  "original_price": null,
  "percent_discount": null,
  "currency": "USD",
  "rating": 4.7,
  "sold": "10,000+ sold",
  "sold_count": 10000,
  "sponsored": false
}
```

`product_id` is AliExpress's own identifier and is the stable key for a product across runs. `sold`
is the rounded label AliExpress prints on the card; `sold_count` is the same label as a number, taken
as the lower bound it states, so `10,000+ sold` becomes `10000` and `60K+ sold` becomes `60000`.

Fields absent from a search card are returned as null rather than omitted, so every row has the same
shape. A product with no reviews yet returns `rating: null` and `sold: null`. `original_price` is
usually null: AliExpress does not show a pre-discount price on search cards in most regions, and the
Actor does not invent one.

### Product details

With `enrichProductDetails` enabled, the Actor opens each product's own page and adds the fields a
search card does not carry: `price_min` and `price_max` across every variant, `variants` with each
variant's own price and stock, `options`, `shipping` with fee and delivery days, `review_count`,
`store_name`, `store_url`, `store_positive_feedback_percent`, `properties` (the specification table),
`images` and `description_url`. Shipping is priced for delivery to the United States.

Each enriched product is one additional request and is billed as a separate event, only after its
page has been read successfully. A product whose page cannot be read keeps its search row unchanged
and is not billed for enrichment.

For a known list of products rather than a search, the
[AliExpress Product Scraper](https://apify.com/thenetaji/aliexpress-product-scraper) reads product
links directly and lets the shipping country and currency be chosen.

### Frequently asked questions

**Why did the run return fewer products than `maxItems`?**
AliExpress serves 60 products per page and stops at page 60, so 3,600 is the most one search can
return. A narrow keyword runs out sooner; the run ends when AliExpress reports no further pages.

**Why do two runs on the same keyword differ slightly?**
AliExpress shuffles the order within a page a little on every request, so a product can move between
neighbouring pages. A product seen twice within one run is saved once. Across runs, the result set is
close but not identical, and `product_id` is the field to de-duplicate on.

**Are sponsored products included?**
Yes, in the position AliExpress places them, and each one is marked with `sponsored: true` so it can
be filtered out.

**Can AliExpress be searched with a picture?**
Not with this Actor. It accepts text keywords only; the image search on the AliExpress website is a
separate feature that the Actor does not use.

**Is the order the same as on the AliExpress website?**
`best_match` follows AliExpress's default ranking, and `orders`, `price_asc` and `price_desc`
correspond to the site's own sort menu. A newest-first order is not offered because AliExpress does
not apply one to search results.

# Actor input Schema

## `keyword` (type: `string`):

Product name, brand or anything you would type into AliExpress's own search box.

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

Order the results the way AliExpress's own sort menu does.

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

Maximum number of products to save. AliExpress shows 60 per page and up to 60 pages, so 3,600 is the most one search can return. Set 0 for no limit.

## `enrichProductDetails` (type: `boolean`):

Open every product's own page and add what a search card cannot show: every variant with its own price and stock, the full option list, shipping cost and delivery time, the store, the review count, the specification table and every gallery image. One extra request per product — slower, and billed per enriched product.

## Actor input object example

```json
{
  "keyword": "phone case",
  "sort": "best_match",
  "maxItems": 60,
  "enrichProductDetails": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped 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 = {
    "keyword": "phone case",
    "sort": "best_match",
    "maxItems": 60
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/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 = {
    "keyword": "phone case",
    "sort": "best_match",
    "maxItems": 60,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/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 '{
  "keyword": "phone case",
  "sort": "best_match",
  "maxItems": 60
}' |
apify call thenetaji/aliexpress-search-scraper --silent --output-dataset

```

## MCP server setup

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