# AliExpress Search Scraper: Products and Prices (`avakode/aliexpress-search`) Actor

Products from AliExpress search results pages: title, price, discount, sold, rating, store, image and link, by search word or search page link.

- **URL**: https://apify.com/avakode/aliexpress-search.md
- **Developed by:** [Tigran Avakov](https://apify.com/avakode) (community)
- **Categories:** E-commerce, MCP servers
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.89 / 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: Products and Prices

One run reads up to 10 search pages in total (about 500 products); AliExpress stops answering a server after that.

Get the products AliExpress shows for a search word: title, price, price before discount, orders sold, rating, store, image and link, with the place each product holds in the results.

### What it does

You give search words, or links to AliExpress search results pages, and the tool reads the results pages (about 60 products each) page by page. It makes plain HTTP requests to the public search pages at `aliexpress.com/w/wholesale-<word>.html`, one request per second, up to 10 search pages per run, and reads the product data the page already contains. It does not log in, use cookies or proxies, or get around any protection.

This tool reads search results only. It does not open product pages, so variants, specifications, descriptions, seller details beyond the store name, and reviews are not returned: AliExpress shows a verification page to automated visits of product pages, and this tool does not try to get past it.

### Use cases

- Watch which products and prices appear for a keyword, and how the order changes from day to day.
- Compare price, discount and orders sold across the first pages of results for several keywords.
- Build a list of product links and store names for further research.

### Input

| Field | Type | Description |
|---|---|---|
| `queries` | array | Search words (for example `led light`) or links to search results pages (`https://www.aliexpress.com/w/wholesale-led-light.html`, with `?page=3` to start at page 3). Product links are refused. |
| `maxPagesPerQuery` | integer | One run reads up to 10 search pages in total (about 500 products); AliExpress stops answering a server after that. Results pages read per word, 1 to 10, within that total. Default 5. |
| `maxResults` | integer | Stop after this many products in total. Default 100. |

Example:

```json
{ "queries": ["led light", "usb cable"], "maxPagesPerQuery": 1, "maxResults": 120 }
```

### Output

One record per product and search word. Missing values are `null`; `url` is the product page address.

| Field | Description |
|---|---|
| `query` | Search word the product was found with. |
| `page` | Results page it was on. |
| `position` | Place in the results for the word (60 per page, sponsored places included). |
| `source_id` | AliExpress product id. |
| `title` | Product title. |
| `url` | Product page address. |
| `image_url` | Main image of the results card. |
| `price`, `currency` | Price shown on the card and its currency code. |
| `original_price` | Price before the discount, when the card shows one. |
| `discount_percent` | Discount in percent, when shown. |
| `sold_count` | Orders sold as a number. For "10K+ sold" this is the lower bound, 10000. |
| `sold_text` | Orders sold as written on the card. |
| `rating` | Average star rating, when shown. |
| `store_name` | Store name, when the card carries it. |
| `ships_from` | Country code the item ships from, when the card carries it. |
| `is_ad` | True for a sponsored place. |
| `is_gift` | True for a gift card ("{FREE} with any purchase"); such a card has no price of its own. |

Example record:

```json
{ "query": "led light", "page": 1, "position": 1, "source_id": "3256812686755829", "title": "50/100/130/200FT RGB LED Smart Strip Light, ...", "url": "https://www.aliexpress.com/item/3256812686755829.html", "image_url": "https://ae-pic-a1.aliexpress-media.com/kf/S8261ba08c59b4f11870a257367abe7b76.jpg", "price": 1.09, "currency": "USD", "original_price": 30.44, "discount_percent": 96, "sold_count": 253, "sold_text": "253 sold", "rating": 4.9, "store_name": "Shop1105233629 Store", "ships_from": "US", "is_ad": false, "is_gift": false }
```

### Pricing

Pay per result: you pay for each record in the dataset, plus a tiny start fee per run. Set "Maximum cost per run" and the tool stops cleanly when it is reached.

### Errors

- **Invalid input** — the message names the entry to fix (an empty word, a product link, a link that is not a search page, pages per word outside 1 to 10).
- **The site changed its format** — the tool needs an update; please open an issue with the run link.
- **The site blocked access** — AliExpress answered with a verification page, a login wall or a redirect to another regional site. The tool stops, keeps the products already collected, and does not try to bypass the protection.

### Limitations

- Search results pages only; no product pages, variants, descriptions or reviews.
- The review count is not on the results card, so it is not returned.
- Prices, currency, delivery and order depend on the country the request comes from; AliExpress sends some networks to a regional site (such as aliexpress.ru), which this tool does not read and reports as a block.
- A card without a price (for example a free gift item, `is_gift` true) has `price` set to `null`.
- One run reads at most 10 search pages in total, also when it is stopped and continues; when they are used up the run ends successfully and the status line names the search words read in part and the ones not read. After a stop and continue the run goes on from the page where the word stopped; pages already read are not read, or counted, again. If the run was killed in the middle of a page, that page can be read again (and counted again), but its products are not delivered or charged a second time. The status line counts the whole run.
- Store name and ships-from are present only where the card carries them.
- "Orders sold" is rounded by the site for large numbers ("10K+").
- At most one batch may be written again if a write was still on its way when the run was stopped.

### Support

Open an issue in the Issues tab with the run link.

# Actor input Schema

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

One entry per line: a search word (for example "led light") or a link to a search results page (https://www.aliexpress.com/w/wholesale-led-light.html, optionally with ?page=3 to start at that page). Product links are not supported.

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

One run reads up to 10 search pages in total (about 500 products); AliExpress stops answering a server after that. This is how many results pages are read for each search word (about 60 products per page), within that total.

## `maxResults` (type: `integer`):

Stop after this many products in total.

## Actor input object example

```json
{
  "queries": [
    "led light",
    "https://www.aliexpress.com/w/wholesale-usb-cable.html"
  ],
  "maxPagesPerQuery": 5,
  "maxResults": 100
}
```

# Actor output Schema

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

All records written by the run (the default dataset).

# 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": [
        "led light",
        "usb cable"
    ],
    "maxPagesPerQuery": 1,
    "maxResults": 120
};

// Run the Actor and wait for it to finish
const run = await client.actor("avakode/aliexpress-search").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": [
        "led light",
        "usb cable",
    ],
    "maxPagesPerQuery": 1,
    "maxResults": 120,
}

# Run the Actor and wait for it to finish
run = client.actor("avakode/aliexpress-search").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": [
    "led light",
    "usb cable"
  ],
  "maxPagesPerQuery": 1,
  "maxResults": 120
}' |
apify call avakode/aliexpress-search --silent --output-dataset

```

## MCP server setup

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

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/tJhHEqpIitalYahxI/builds/Oxx6LzEjlTYeZmguI/openapi.json
