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

Scrape AliExpress search results by keyword: title, price, original price, discount, rating, units sold, image and URL. Sort by best match, orders or price. Choose currency and ship-to country.

- **URL**: https://apify.com/pwn401/aliexpress-search-scraper.md
- **Developed by:** [pwn 401](https://apify.com/pwn401) (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

from $1.50 / 1,000 products

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** gets products from [AliExpress](https://www.aliexpress.com) search results for any keyword: **title, price, original price, discount, star rating, units sold, image, product URL and listing date**.

Type one or more keywords, pick how to sort, and get a clean table you can download as **JSON, CSV, Excel** or use through the Apify API.

Only **real search results** come back by default. AliExpress mixes "recommended" filler products into its search pages. Those aren't matches for your keyword and have no rating or sales data, so this scraper filters them out. If a page comes back as nothing but filler, the scraper retries it automatically.

### Why use it?

- **Product research and dropshipping:** find what sells (sort by most orders) and at what price.
- **Price monitoring:** schedule daily runs to track prices and discounts for your keywords.
- **Competitor and market analysis:** see how many sellers offer a product and how well it's rated.
- **Data for spreadsheets, BI tools or AI agents:** structured output, ready to use.

### What data do you get?

| Field | Example |
|---|---|
| `title` | 60W PD Fast Charging USB C to Type C Cable… |
| `price` | 1.96 |
| `originalPrice` | 2.61 |
| `discountPct` | 25 |
| `currency` | USD |
| `rating` | 4.6 |
| `sold` | 1000 (`soldText`: "1,000+ sold") |
| `url` | https://www.aliexpress.com/item/1005009721687631.html |
| `image` | product image URL |
| `listedAt` | 2025-08-12 00:00:00 |
| `query`, `position`, `page` | which keyword and where in the results |

`originalPrice` and `discountPct` are only filled in when AliExpress shows a discount.

Some products are shown with a **new-customer deal** ("FREE with any purchase"). For those, `price` is the regular price, `promoPrice` is the first-order price for new AliExpress customers, and `newUserDeal` is `true`.

### How to use it

1. Enter your **search keywords**, one per line (for example `phone case`, `wireless earbuds`).
2. Set **Max products per keyword**. AliExpress shows 60 per page.
3. Choose **Sort by**: Best match, Most orders, or Price.
4. Pick a **currency** (USD, EUR, GBP, …) and a **ship-to country** (two-letter code like `US` or `DE`). Prices depend on both.
5. Click **Start**, then download the results.

#### Example input

```json
{
  "searchQueries": ["phone case", "wireless earbuds"],
  "maxItems": 120,
  "sort": "orders",
  "currency": "EUR",
  "shipTo": "DE"
}
```

### How much does it cost?

You pay **per product returned**. See the pricing on this page. Retries and filtered filler products are never charged. You can set a **maximum cost per run** in the run options, and the scraper stops cleanly when it reaches it.

### Tips

- If you see warnings like *"Only recommended items… try residential proxy"*, switch the proxy setting to **Residential**. AliExpress sometimes limits datacenter IPs.
- To track prices over time, use **Schedules** in Apify Console and run the same keywords daily.
- **No results?** AliExpress hides some products from some countries (for example knives when shipping to France). Try another ship-to country.
- AliExpress caps how deep you can page into one search. For more products, use more specific keywords.

### Use it as an AliExpress API

No AliExpress affiliate or developer account needed. Call this Actor through the [Apify API](https://docs.apify.com/api/v2) and get JSON back, or connect it to:

- **Google Sheets:** send results straight to a spreadsheet.
- **n8n, Make, Zapier:** use the Apify integration to run searches on a schedule and push new products to Slack, Telegram, Airtable or your shop.
- **Python / JavaScript:** use the `apify-client` package. Copy the code from the **API** tab on this page.
- **AI agents (MCP):** let your AI assistant search AliExpress products for you.

### FAQ

**How many products can I get?** Up to 3,000 per keyword. AliExpress shows 60 per page.

**Can I track prices over time?** Yes. Create a **Schedule** that runs the same keywords every day, then compare the `price` and `sold` fields between runs.

**Why are some ratings empty?** New products with no reviews have no star rating on AliExpress either.

**Do you sell or store my data?** No. Your results stay in your own Apify account.

### Is it legal to scrape AliExpress?

This Actor only collects **publicly visible product listings** and no personal data. You're responsible for how you use the data and for following AliExpress's terms and the laws that apply to you. If you're unsure, check with a lawyer.

### Feedback

Found a problem or need another field? Open an issue on the **Issues** tab and it'll get fixed quickly.

# Actor input Schema

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

One search per line, e.g. 'phone case'.

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

AliExpress returns 60 products per page.

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

Order of results, same as the sort menu on AliExpress.

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

e.g. USD, EUR, GBP

## `shipTo` (type: `string`):

Two-letter country code; affects prices and availability.

## `includeRecommended` (type: `boolean`):

AliExpress mixes 'recommended' products into search pages. They are not real matches and have no rating/sold data. Off = only real search results.

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

Apify Proxy is recommended; switch to residential if you see blocks.

## Actor input object example

```json
{
  "searchQueries": [
    "phone case"
  ],
  "maxItems": 120,
  "sort": "default",
  "currency": "USD",
  "shipTo": "US",
  "includeRecommended": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `products` (type: `string`):

One row per product found for each search keyword.

# 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": [
        "phone case"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("pwn401/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 = {
    "searchQueries": ["phone case"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("pwn401/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 '{
  "searchQueries": [
    "phone case"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call pwn401/aliexpress-search-scraper --silent --output-dataset

```

## MCP server setup

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