# Alibaba Product Scraper (`mrdoe/alibaba-product-scraper`) Actor

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

## Pricing

from $0.80 / 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?

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

### What does Alibaba Product Scraper do?

**Alibaba Product Scraper** extracts wholesale product data from [Alibaba.com](https://www.alibaba.com) - keyword search results and full product detail pages - **anonymously, no login, no Alibaba account, no API key**. Two operations live in one Actor: search for products by keyword, or look up full detail (tiered pricing, MOQ, supplier profile, specs) for one or many product IDs.

### Why use this Actor?

- **Sourcing/price research** - `search` gives you ranked wholesale products for any keyword, with tiered pricing, minimum order quantity (MOQ), and supplier country/rating in one row.
- **Supplier vetting** - `productDetails` returns the supplier's company name, years on Alibaba, Gold/verified status, trade-assurance flag, and recent 6-month order volume alongside the product itself.
- **Price/MOQ tracking** - schedule `productDetails` on a cron and diff consecutive runs to catch tier-price or MOQ changes.
- **Batch, one start fee** - pass a list of keywords or product IDs and one run covers all of them.

### How to use it

1. Pick an **Operation**: Product Search or Product Details.
2. Fill the matching field:
   - **Search** → `query` (e.g. `bluetooth speaker`) or `queries` for a batch.
   - **Product Details** → `productId` (e.g. `1601918386232`) or a full `product-detail` URL, or `productIds` for a batch.
3. Optionally set `maxItems` (default 20).
4. Click **Start**.

Batch fields (`queries`/`productIds`) win over their singular counterparts when filled; duplicates and blanks are dropped automatically.

### Input

| Field                      | Type              | Description                                                                                                                                                                       |
| -------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `operation`                | string (required) | One of: `search`, `productDetails`.                                                                                                                                               |
| `query` / `queries`        | string / array    | Search keyword(s). Used by `search`.                                                                                                                                              |
| `productId` / `productIds` | string / array    | A numeric product ID (e.g. `1601918386232`) or a full `alibaba.com/product-detail/...` URL. Used by `productDetails`.                                                             |
| `maxItems`                 | integer           | Caps total rows across the run. Applies to `search`. Default `20`; first 10 rows of any run are free.                                                                             |
| `proxyConfiguration`       | object            | **Recommended: residential.** Alibaba's slider-CAPTCHA bot check targets automation fingerprints more than IP reputation, but sustained volume benefits from a residential proxy. |

### Why does this Actor use two different techniques for its two operations?

Alibaba runs its own "Baxia"/AWSC bot-detection system, and live verification (2026-08-28/29, repeated on both a local machine and the Apify platform) found it treats the two pages this Actor uses very differently:

- A plain HTTP request (no TLS/browser fingerprint spoofing) to either page gets a 200 response whose body is entirely a `<punish-component />` slider-CAPTCHA shell ("Please drag the slider to verify").
- A Chrome-TLS-impersonated plain HTTP request gets through cleanly on the **product-detail** page every time (10+ consecutive successes, zero CAPTCHAs) - no browser needed there at all, because the full product JSON (`window.detailData`) is embedded server-side in the raw HTML. A real browser, by contrast - stock headless Chromium *and* [Camoufox](https://camoufox.com/) (a fingerprint-patched Firefox) alike - was repeatedly **blocked** on this same page, both locally and on the Apify platform. So `productDetails` runs no browser at all: it fetches with a Chrome-impersonated TLS handshake (via `apify-node-curl-impersonate`) and reads `window.detailData` straight out of the HTML.
- The **search** page is the mirror image: it only server-renders a 4-item teaser and lazy-loads the rest on scroll, a plain HTTP request (impersonated or not) can't trigger that, and stock headless Chromium is hard-blocked outright with the CAPTCHA page above. Camoufox, combined with a scroll loop that triggers Alibaba's own lazy-load, gets through and returns the full result grid (48 cards confirmed after scrolling a single search page) - so `search` runs a real (patched) browser.

Camoufox's pass rate against the search page's challenge was not 100% in this session's live verification (one platform run returned a full 15-row result; a later run with an unrelated code change hit the CAPTCHA on every retry) - Crawlee's automatic retries (a fresh proxy session per attempt) mitigate this, but if a `search` run comes back empty or heavy on retries, that's this arms race, not a bug in the extraction logic; try again.

### Output

One flat row per item. Search rows carry search-result fields; product-detail rows carry the full page. Every row has `_operation` (which mode produced it) and `status` (`success` or `error`) so you can split/filter a mixed export.

Search row example:

```json
{
    "_operation": "search",
    "productId": "1601918386232",
    "title": "Premium Crystal Clear TPU PC Case for iPhone 17 18 Pro Max Strong Magnetic Charging Shockproof Transparent Phone Cover",
    "priceMin": 0.51,
    "priceMax": 0.68,
    "currency": "USD",
    "priceRangeText": "$0.51-0.68",
    "moq": 200,
    "moqUnit": "pieces",
    "soldCount": null,
    "rating": 4.7,
    "reviewCount": 104,
    "isVerifiedSupplier": true,
    "supplierName": "Guangzhou Ruite Electronic Technology Co., Ltd.",
    "supplierCountry": "CN",
    "supplierYears": 9,
    "image": "https://sc04.alicdn.com/kf/He0c23016d3854f688506c3d7090724e8a.png_300x300.png",
    "productUrl": "https://www.alibaba.com/product-detail/Premium-Crystal-Clear-TPU-PC-Case_1601918386232.html",
    "query": "phone case",
    "status": "success"
}
```

Product detail row example:

```json
{
    "_operation": "productDetails",
    "productId": "1601918386232",
    "title": "Premium Crystal Clear TPU PC Case for iPhone 17 18 Pro Max Strong Magnetic Charging Shockproof Transparent Phone Cover",
    "priceMin": 0.51,
    "priceMax": 0.68,
    "currency": "USD",
    "priceRangeText": "$0.51-0.68",
    "moq": 200,
    "moqUnit": "piece",
    "rating": 4.7,
    "reviewCount": 1136,
    "isVerifiedSupplier": true,
    "supplierName": "Guangzhou Ruite Electronic Technology Co., Ltd.",
    "supplierCountry": "CN",
    "supplierYears": 9,
    "supplierProfileUrl": "https://ruitetec.en.alibaba.com/company_profile.html",
    "recentOrderAmount": "200,000+",
    "tradeAssurance": true,
    "category": ["Consumer Electronics", "Phone Case & Accessories"],
    "specifications": [{ "name": "compatible brand", "value": "For Iphone, For Samsung" }],
    "images": ["https://sc04.alicdn.com/kf/He0c23016d3854f688506c3d7090724e8a.png", "..."],
    "productUrl": "https://www.alibaba.com/product-detail/product_1601918386232.html",
    "status": "success"
}
```

`rating`/`reviewCount` on both operations is the **supplier's store-wide rating** (e.g. `4.7` / `1136` reviews), not a per-product review score - Alibaba.com is a B2B wholesale marketplace and has no per-product star-review system the way Amazon or Etsy do.

`currency` is read off the price text on each row, not hardcoded - Alibaba localizes the displayed currency by the visitor's (proxy) geolocation, live-verified 2026-08-29: the same product showed `"$0.51-0.68"` (USD) from one proxy exit and `"PEN 3,458.75-3,804.63"` (Peruvian Sol) from another. Expect `currency` to vary by run/proxy location rather than always being `USD`.

### Pricing

This Actor uses pay-per-event pricing - one small run-start charge, then a per-row charge for each search result or product-detail lookup. See the **Pricing** tab for current rates. Failed lookups land as `status: "error"` rows and are never charged. The first 10 rows of any run are free.

### Tips

- `search` paginates with `page=N` (live-verified to return distinct, non-overlapping products per page) until `maxItems` is satisfied - there's no reliable "last page" indicator in the DOM to stop earlier on, so set `maxItems` deliberately rather than leaving it unbounded for a long-tail keyword.
- For `productDetails` at scale, batch `productIds` in one run rather than one run per ID - only one run-start fee applies.

### Limitations

- Only the numbers/text Alibaba shows to an anonymous, logged-out visitor are available - buyer-specific negotiated pricing is not.
- `rating`/`reviewCount` reflect the supplier's overall store rating, not this specific product.
- `soldCount` is only present on `search` rows for cards Alibaba itself shows sales history for; it is not available on `productDetails`.
- `currency` follows Alibaba's own visitor-geolocation-based localization (see Output above) - don't assume every row is USD.
- `search`'s pass rate against Alibaba's CAPTCHA is not 100% in live testing (see the technique explanation above) - Crawlee retries with a fresh proxy session automatically, but an unlucky run can still come back with fewer rows than expected or none at all. `productDetails` did not show this flakiness in this session's testing (10+/10+ successes).
- Alibaba's page markup and bot-check behavior can drift over time; if a run starts returning `status: "error"` rows or repeated retries, re-verify against a live response.

### FAQ

**Does Alibaba have a public API?** Alibaba.com's open API program is scoped to approved business partners, not general scraping. This Actor gets you search and product data anonymously, no approval process.

**Do I need an Alibaba account or API key?** No - it runs entirely against Alibaba's public, logged-out web pages.

**Why does this need a real (patched) browser instead of a simple HTTP request?** Only for `search`. `productDetails` uses a plain, Chrome-TLS-impersonated HTTP request - no browser - because its data is embedded server-side and a real browser was, counterintuitively, the one thing that got *blocked* there in live testing. `search` lazy-loads its full result grid on scroll and hard-blocks plain headless Chromium with a slider CAPTCHA, so a fingerprint-patched Firefox (Camoufox) is used there instead.

### Disclaimer

This Actor is an independent tool, not affiliated with or endorsed by Alibaba.com or Alibaba Group. It only accesses data Alibaba.com serves publicly to anonymous visitors. Use it in compliance with Alibaba.com's Terms of Use and applicable law in your jurisdiction. Found a bug or have a feature request? Use the Issues tab on this Actor's page.

# Actor input Schema

## `operation` (type: `string`):

Which Alibaba.com data to scrape. One operation per run.

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

Keyword to search Alibaba.com, e.g. "bluetooth speaker". Used by the search operation. Defaults to a demo query if left blank.

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

Many keywords in one run. Wins over "query" when filled. Duplicates and blanks are dropped.

## `productId` (type: `string`):

A numeric Alibaba product ID (the number in a product-detail URL) or a full alibaba.com/product-detail/... URL. Used by the productDetails operation. Leave blank to have the Actor pick a current product.

## `productIds` (type: `array`):

Many product IDs or URLs in one run. Wins over "productId" when filled.

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

Caps total rows returned across the whole run (applies to search; productDetails always returns one row per product ID). The first 10 rows of any run are free. Defaults to 20.

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

Alibaba.com's search results page is protected by a custom slider-CAPTCHA bot check that hard-blocks plain HTTP and plain headless browsers, so this Actor drives a fingerprint-patched Firefox (Camoufox) instead. A residential proxy is strongly recommended for sustained volume.

## Actor input object example

```json
{
  "operation": "search",
  "query": "bluetooth speaker",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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": "bluetooth speaker"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrdoe/alibaba-product-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 = { "query": "bluetooth speaker" }

# Run the Actor and wait for it to finish
run = client.actor("mrdoe/alibaba-product-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 '{
  "query": "bluetooth speaker"
}' |
apify call mrdoe/alibaba-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrdoe/alibaba-product-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/566GPKiSBeVT3hlJf/builds/EcXA16L3rQmKSfwzw/openapi.json
