# Alibaba Phone Number Scraper (`w3crawler/alibaba-phone-number-scraper`) Actor

\[𝗖𝗵𝗲𝗮𝗽𝗲𝘀𝘁 𝗣𝗿𝗶𝗰𝗲] Alibaba Phone Number Scraper extracts publicly available phone numbers from Alibaba for research & outreach. Fast, accurate, and easy to use. Ideal for marketers & businesses.

- **URL**: https://apify.com/w3crawler/alibaba-phone-number-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 phone numbers

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

## Alibaba Phone Number Scraper

### What does this Actor do?

Alibaba Phone Number Scraper extracts rich, publicly visible product and supplier observations from Alibaba search pages. It returns contact numbers only when a number is published beside an explicit label such as `Phone`, `Mobile`, `WhatsApp`, `Viber`, `WeChat`, `Skype`, or `Call`. It can also capture explicitly labeled public emails, supplier facts, product prices, product-scoped images, badges, tags, and pagination context.

Source listing: [scraper-mind/alibaba-phone-number-scraper](https://apify.com/scraper-mind/alibaba-phone-number-scraper)
Primary source: [Alibaba](https://www.alibaba.com/)

The Actor is designed for public research and lead discovery. It does not sign in, submit inquiries, reveal hidden contact details, solve CAPTCHAs, bypass access controls, or infer a phone number from an ID, price, image, or unrelated text. Challenge pages and failed requests are reported in logs and operational metadata rather than as dataset rows.

### Input

#### Basic example

```json
{
  "searchQuery": "gmail free email",
  "maxPages": 2,
  "maxItems": 100,
  "sortBy": "phone_first"
}
```

#### Multiple sources, filters, and sorting

```json
{
  "sourceUrls": [
    "https://www.alibaba.com/gmail-free-email-suppliers.html",
    "https://www.alibaba.com/phone-accessories-suppliers.html"
  ],
  "maxPages": 3,
  "maxItems": 250,
  "sortBy": "response_rate_desc",
  "textQuery": "mobile",
  "supplierCountries": ["CN", "VN", "China"],
  "requiredPhoneLabels": ["whatsapp"],
  "phoneRequired": true,
  "minResponseRatePercent": 80,
  "minPrice": 1,
  "maxPrice": 500
}
```

#### Developer, proxy, and output controls

```json
{
  "sourceUrls": [
    "https://www.alibaba.com/gmail-free-email-suppliers.html"
  ],
  "maxPages": 2,
  "maxItems": 100,
  "requestDelayMs": 1000,
  "maxConcurrency": 2,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 60,
  "maxResponseBytes": 20000000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "includeNoPhoneRows": true,
  "includeMedia": true,
  "includeAttributes": true,
  "includeSupplierDetails": true
}
```

Proxy routing is optional and only changes the request route. It does not bypass Alibaba access controls. Use a respectful delay and comply with Alibaba terms and applicable law.

#### All supported input fields

| Field | Type | Purpose |
| --- | --- | --- |
| `searchQuery` | string | Builds a public `*-suppliers.html` source when URLs are omitted. |
| `queries` | string\[] | Adds independent generated supplier-search sources. |
| `sourceUrls` | string\[] | Public Alibaba source URLs; takes precedence over generated queries. |
| `startUrls` / `url` | array/string | Compatibility aliases for public source URLs. |
| `maxPages` | integer, 1–100 | Maximum ordered pages per source. |
| `maxItems` | integer, 1–5000 | Maximum rows after aggregation, filtering, and sorting. |
| `sortBy` | enum | `phone_first`, `relevance`, `price_asc`, `price_desc`, `response_rate_desc`, `country_asc`, `supplier_name_asc`, or `title_asc`. |
| `textQuery` | string | Case-insensitive text filter over product, supplier, country, tags, badges, and labels. |
| `supplierCountries` | string\[] | Country/Region code or name filter. |
| `requiredPhoneLabels` | string\[] | Requires every listed explicit phone/contact label. |
| `phoneRequired` | boolean | Excludes rows without an explicitly labeled public phone. |
| `minResponseRatePercent` | number, 0–100 | Minimum observed supplier response rate. |
| `minPrice` / `maxPrice` | number | Inclusive overlap filter on the observed product price range. |
| `includeNoPhoneRows` | boolean | Keeps genuine product rows without a public phone. |
| `deduplicate` | boolean | Merges repeated canonical product URLs and repeated normalized phones. |
| `includeMedia` | boolean | Includes product-scoped CDN image fields; Alibaba UI flags and logos are excluded. |
| `includeAttributes` | boolean | Includes product/supplier attributes, Main Products, Top Markets, and Tags. |
| `includeSupplierDetails` | boolean | Includes supplier identity, profiles, country, revenue, response, assurance, and badges. |
| `requestDelayMs` | integer, 0–15000 | Delay before each live public request. |
| `maxConcurrency` | integer, 1–5 | Concurrent independent source crawls. Pages within a source remain ordered. |
| `maxRequestRetries` | integer, 0–10 | Retries for transient network failures. |
| `requestTimeoutSecs` | integer, 15–300 | Per-page request timeout. |
| `maxResponseBytes` | integer | Download safety cap, 100000–50000000 bytes. |
| `proxyConfiguration` | object | Standard Apify Proxy groups and country selection. |
| `userAgent` / `locale` | string | Optional transparent request headers. |

The local test suite uses Actor-relative HTML fixtures to cover pagination and multi-source processing without network access. Public Actor inputs do not expose fixture overrides.

### Pagination and multiple datasets

Each configured public source is crawled independently. The Actor follows an observed Alibaba next-page link when available, otherwise uses a source-specific safe page URL for supported search families. Pages are processed in order up to `maxPages`; sources can run concurrently up to `maxConcurrency`. Canonical product URLs are deduplicated across pages and sources when `deduplicate` is enabled. Repeated normalized public phones are aggregated with `relatedProductUrls`, `relatedProductTitles`, and `relatedProductCount`.

The Actor writes product/contact observations to the default dataset. Run summary and per-source page metadata are stored separately in the `OUTPUT_SUMMARY` and `SOURCE_METADATA` key-value records. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Output data

#### Rich product/contact observation

```json
{
  "productTitle": "Northstar Phone Desk",
  "productUrl": "https://www.alibaba.com/product-detail/Northstar-Phone-Desk_10000000001.html",
  "productId": "10000000001",
  "url": "https://www.alibaba.com/product-detail/Northstar-Phone-Desk_10000000001.html",
  "sourceType": "alibaba_supplier_search",
  "sourceUrl": "https://www.alibaba.com/gmail-free-email-suppliers.html",
  "pageUrl": "https://www.alibaba.com/gmail-free-email-suppliers.html",
  "pageNum": 1,
  "position": 1,
  "supplierPosition": 1,
  "productPosition": 1,
  "query": "gmail free email",
  "pageTitle": "Phone supplier results - page 1",
  "category": "Phone supplier results",
  "phoneNumbers": ["+86 138 0013 8000"],
  "phoneNumbersNormalized": ["+8613800138000"],
  "phoneFound": true,
  "phoneSource": "public-labeled-page-text",
  "phoneLabels": ["phone"],
  "contextSnippet": "Northstar Phone Desk Phone: +86 138 0013 8000",
  "emailAddresses": ["hello@northstar.example"],
  "emailDisplays": ["hello@northstar.example"],
  "emailFound": true,
  "emailSource": "public-labeled-page-text",
  "emailContextSnippet": "Email: hello@northstar.example",
  "company": "Northstar Contact Trading Co.",
  "supplier": "Northstar Contact Trading Co.",
  "supplierName": "Northstar Contact Trading Co.",
  "supplierId": "123456789",
  "supplierProfileUrl": "https://northstar.en.alibaba.com/company_profile.html",
  "supplierContactUrl": "https://northstar.en.alibaba.com/contactinfo.html",
  "profileUrls": [
    "https://northstar.en.alibaba.com/company_profile.html",
    "https://northstar.en.alibaba.com/contactinfo.html"
  ],
  "country": "China",
  "countryCode": "CN",
  "mainProducts": "Mobile Phones, Phone Accessories",
  "totalRevenue": "US$1 Million - US$2.5 Million",
  "topMarkets": "North America 40% , Western Europe 25%",
  "tags": ["Phone Supplier", "Trade Assurance"],
  "responseRatePercent": 95,
  "responseRateText": "95.0% Response Rate",
  "tradeAssuranceLimit": "US $100,000",
  "supplierProductCount": 2,
  "isGoldSupplier": true,
  "isAssessedSupplier": true,
  "isVerifiedSupplier": true,
  "badges": ["Gold Supplier", "Assessed Supplier", "Trade Assurance"],
  "attributes": {
    "mainProducts": "Mobile Phones, Phone Accessories",
    "topMarkets": "North America 40% , Western Europe 25%"
  },
  "productPrice": "US $12.50",
  "priceText": "US $12.50",
  "price": 12.5,
  "priceMin": 12.5,
  "priceMax": 12.5,
  "currency": "USD",
  "imageUrl": "https://sc02.alicdn.com/kf/northstar-phone-desk.jpg",
  "imageUrls": ["https://sc02.alicdn.com/kf/northstar-phone-desk.jpg"],
  "thumbnailUrl": "https://sc02.alicdn.com/kf/northstar-phone-desk.jpg",
  "imageCount": 1,
  "imageAlt": "Northstar Phone Desk",
  "isAd": false,
  "canChatNow": false,
  "canAddToCart": false,
  "relatedProductUrls": [
    "https://www.alibaba.com/product-detail/Northstar-Phone-Desk_10000000001.html",
    "https://www.alibaba.com/product-detail/Northstar-Phone-Adapter_10000000002.html"
  ],
  "relatedProductTitles": ["Northstar Phone Desk", "Northstar Phone Adapter"],
  "relatedProductCount": 2,
  "scrapedAt": "2026-09-06T00:00:00.000Z"
}
```

Rows without a public phone still have `phoneFound: false` and retain genuine product/supplier fields when `includeNoPhoneRows` is enabled. If the same public number appears on multiple products, one contact row contains the related product arrays.

The dataset contains only source-backed product/contact observations. It does not contain diagnostic, error-shaped, placeholder, or empty source rows. Request errors are counted in `OUTPUT_SUMMARY`; per-source page metadata is stored in `SOURCE_METADATA`, and failure details stay in the run logs. A valid search with no matching observations completes with `status: SUCCEEDED` and `dataStatus: NO_RESULTS`; a request/input failure before any observation fails the run. If observations were saved before a later request or optional-output failure, the run completes as `SUCCEEDED` with `dataStatus: PARTIAL` and keeps those rows.

Normal dataset rows intentionally do not contain `fieldCoverage`, `dataQuality`, `httpStatus`, `recordId`, `recordType`, status/success wrappers, actor metadata, transport metadata, or other debugging fields. Operational counts belong in the summary and metadata records; failure details stay in the run logs.

### Local validation and deterministic QA

```text
npm ci
npm test
apify validate-schema
apify run --purge --input-file .\test\inputs\pagination.json
npm run validate
```

The checked-in fixtures exercise rich parsing, two-page pagination, repeated-phone aggregation, multiple sources, filters, sorting, media/detail switches, diagnostics, and input limits without network access. For a live public run, use the root `INPUT.json` or supply a public `sourceUrls` value and omit fixture inputs.

This repository intentionally does not run `apify push` or paid/cloud `apify call` commands as part of local verification.

Run summaries include the required `status`, `runStatus`, and `dataStatus` fields. `status` and `runStatus` are `SUCCEEDED` when source-backed rows were saved or a run completed cleanly with no matches; they are `FAILED` only when a real failure occurs before any rows are saved. `dataStatus` is `COMPLETE`, `PARTIAL`, `NO_RESULTS`, or `FAILED`. Failure details stay in the run logs; key-value summaries retain counts only.

# Actor input Schema

## `searchQuery` (type: `string`):

Supplier-search keywords used to build a public Alibaba supplier page when no source URLs are supplied.

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

Additional supplier queries. Each query becomes an independent public source and can be paginated.

## `sourceUrls` (type: `array`):

One or more public Alibaba supplier-search, product-search, category, or showroom URLs. These take precedence over generated queries.

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

Compatibility alias for sourceUrls. Public HTTPS Alibaba.com URLs only.

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

Compatibility alias for one public Alibaba source URL.

## `maxPages` (type: `integer`):

Maximum ordered public result pages to request for each source. The Actor follows observed next-page links and safe source-specific fallbacks.

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

Maximum product/contact rows emitted after aggregation, filters, and sorting.

## `sortBy` (type: `string`):

Stable ordering applied after all configured sources and pages are collected.

## `textQuery` (type: `string`):

Keep rows whose observed product, supplier, country, selling-point, tag, badge, or phone-label text contains this value.

## `supplierCountries` (type: `array`):

Keep rows whose observed Country/Region code or name matches one of these values, for example CN, VN, or China.

## `requiredPhoneLabels` (type: `array`):

Keep rows containing every requested explicit public label, such as phone, mobile, whatsapp, viber, wechat, skype, or call.

## `phoneRequired` (type: `boolean`):

Keep only product cards with an explicitly labeled public phone/contact number.

## `minResponseRatePercent` (type: `number`):

Keep supplier rows with an observed response rate at or above this percentage.

## `minPrice` (type: `number`):

Keep a row when its observed advertised price range reaches this value.

## `maxPrice` (type: `number`):

Keep a row when its observed advertised price range starts at or below this value.

## `includeNoPhoneRows` (type: `boolean`):

Keep genuine product observations even when no explicitly labeled public phone is present.

## `deduplicate` (type: `boolean`):

Merge repeated canonical product URLs and aggregate repeated phone evidence across pages and sources.

## `includeMedia` (type: `boolean`):

Include only product-scoped public Alibaba CDN imageUrl, thumbnailUrl, imageUrls, imageAlt, and imageCount fields; UI flags and logos are excluded.

## `includeAttributes` (type: `boolean`):

Include observed Main Products, Top 3 Markets, Tags, and the bounded attributes object.

## `includeSupplierDetails` (type: `boolean`):

Include public supplier identity, profile/contact links, country, badges, revenue, trade assurance, and response facts.

## `requestDelayMs` (type: `integer`):

Delay before each live public request. Use a respectful value and follow Alibaba terms and robots policy.

## `maxConcurrency` (type: `integer`):

Maximum independent source crawls running concurrently; pagination within each source remains ordered.

## `maxRequestRetries` (type: `integer`):

Retries for transient public request failures. Access challenges, unsafe redirects, and oversized responses fail closed.

## `requestTimeoutSecs` (type: `integer`):

Timeout for one public page request.

## `maxResponseBytes` (type: `integer`):

Safety cap for a downloaded HTML response.

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

Optional standard Apify Proxy routing for public requests. Proxying changes the route only; it does not bypass CAPTCHAs or access controls.

## `userAgent` (type: `string`):

Optional transparent browser-like User-Agent for public requests.

## `locale` (type: `string`):

Locale sent in Accept-Language, such as en-US or en-GB.

## Actor input object example

```json
{
  "searchQuery": "gmail free email",
  "sourceUrls": [
    "https://www.alibaba.com/gmail-free-email-suppliers.html"
  ],
  "maxPages": 2,
  "maxItems": 100,
  "sortBy": "phone_first",
  "phoneRequired": false,
  "includeNoPhoneRows": true,
  "deduplicate": true,
  "includeMedia": true,
  "includeAttributes": true,
  "includeSupplierDetails": true,
  "requestDelayMs": 1000,
  "maxConcurrency": 2,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 60,
  "maxResponseBytes": 20000000,
  "locale": "en-US"
}
```

# Actor output Schema

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

No description

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

No description

## `sourceMetadata` (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-phone-number-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-phone-number-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-phone-number-scraper --silent --output-dataset

```

## MCP server setup

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