# Alibaba Scraper - Wholesale Prices, MOQ, Suppliers (`s-r/alibaba-scraper`) Actor

Scrape Alibaba search results for B2B sourcing: wholesale price bands, minimum order quantity, units sold, review scores, supplier country and how long each supplier has been a paying member. Prices are requested in US dollars so a run stays comparable.

- **URL**: https://apify.com/s-r/alibaba-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** E-commerce, Business
- **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?

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

## Alibaba Scraper

Search Alibaba and get back what a sourcing decision actually needs: the
wholesale price **band**, the minimum order quantity, how many units have sold,
the supplier's scores, and how long that supplier has been paying for Gold
Supplier status.

48 products per search page, in US dollars, as structured rows.

### What each product gives you

- `title`, `url` and `image_url`
- `price_text` exactly as printed, plus `price_min` and `price_max` as numbers.
  Alibaba quotes a **band**, not a price: `$0.42-0.65` means 42 cents at the
  largest order quantity and 65 cents at the smallest. Both ends are kept
  because the spread is the negotiating room.
- `moq` and `moq_text` — the minimum order, as a number and as written
- `units_sold`, `review_score`, `review_count`, `product_score`,
  `shipping_score` and `supplier_service_score`
- `company_name`, `company_country`, `company_url` and `company_id`
- `gold_supplier_years` — years of paid Gold Supplier status, which is the
  cheapest available proxy for how long a supplier has been serious
- `is_ad`, so paid placements can be filtered out of any ranking you build
- `certifications`, where the card shows them
- `exit_country`, which matters more here than on most sites (see below)

### Prices are forced to US dollars, on purpose

Alibaba prices in the currency of whoever is asking. During development the
same query came back in Singapore dollars, pounds sterling, Omani rials and
Pakistani rupees depending on where the request came from, with no error and no
indication anywhere in the page. A scraper that ignores this produces a price
column that is quietly a mix of four currencies.

Two things stop that here. Every search asks for USD explicitly, and every row
records both the printed `currency` and a normalised `currency_code`. The run
summary counts currencies and raises a warning **only when the codes genuinely
differ**, so `US$` and `$` do not trigger a false alarm on clean data.

If you see the warning, the prices in that run are not comparable and should
not be averaged.

### How it handles Alibaba's throttling

This is the part worth understanding before you plan a large run.

Alibaba stops serving a given network after roughly **one request**. Measured
during development: five separate countries each returned a complete page on a
first request, and all five were serving a small placeholder thirty seconds
later. Retrying the same route does not recover it — sixty-eight consecutive
retries through one country returned the placeholder sixty-eight times, while a
single request through an untouched one worked immediately.

So this Actor does the opposite of retrying. Each page is fetched through a
different country, a country that returns the placeholder is marked spent for
the rest of the run rather than tried again, and the run summary reports which
countries were used and which were consumed.

The practical consequence is a **volume ceiling, not a reliability problem**: a
handful of pages per run works well, a hundred does not. If a run reports pages
it could not read, wait a few minutes and run it again. Recovery is on the
order of minutes.

### Input

- **Search terms** — `usb cable`, `led strip`, or a full Alibaba search URL
  pasted as-is
- **Result pages per term** — each page is 48 products and consumes one country
- **Exits to try per page** — how many countries to try before giving up on a
  page. Raise it if pages are failing, lower it to finish faster.
- **Preferred country** — tried first, then the run falls through to others
- **Maximum products per term** and **maximum search terms**

### Run summary

Products returned, how many carried a price, how many quoted a band rather than
a single figure, how many carried a minimum order, how many were sponsored, the
number of distinct suppliers, the lowest and highest prices seen, the currency
breakdown, and the exit countries used and spent.

That last pair is the health check for a run. Many countries spent for few
products means the pool was already warm, and the fix is to wait rather than to
change anything.

### What people use this for

**Sourcing and cost discovery.** The price band plus the minimum order is the
whole basis of a landed-cost estimate, and both come through as numbers rather
than as text to re-parse.

**Supplier shortlisting.** `gold_supplier_years`, `units_sold`, `review_count`
and the three score fields together separate an established manufacturer from a
listing that went up last month. Filtering `is_ad` out first is usually the
right first move, since paid placements sit at the top regardless of merit.

**Competitor cost benchmarking.** If a competitor sells a product you can
identify on Alibaba, the band tells you roughly what they pay for it.

**Catalogue seeding.** `product_id`, `title`, `image_url` and `url` are enough
to start a catalogue, and the id is stable across runs.

### Notes

Prices, stock and supplier scores are read at the moment of the fetch and move
constantly, so two runs hours apart will legitimately disagree.

Search highlighting is stripped from titles: Alibaba wraps matched words in
markup, and a title with tags in it breaks every downstream use of the field.

No login, no cookies and no API key are needed.

# Actor input Schema

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

What to search Alibaba for, for example 'usb cable' or 'led strip'. A full Alibaba search URL is also accepted and used as pasted. Keep runs small: Alibaba throttles hard, so a handful of terms per run is far more reliable than a long list.

## `pages` (type: `integer`):

How many pages to walk for each term. Each page holds 48 products and costs one fetch through a fresh exit, so this multiplies how much of the exit pool a run consumes.

## `products_per_query` (type: `integer`):

Upper bound on rows returned for each search term.

## `max_queries` (type: `integer`):

How many terms to process in one run.

## `exits_per_page` (type: `integer`):

How many different countries to try before giving up on a page. Alibaba stops serving a country after about one request, so each attempt uses a new one. Raise this if pages are failing; lower it to make a run finish faster.

## `country` (type: `string`):

Optional two-letter code to try first, for example de or sg. The run still falls through to other countries when that one is exhausted. Prices are requested in US dollars regardless.

## Actor input object example

```json
{
  "queries": [
    "usb cable",
    "led strip"
  ],
  "pages": 1,
  "products_per_query": 200,
  "max_queries": 30,
  "exits_per_page": 8,
  "country": "de"
}
```

# Actor output Schema

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

One row per product.

## `summary` (type: `string`):

Counts, price range, currencies seen and which exit countries were used.

## `errors` (type: `string`):

Pages that could not be read, with a code and a redacted message.

# 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 = {
    "queries": [
        "usb cable",
        "led strip"
    ],
    "pages": 1,
    "products_per_query": 200,
    "max_queries": 30,
    "exits_per_page": 8
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/alibaba-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 = {
    "queries": [
        "usb cable",
        "led strip",
    ],
    "pages": 1,
    "products_per_query": 200,
    "max_queries": 30,
    "exits_per_page": 8,
}

# Run the Actor and wait for it to finish
run = client.actor("s-r/alibaba-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 '{
  "queries": [
    "usb cable",
    "led strip"
  ],
  "pages": 1,
  "products_per_query": 200,
  "max_queries": 30,
  "exits_per_page": 8
}' |
apify call s-r/alibaba-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s-r/alibaba-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/bJGNQvgFMMLNMXYss/builds/dNq2n9eQOzGNA4oUM/openapi.json
