# AliExpress Affiliate Products — Cross-Border Deals & Ratings (`viralanalyzer/aliexpress-affiliate-products`) Actor

Discover trending AliExpress products by keyword. Extract real prices, sales volume, ratings, store data and commission rates from the public catalog. Pure HTTP, multi-language, multi-currency. Built for affiliate marketing pipelines.

- **URL**: https://apify.com/viralanalyzer/aliexpress-affiliate-products.md
- **Developed by:** [viralanalyzer](https://apify.com/viralanalyzer) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 item processeds

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/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 Affiliate Products Finder — Hot Cross-Border Deals + Commission Data

> 🔗 [View on Apify Store](https://apify.com/viralanalyzer/aliexpress-affiliate-products) | 🇺🇸 English | [🇧🇷 Português](#português)

Discover **trending AliExpress products by keyword** across the global catalog. Pull real product data: prices, sales orders, star ratings, store info, free-shipping flags and discount percentages — straight from the public AliExpress site. Multi-language and multi-currency. Pure HTTP, no browser. Built to fuel cross-border affiliate marketing pipelines.

### ✨ Features

- 🎯 **Multi-keyword search** — Run multiple queries in a single execution, dedupe by `productId`
- 🌐 **6 languages × 5 currencies** — Storefront in PT/EN/ES/FR/RU/ID and prices in BRL/USD/EUR/CNY/GBP
- 📦 **Ship-to country filter** — Surface only products that ship where your audience is
- 📊 **Real-time metrics** — Total orders, star rating, positive feedback %
- 💰 **Smart pricing data** — Sale price, original price, discount percentage
- 🏪 **Store intelligence** — Store ID, name, URL
- 🚚 **Free-shipping filter** — Restrict to free-shipping products
- ⭐ **Quality filters** — Minimum orders and minimum rating thresholds
- ⚡ **Pure HTTP** — No browser, fast and cost-efficient
- 💰 **Pay per result** — Charge only for products that pass validation

### 📥 Input

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `keywords` | string\[] | ✅ | — | Search terms (1-20) |
| `maxResultsPerKeyword` | integer | ❌ | `30` | Max products per keyword (1-60) |
| `sortType` | string | ❌ | `ORDERS_DESC` | `ORDERS_DESC`, `SALE_PRICE_ASC`, `SALE_PRICE_DESC`, `NEWEST_DESC` |
| `minSales` | integer | ❌ | `50` | Drop products with fewer historical orders |
| `minRating` | number | ❌ | `4.0` | Drop products with star rating below this |
| `freeShippingOnly` | boolean | ❌ | `false` | Only free-shipping products |
| `language` | string | ❌ | `pt` | `pt`, `en`, `es`, `fr`, `ru`, `id` |
| `currency` | string | ❌ | `BRL` | `BRL`, `USD`, `EUR`, `CNY`, `GBP` |
| `shipToCountry` | string | ❌ | `BR` | ISO country code |
| `proxyConfiguration` | object | ❌ | Apify Proxy | Proxy settings (Advanced) |

#### Input Example

```json
{
  "keywords": ["wireless earbuds", "smart watch", "kitchen gadgets"],
  "maxResultsPerKeyword": 30,
  "sortType": "ORDERS_DESC",
  "minSales": 100,
  "minRating": 4.5,
  "language": "pt",
  "currency": "BRL",
  "shipToCountry": "BR"
}
```

### 📤 Output

Every product record includes:

| Field | Type | Description |
|---|---|---|
| `productId` | string | AliExpress product ID |
| `title` | string | Product title (in requested language) |
| `url` | string | Canonical product URL |
| `imageUrl` | string | Main product image |
| `imageUrls` | string\[] | Additional images |
| `salePrice` | number | Current sale price |
| `originalPrice` | number | Original price |
| `discountPct` | number | Discount percentage (0-100) |
| `currency` | string | Currency code |
| `orders` | number | Historical orders |
| `rating` | number | Star rating (0.0-5.0) |
| `evaluateRate` | string | Positive feedback % |
| `freeShipping` | boolean | Free shipping available |
| `storeId` | string | AliExpress store ID |
| `storeName` | string | Store display name |
| `storeUrl` | string | Store URL |
| `categoryId` | number | First-level category |
| `discoveredVia` | string | Keyword that found it |
| `platform` | string | Always `aliexpress` |
| `_dataQuality` | string | `full` or `partial` |
| `scrapedAt` | string | ISO 8601 timestamp |

#### Output Example

```json
{
  "productId": "1005006501234567",
  "title": "Fone De Ouvido Bluetooth Pro Sem Fio TWS",
  "url": "https://www.aliexpress.com/item/1005006501234567.html",
  "imageUrl": "https://ae01.alicdn.com/kf/abc123.jpg",
  "imageUrls": ["https://ae01.alicdn.com/kf/img1.jpg", "..."],
  "salePrice": 89.90,
  "originalPrice": 199.90,
  "discountPct": 55,
  "currency": "BRL",
  "orders": 4321,
  "rating": 4.7,
  "evaluateRate": "97.6%",
  "freeShipping": true,
  "storeId": "1102034567",
  "storeName": "OfficialAudio Store",
  "storeUrl": "https://www.aliexpress.com/store/1102034567",
  "categoryId": 100,
  "discoveredVia": "wireless earbuds",
  "platform": "aliexpress",
  "_dataQuality": "full",
  "scrapedAt": "2026-05-06T21:50:00.000Z"
}
```

### 📋 Use Cases

- 🤝 **Cross-border affiliate marketing** — Promote AliExpress items via Hotmart, Hotmart, RapidGator, etc
- 📊 **Dropshipping research** — Find high-volume, high-rating products to import
- 🔎 **Trend analysis** — Identify rising products by orders velocity
- 💸 **Deal hunting** — Surface big discounts with social proof
- 📈 **Competitive sourcing** — See which products dominate niches globally
- 🛍️ **Catalog enrichment** — Feed e-commerce dashboards with real AliExpress data

### ❓ FAQ

**Q: Does this need AliExpress Open Platform credentials?**
A: No. The actor scrapes the public AliExpress catalog HTML — no `app_key`/`secret`/`tracking_id` needed. If you have those credentials and want to generate `aliexpress.affiliate.link.generate` promotion links, that's a v2.0 feature.

**Q: What if AliExpress changes its HTML structure?**
A: The actor tries 3 different JSON shapes (`window._init_data_`, `window.runParams`, `__NEXT_DATA__`). On total failure, it saves the raw HTML to the Key-Value Store for diagnosis (`debug_html_*` keys) and throws.

**Q: Why use orders instead of sales like Shopee?**
A: AliExpress exposes "orders count" (cumulative purchase events), not "units sold." Both proxy demand — orders is the raw field returned by the catalog and the most reliable signal for affiliate scouting.

**Q: Can I generate affiliate promotion links?**
A: Not in v1.0. This actor is the discovery layer. To generate `s.click.aliexpress.com/...` tracked links, you need AliExpress Open Platform credentials. v2.0 will add `aliexpress.affiliate.link.generate` integration.

**Q: How do I target a specific country?**
A: Set `shipToCountry: "US"` (or `"DE"`, `"BR"`, etc) and `language` accordingly. The catalog filters out non-shippable products automatically.

### 💰 Pricing

This actor uses **Pay Per Event (PPE)** pricing:

| Metric | Cost |
|--------|------|
| Per product discovered (passes filters + validation) | $0.001 |

Discovering 1,000 products costs $1.00. Platform usage (compute and proxy) is billed to you at
Apify's standard rates and shown on the run page. A product that fails the filters or the validation
is not charged.

### 🔗 Related Actors

- [Shopee Affiliate Products](https://apify.com/viralanalyzer/shopee-affiliate-products) — Brazilian e-commerce
- [Awin Multi-Merchant Affiliate](https://apify.com/viralanalyzer/awin-multi-merchant-affiliate) — Hundreds of BR brands
- [Mercado Livre Scraper](https://apify.com/viralanalyzer/mercadolivre-scraper) — Mercado Livre BR
- [Amazon Brazil Intelligence](https://apify.com/viralanalyzer/amazon-brazil-intelligence) — Amazon BR
- [TikTok Viral Scanner](https://apify.com/viralanalyzer/tiktok-viral-scanner) — Find viral hooks for affiliate posts

### 📝 Changelog

#### v1.0 (Current)

- Multi-keyword search via AliExpress public catalog HTML
- 3-pattern parser (`_init_data_`, `runParams`, `__NEXT_DATA__`) with debug-snapshot fallback
- 6 storefront languages × 5 currencies
- Ship-to country filter
- Free-shipping, minimum orders and minimum rating filters
- Cross-keyword deduplication by `productId`
- Anti-placeholder guardrails on every record
- PPE billing with batch charging and owner exemption

***

<a name="português"></a>

## 🌏 AliExpress Affiliate Products Finder — Ofertas Globais em Alta + Dados de Comissão

> 🔗 [View on Apify Store](https://apify.com/viralanalyzer/aliexpress-affiliate-products) | [🇺🇸 English](#-aliexpress-affiliate-products-finder--hot-cross-border-deals--commission-data) | 🇧🇷 Português

Descubra **produtos em alta na AliExpress** por palavra-chave no catálogo global. Extraia dados reais: preços, pedidos, avaliações, dados da loja, frete grátis e percentuais de desconto — direto do site público da AliExpress. Multi-idioma e multi-moeda. HTTP puro, sem browser. Feito para alimentar pipelines de marketing de afiliados internacional.

#### Funcionalidades

- 🎯 **Busca multi-keyword** com deduplicação por `productId`
- 🌐 **6 idiomas × 5 moedas** — vitrine em PT/EN/ES/FR/RU/ID e preços em BRL/USD/EUR/CNY/GBP
- 📦 **Filtro ship-to** — apenas produtos que enviam para o país do seu público
- 📊 **Métricas reais** — Total de pedidos, rating médio, % de feedback positivo
- 💰 **Dados de preço inteligentes** — Preço promocional, original, percentual de desconto
- 🏪 **Inteligência de loja** — ID, nome, URL da loja
- 🚚 **Filtro Frete Grátis**
- ⭐ **Filtros de qualidade** — pedidos mínimos e rating mínimo
- ⚡ **HTTP puro** — sem browser, rápido e econômico
- 💰 **Pague por resultado** — só cobra produtos validados

#### Como funciona

O actor acessa `https://{lang}.aliexpress.com/w/wholesale-{keyword}.html`, extrai o JSON embutido na página (3 padrões testados), normaliza para um schema único e dedupe entre keywords. Dados reais — sem mock.

#### 📥 Entrada

| Parâmetro | Tipo | Obrigatório | Padrão | Descrição |
|---|---|---|---|---|
| `keywords` | string\[] | ✅ | — | Termos de busca (1-20) |
| `maxResultsPerKeyword` | integer | ❌ | `30` | Máximo de produtos por keyword (1-60) |
| `sortType` | string | ❌ | `ORDERS_DESC` | `ORDERS_DESC`, `SALE_PRICE_ASC`, `SALE_PRICE_DESC`, `NEWEST_DESC` |
| `minSales` | integer | ❌ | `50` | Descarta produtos com menos pedidos históricos |
| `minRating` | number | ❌ | `4.0` | Descarta produtos com rating abaixo deste valor |
| `freeShippingOnly` | boolean | ❌ | `false` | Apenas produtos com frete grátis |
| `language` | string | ❌ | `pt` | `pt`, `en`, `es`, `fr`, `ru`, `id` |
| `currency` | string | ❌ | `BRL` | `BRL`, `USD`, `EUR`, `CNY`, `GBP` |
| `shipToCountry` | string | ❌ | `BR` | Código de país ISO |
| `proxyConfiguration` | object | ❌ | Apify Proxy | Configurações de proxy (Avançado) |

##### Exemplo de Input

```json
{
  "keywords": ["wireless earbuds", "smart watch", "kitchen gadgets"],
  "maxResultsPerKeyword": 30,
  "sortType": "ORDERS_DESC",
  "minSales": 100,
  "minRating": 4.5,
  "language": "pt",
  "currency": "BRL",
  "shipToCountry": "BR"
}
```

#### 📤 Saída

Cada registro de produto inclui:

| Campo | Tipo | Descrição |
|---|---|---|
| `productId` | string | ID do produto na AliExpress |
| `title` | string | Título do produto (no idioma solicitado) |
| `url` | string | URL canônica do produto |
| `imageUrl` | string | Imagem principal do produto |
| `imageUrls` | string\[] | Imagens adicionais |
| `salePrice` | number | Preço promocional atual |
| `originalPrice` | number | Preço original |
| `discountPct` | number | Percentual de desconto (0-100) |
| `currency` | string | Código da moeda |
| `orders` | number | Pedidos históricos |
| `rating` | number | Rating em estrelas (0.0-5.0) |
| `evaluateRate` | string | % de feedback positivo |
| `freeShipping` | boolean | Frete grátis disponível |
| `storeId` | string | ID da loja na AliExpress |
| `storeName` | string | Nome de exibição da loja |
| `storeUrl` | string | URL da loja |
| `categoryId` | number | Categoria de primeiro nível |
| `discoveredVia` | string | Keyword que encontrou o produto |
| `platform` | string | Sempre `aliexpress` |
| `_dataQuality` | string | `full` ou `partial` |
| `scrapedAt` | string | Timestamp ISO 8601 |

##### Exemplo de Output

```json
{
  "productId": "1005006501234567",
  "title": "Fone De Ouvido Bluetooth Pro Sem Fio TWS",
  "url": "https://www.aliexpress.com/item/1005006501234567.html",
  "imageUrl": "https://ae01.alicdn.com/kf/abc123.jpg",
  "imageUrls": ["https://ae01.alicdn.com/kf/img1.jpg", "..."],
  "salePrice": 89.90,
  "originalPrice": 199.90,
  "discountPct": 55,
  "currency": "BRL",
  "orders": 4321,
  "rating": 4.7,
  "evaluateRate": "97.6%",
  "freeShipping": true,
  "storeId": "1102034567",
  "storeName": "OfficialAudio Store",
  "storeUrl": "https://www.aliexpress.com/store/1102034567",
  "categoryId": 100,
  "discoveredVia": "wireless earbuds",
  "platform": "aliexpress",
  "_dataQuality": "full",
  "scrapedAt": "2026-05-06T21:50:00.000Z"
}
```

#### Casos de Uso

- 🤝 **Marketing de afiliados internacional**
- 📊 **Pesquisa de dropshipping** — produtos com alto volume e bom rating
- 🔎 **Análise de tendências** por velocidade de pedidos
- 💸 **Caça a ofertas** com prova social
- 📈 **Inteligência de concorrência** global
- 🛍️ **Enriquecimento de catálogo**

#### ❓ Perguntas Frequentes

**P: Isso precisa de credenciais da AliExpress Open Platform?**
R: Não. O actor faz scraping do HTML do catálogo público da AliExpress — não precisa de `app_key`/`secret`/`tracking_id`. Se você tiver essas credenciais e quiser gerar links de promoção via `aliexpress.affiliate.link.generate`, isso é um recurso da v2.0.

**P: E se a AliExpress mudar a estrutura do HTML?**
R: O actor tenta 3 formatos JSON diferentes (`window._init_data_`, `window.runParams`, `__NEXT_DATA__`). Em caso de falha total, ele salva o HTML bruto no Key-Value Store para diagnóstico (chaves `debug_html_*`) e lança um erro.

**P: Por que usar pedidos (orders) em vez de vendas (sales) como na Shopee?**
R: A AliExpress expõe a "contagem de pedidos" (eventos de compra acumulados), não "unidades vendidas". Ambos são proxies de demanda — orders é o campo bruto retornado pelo catálogo e o sinal mais confiável para prospecção de afiliados.

**P: Posso gerar links de promoção de afiliado?**
R: Não na v1.0. Este actor é a camada de descoberta. Para gerar links rastreados `s.click.aliexpress.com/...`, você precisa de credenciais da AliExpress Open Platform. A v2.0 vai adicionar a integração `aliexpress.affiliate.link.generate`.

**P: Como faço para mirar em um país específico?**
R: Defina `shipToCountry: "US"` (ou `"DE"`, `"BR"`, etc.) e o `language` correspondente. O catálogo filtra automaticamente os produtos não enviáveis.

#### Preços

| Métrica | Custo |
|---------|-------|
| Por produto descoberto | $0.001 |

1.000 produtos = $1.00. O uso de plataforma (compute e proxy) é cobrado à parte, nas tarifas padrão
da Apify, e aparece na página da execução. Produto que não passa nos filtros ou na validação não é
cobrado.

#### 🔗 Actors Relacionados

- [Shopee Affiliate Products](https://apify.com/viralanalyzer/shopee-affiliate-products) — e-commerce brasileiro
- [Awin Multi-Merchant Affiliate](https://apify.com/viralanalyzer/awin-multi-merchant-affiliate) — centenas de marcas BR
- [Mercado Livre Scraper](https://apify.com/viralanalyzer/mercadolivre-scraper) — Mercado Livre BR
- [Amazon Brazil Intelligence](https://apify.com/viralanalyzer/amazon-brazil-intelligence) — Amazon BR
- [TikTok Viral Scanner](https://apify.com/viralanalyzer/tiktok-viral-scanner) — encontre ganchos virais para posts de afiliados

#### 📝 Histórico de Versões

##### v1.0 (Atual)

- Busca multi-keyword via HTML do catálogo público da AliExpress
- Parser de 3 padrões (`_init_data_`, `runParams`, `__NEXT_DATA__`) com fallback de snapshot de debug
- 6 idiomas de vitrine × 5 moedas
- Filtro de país de envio (ship-to)
- Filtros de frete grátis, pedidos mínimos e rating mínimo
- Deduplicação entre keywords por `productId`
- Guardrails anti-placeholder em cada registro
- Cobrança PPE com cobrança em lote e isenção do owner

# Actor input Schema

## `keywords` (type: `array`):

Product search terms (e.g., 'wireless earbuds', 'smart watch', 'kitchen gadgets'). Each keyword runs a separate query and results are deduplicated by productId.

## `maxResultsPerKeyword` (type: `integer`):

Maximum products to return per keyword (1-60). Each product passing validation triggers 1 PPE event.

## `sortType` (type: `string`):

Result ordering: SALE\_PRICE\_ASC, SALE\_PRICE\_DESC, NEWEST\_DESC, ORDERS\_DESC (most popular). Best for affiliate: ORDERS\_DESC.

## `minSales` (type: `integer`):

Drop products with fewer historical orders. Use 0 for no filter.

## `minRating` (type: `number`):

Drop products with star rating below this (0-5). Use 0 for no filter.

## `freeShippingOnly` (type: `boolean`):

Restrict to products with free shipping flag.

## `language` (type: `string`):

Storefront language. Affects product titles and descriptions.

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

Display currency for prices.

## `shipToCountry` (type: `string`):

ISO country code (BR, US, ES, etc) — filters products that ship there.

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

AliExpress accepts global IPs — Apify Proxy datacenter is enough in most cases.

## Actor input object example

```json
{
  "keywords": [
    "wireless earbuds",
    "smart watch"
  ],
  "maxResultsPerKeyword": 30,
  "sortType": "ORDERS_DESC",
  "minSales": 50,
  "minRating": 4,
  "freeShippingOnly": false,
  "language": "pt",
  "currency": "BRL",
  "shipToCountry": "BR",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset containing all scraped AliExpress products. Each item follows the dataset schema.

# 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 = {
    "keywords": [
        "wireless earbuds",
        "smart watch"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("viralanalyzer/aliexpress-affiliate-products").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 = { "keywords": [
        "wireless earbuds",
        "smart watch",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/aliexpress-affiliate-products").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 '{
  "keywords": [
    "wireless earbuds",
    "smart watch"
  ]
}' |
apify call viralanalyzer/aliexpress-affiliate-products --silent --output-dataset

```

## MCP server setup

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

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/t2tE2m0PLNeBOJhXD/builds/GSEHlRJtgj6OdP6bw/openapi.json
