# AliExpress Product Search Scraper (`joseolmedosotoaguirre/aliexpress-product-search`) Actor

Scrape public AliExpress search results for dropshipping and market research. Extracts productId, title, price, currency, orders/sold (when visible), rating, URL, and image. Deduplicates by productId.

- **URL**: https://apify.com/joseolmedosotoaguirre/aliexpress-product-search.md
- **Developed by:** [jose olmedo soto aguirre](https://apify.com/joseolmedosotoaguirre) (community)
- **Categories:** E-commerce, Lead generation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## AliExpress Product Search Scraper

Apify Actor that scrapes **public** AliExpress search results for legitimate **dropshipping intel**, **market research**, and **price monitoring**.

Built with **Crawlee + Playwright**, concurrency 1, polite 2–4s delays, `productId` deduplication. **Apify RESIDENTIAL proxy is strongly recommended** — AliExpress frequently blocks datacenter IPs.

***

### What it does

1. Opens AliExpress wholesale/search pages for your query
2. Extracts structured fields from public result cards (embedded JSON + DOM fallback)
3. Deduplicates by `productId` and stops at `maxItems`
4. Writes a clean dataset for sourcing, comps, or competitive analysis

#### Output fields

| Field | Description |
|--------|-------------|
| `productId` | AliExpress product / item id |
| `title` | Product title |
| `price` | Numeric price when shown |
| `currency` | Currency code when detectable (`USD`, `EUR`, …) |
| `orders` | Orders / sold text when publicly visible (e.g. `1,000+ sold`) |
| `rating` | Star rating when shown (0–5) |
| `url` | Canonical product URL |
| `image` | Product image URL when available |
| `query` | Search query used for the run |
| `scrapedAt` | ISO timestamp |

***

### Input

| Field | Required | Default | Description |
|--------|----------|---------|-------------|
| `query` | ✅ | — | Search term, e.g. `phone case` |
| `maxItems` | | `15` | Max unique products (cap 200) |
| `maxPages` | | `1` | Max search pages (cap 10) |
| `proxyConfiguration` | | RESIDENTIAL on | Use Apify Proxy + **RESIDENTIAL** |

#### Example input

```json
{
  "query": "phone case",
  "maxItems": 15,
  "maxPages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### Example output (real cloud run)

Cloud verification (2026-07-29): query `phone case`, `maxItems: 15`, RESIDENTIAL proxy. Saved **12** unique products. Full dump: `STORAGE_SAMPLES.json`.

```json
[
  {
    "productId": "1005010478618265",
    "title": "Luxury Plating Matte Hard PC Phone Case for iPhone 17 Air 16 15 14 13 ProMax Camera Lens Film Protector Frosted Shockproof Cover",
    "price": 10.71,
    "currency": "USD",
    "orders": "4,000+ sold",
    "rating": null,
    "url": "https://www.aliexpress.com/item/1005010478618265.html",
    "image": "https://ae-pic-a1.aliexpress-media.com/kf/S949c4fe82c5e41668a450bda195e3cfaI.jpg_480x480q75.jpg_.avif",
    "query": "phone case",
    "scrapedAt": "2026-07-29T05:29:40.972Z"
  }
]
```

`rating` is included when AliExpress shows it on the search card; many cards omit stars on the listing grid.

***

### Suggested pricing

| Plan | Price | Notes |
|------|-------|--------|
| Pay per result | **$1.50–3 / 1,000 results** | Occasional sourcing / market checks |
| Rental | **$25–39 / month** | Recurring dropshipping / price monitoring |

Residential proxy compute is billed separately by Apify.

***

### Responsible use / Terms of Service

- Use only for **legitimate market research, dropshipping sourcing, and price monitoring** on **publicly available** search result data.
- Respect [AliExpress Terms of Use](https://www.aliexpress.com), robots / crawling policies, and applicable local laws.
- Do **not** use this Actor to overwhelm AliExpress infrastructure, bypass authentication for private data, scrape personal information beyond what is publicly shown on search cards, or violate anti-bot rules at abusive scale.
- Keep concurrency low (default 1), use polite delays, and enable RESIDENTIAL proxies.
- You are responsible for compliance with AliExpress ToS and your jurisdiction’s data / fair-use rules.

***

### Tips for reliable runs

1. Start with `maxItems` ≤ 15 and `maxPages` = 1.
2. Always enable **Apify Proxy → RESIDENTIAL** for production runs.
3. Displayed **currency** and **orders** follow AliExpress localization for the request IP / locale.
4. Avoid aggressive schedules; space recurring runs by minutes, not seconds.
5. If you get 0 items, check `DEBUG_HTML` / `DEBUG_STRUCTURE` key-value store and retry with a different proxy country.

***

### Local development

```bash
export APIFY_TOKEN=$(grep '^APIFY_TOKEN=' ../.env | cut -d= -f2-)
npm install --registry https://registry.npmjs.org/
apify run
```

On Apify Cloud:

```bash
apify push -f
apify call joseolmedosotoaguirre/aliexpress-product-search --input '{...}'
```

**Actor:** https://console.apify.com/actors/Fcd5EgZmsrsPzH1KU\
**Username slug:** `joseolmedosotoaguirre/aliexpress-product-search`

# Actor input Schema

## `query` (type: `string`):

AliExpress search keywords (e.g. "phone case", "wireless earbuds").

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

Maximum unique products to save (deduplicated by productId).

## `maxPages` (type: `integer`):

Maximum AliExpress search result pages to crawl.

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

Strongly recommended. AliExpress often blocks datacenter IPs — use Apify Proxy RESIDENTIAL.

## Actor input object example

```json
{
  "query": "phone case",
  "maxItems": 5,
  "maxPages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Items pushed to 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 = {
    "query": "phone case",
    "maxItems": 5,
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("joseolmedosotoaguirre/aliexpress-product-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 = {
    "query": "phone case",
    "maxItems": 5,
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("joseolmedosotoaguirre/aliexpress-product-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "phone case",
  "maxItems": 5,
  "maxPages": 1
}' |
apify call joseolmedosotoaguirre/aliexpress-product-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=joseolmedosotoaguirre/aliexpress-product-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/Fcd5EgZmsrsPzH1KU/builds/tcUPS3IlHGgB5CMvi/openapi.json
