# Alibaba Products Scraper (`devilscrapes/alibaba-products-scraper`) Actor

Search Alibaba.com product listings by keyword and get structured rows for every matching supplier offer — product id, title, price/price range, MOQ, supplier name, image, and product URL. Built for dropshippers, sourcing agents, and e-commerce tooling. A wholesale supplier API alternative.

- **URL**: https://apify.com/devilscrapes/alibaba-products-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Alibaba Products Scraper

**💰 $6.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Search Alibaba.com product listings by keyword and get structured rows for every matching supplier offer — product id, title, price/price range, MOQ, supplier name, image, and product URL. Built for dropshippers, sourcing agents, and e-commerce tooling.

</div>

***

### 🎯 What this scrapes

Alibaba.com is the largest B2B sourcing marketplace on the web, and its own search box is the only way most buyers ever touch it. This Actor pastes your search terms into that search box for you — feed it one or more free-text queries like "bluetooth speaker" or "led strip light" and get back structured rows for every matching supplier offer: product ID, title, price or price range, minimum order quantity, supplier name, primary image, and the direct product URL. Pagination and cross-page duplicate offers (a known quirk of Alibaba's sponsored listings) are handled for you, so every row in your dataset is a unique product.

### 🔥 What we handle for you

- 🛡️ **Browser fingerprint rotation** — `curl-cffi` impersonates real Chrome / Firefox TLS handshakes on every fetch, good hygiene on any target.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 503` and network errors — up to 5 attempts per page, `Retry-After` honoured.
- 🧹 **Run-wide duplicate removal** — Alibaba's sponsored listings repeat across search pages; we dedupe every product ID across the whole run, not just per page, so you never pay twice for the same product.
- 🧩 **Per-term fault isolation** — one search term's fetch or parse failure skips just that term with a logged warning; it never sinks the whole run.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, ISO-8601 timestamps, stable product IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. A search that runs and matches nothing still succeeds — no data, no charge beyond the warm-up fee.

### 💡 Use cases

- **Dropshipping sourcing** — bulk-collect candidate suppliers and price ranges for a product niche before committing to a sample order.
- **Sourcing-agent workflows** — turn a client's product brief into a structured shortlist of Alibaba suppliers in minutes.
- **Price benchmarking** — compare price/MOQ spread across many suppliers for the same product category.
- **E-commerce tooling** — feed supplier catalogs into internal PIM/ERP systems without hand-browsing search pages.
- **Market research** — track how many suppliers list a given product and how pricing shifts over time.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `searchTerms` | `array` | no | \['bluetooth speaker', 'led strip light'] | One or more free-text Alibaba search queries (e.g. <code>bluetooth speaker</code>, <code>led strip light</code>). Each… |
| `maxResultsPerTerm` | `integer` | no | 100 | Cap on unique products collected per search term. Values above ~50 force multi-page pagination with run-wide duplicate… |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': True} | Apify Proxy spec — mandatory field. Live recon found no anti-bot challenge on alibaba.com/trade/search, so the standard… |

#### Example input

```json
{
  "searchTerms": [
    "bluetooth speaker",
    "led strip light"
  ],
  "maxResultsPerTerm": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `product_id` | `string` | Alibaba's internal product ID. |
| `search_term` | `string` | The search query that produced this row. |
| `title` | `string` | Product title as listed on the search results page. |
| `price` | `string` | Raw price or price-range string as served (mixed currency formats preserved). |
| `moq` | `string` | Minimum order quantity string, when present. |
| `supplier_name` | `string` | Supplier / company name, when present. |
| `image_url` | `string` | Primary listing image URL. |
| `product_url` | `string` | Absolute alibaba.com product detail page URL. |
| `page_number` | `integer` | 1-indexed search results page this row was found on. |
| `scraped_at` | `string` | UTC ISO-8601 timestamp captured when the page was fetched. |

#### Example output

```json
{
  "product_id": "1600123456789",
  "search_term": "bluetooth speaker",
  "title": "Wholesale Portable Waterproof Bluetooth Speaker Outdoor",
  "price": "$3.50-5.20",
  "moq": "100 pieces",
  "supplier_name": "Shenzhen Example Electronics Co., Ltd.",
  "image_url": "https://s.alicdn.com/@sc04/kf/example.jpg",
  "product_url": "https://www.alibaba.com/product-detail/example_1600123456789.html",
  "page_number": 1,
  "scraped_at": "2026-09-17T12:00:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.20 | One-off warm-up charge per run |
| `result-item` | $0.006 | Per unique dataset item |

Example: 1 000 results at the rates above ≈ **$6.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- v0.1 is a search-results scraper only — product detail-page enrichment (supplier contact info, reviews, certifications) is out of scope.
- 1688.com (Alibaba's Chinese-domestic sister site) is a different host and is not covered by this Actor.
- Login-gated data (RFQ quotes, buyer-specific pricing) is out of scope.

### ❓ FAQ

**Do I need an Alibaba account?**

No. This Actor scrapes Alibaba's public trade/search results page — no login required.

**How do I widen my results?**

Add more or broader searchTerms — each term paginates independently up to maxResultsPerTerm unique products.

**Why did I get fewer rows than maxResultsPerTerm?**

Alibaba's sponsored listings repeat heavily across pages. We dedupe by product ID across the whole run, so a term stops paginating once a page stops contributing new products — that's a real ceiling on that term, not a bug.

**Do I need a residential proxy?**

You don't need to configure one — we already do it for you. 🛡️ Early recon saw no
challenge on alibaba.com/trade/search, but that didn't hold: a full run on the
plain pool hit a served 200-OK anti-bot challenge on every search term. So the
Actor now pins a US residential session by default and rotates it on every
detected challenge. Leave `proxyConfiguration` alone and it just works; an
explicit `apifyProxyGroups` in your input still overrides us.

**What happens if a search term matches nothing?**

The run succeeds with zero rows for that term and reports what was searched — a real zero-match result is not treated as a failure.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Changelog

This Actor's version history is a separate document: https://apify.com/devilscrapes/alibaba-products-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

One or more free-text Alibaba search queries (e.g. <code>bluetooth speaker</code>, <code>led strip light</code>). Each term is fetched as its own paginated <code>trade/search</code> run.

## `maxResultsPerTerm` (type: `integer`):

Cap on unique products collected per search term. Values above ~50 force multi-page pagination with run-wide duplicate removal.

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

Apify Proxy spec — mandatory field. The Actor defaults to a RESIDENTIAL proxy pinned to the US when this is left at {"useApifyProxy": true} — the default (datacenter/auto) pool hit a served anti-bot challenge in cloud QA (2026-09-17). Override apifyProxyGroups/apifyProxyCountry here to change it.

## Actor input object example

```json
{
  "searchTerms": [
    "bluetooth speaker",
    "led strip light"
  ],
  "maxResultsPerTerm": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "searchTerms": [
        "bluetooth speaker",
        "led strip light"
    ],
    "maxResultsPerTerm": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/alibaba-products-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 = {
    "searchTerms": [
        "bluetooth speaker",
        "led strip light",
    ],
    "maxResultsPerTerm": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/alibaba-products-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 '{
  "searchTerms": [
    "bluetooth speaker",
    "led strip light"
  ],
  "maxResultsPerTerm": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call devilscrapes/alibaba-products-scraper --silent --output-dataset

```

## MCP server setup

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