# Alibaba Suppliers Scraper (`w3crawler/alibaba-suppliers-scraper`) Actor

Obtain a list of Alibaba suppliers using a keyword or Search URL.

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

## Pricing

from $2.99 / 1,000 supplier records

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?

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

Collect normalized supplier cards from Alibaba's public company-supplier search. Start from a product keyword or one or more public Alibaba search URLs, cap the result count, and receive deduplicated supplier records with explicit provenance.

### What this Actor does

- Builds Alibaba's public keyword-specific supplier-directory URL and rejects unrelated cards, or preserves supplied Alibaba URLs without imposing an unrelated default filter.
- Parses supplier identity, company attributes, badges, response rate, and linked products.
- Normalizes URLs, removes placeholder values, and deduplicates by supplier identity.
- Reports blocked, failed, or no-result pages in `OUTPUT_SUMMARY`, never as paid dataset rows.
- Stops at Alibaba access-control pages without attempting a bypass.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `keywords` | string | `stainless steel` | Public supplier-search phrase; `keyword` and `query` are aliases. |
| `searchUrl` | string | — | One public Alibaba supplier-search URL. |
| `urls` | request list | — | Up to 20 Alibaba URLs; `startUrls` and `url` are aliases. |
| `page` | integer | `1` | Search page from 1 to 100 when the Actor builds the URL. |
| `maxResults` | integer | `20` | Supplier-record cap from 1 to 100; `maxItems` is an alias. |
| `timeoutMs` | integer | `30000` | Per-request timeout from 5,000 to 60,000 ms. |
| `proxyConfiguration` | object | Direct (`useApifyProxy: false`) | Optional standard Apify proxy configuration. A proxy does not bypass access controls. |

Unknown fields, malformed URL entries, and non-Alibaba URLs fail before requests begin.

#### Example input

```json
{
  "keywords": "stainless steel",
  "page": 1,
  "maxResults": 10,
  "timeoutMs": 30000,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### Dataset output

Every dataset item is a supplier record with identity, company, marketplace, product, and provenance fields. Dataset rows never contain wrapper fields such as `recordId` or `recordType`.

```json
{
  "supplierId": "sup-42",
  "supplierName": "Example Steel Co.",
  "profileUrl": "https://www.alibaba.com/company/example-steel",
  "country": "China",
  "yearsOnAlibaba": 8,
  "badges": ["Gold Supplier", "Trade Assurance"],
  "mainProducts": "Steel tubing",
  "responseRate": 96,
  "requestedUrl": "https://www.alibaba.com/stainless-steel-suppliers.html",
  "sourceUrl": "https://www.alibaba.com/stainless-steel-suppliers.html",
  "scrapedAt": "2026-01-02T03:04:05.000Z"
}
```

The fixed `OUTPUT_SUMMARY` key contains run status, saved-item count, diagnostic count, duplicate count, failed pages, proxy state, bounded diagnostics, and completion time. Diagnostics are excluded from the dataset and success count.

### Limits and cost control

The Actor makes one request per supplied search URL, processes URLs sequentially, uses no automatic retries, and stops when `maxResults` is reached. Keep URLs and result caps small for test runs. Usage may include compute and proxy traffic.

### Public-data and responsible use

This Actor reads only public Alibaba search pages. It does not authenticate, alter browser identity, solve challenges, or bypass access controls. Page markup and availability can vary by locale and network. Supplier details may be business or personal data; follow Alibaba's terms and applicable privacy and sourcing requirements.

### Local development

```bash
npm test
npm run lint
apify validate-schema
apify run --purge
npm run validate
```

# Actor input Schema

## `keywords` (type: `string`):

Product or supplier phrase used to open Alibaba's public keyword-specific supplier directory.

## `keyword` (type: `string`):

Alias for the supplier search phrase.

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

Alias for the supplier search phrase.

## `searchUrl` (type: `string`):

Optional public supplier-search URL. It overrides keywords.

## `urls` (type: `array`):

Optional public supplier-search URLs.

## `startUrls` (type: `array`):

Alias for urls.

## `url` (type: `string`):

One public Alibaba supplier-search URL.

## `page` (type: `integer`):

Supplier search page to request.

## `maxResults` (type: `integer`):

Maximum supplier records to return.

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

Alias for maxResults.

## `timeoutMs` (type: `integer`):

Maximum time allowed for each request.

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

Optional standard Apify proxy settings. Proxy availability does not bypass Alibaba access controls.

## Actor input object example

```json
{
  "keywords": "stainless steel",
  "page": 1,
  "maxResults": 20,
  "timeoutMs": 30000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/alibaba-suppliers-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 = {}

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

```

## MCP server setup

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