# Alibaba Email Scraper (`leads-scraper/alibaba-email-scraper`) Actor

Alibaba Email Scraper SD - Alibaba Email Scraper is a lead generation tool that extracts leads with public contact emails, account names and profile URLs from Alibaba results by keyword, location and email domain - Alibaba email extractor.

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

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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?

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 Email Scraper: public supplier emails from the world's biggest B2B marketplace

The Alibaba Email Scraper turns Google's public index of `alibaba.com` into a structured, deduplicated lead list. It collects the contact emails suppliers publish themselves, together with the account label and mini-site URL that sit beside them.

Read the honest part first. Alibaba routes buyer contact through its own messaging system, so this Actor finds only the emails suppliers publish on their public mini-site and product pages.

That means the Alibaba Email Scraper returns few addresses per run compared with smaller trade portals. Coverage includes Alibaba Business (B2B) listings as well as the classic supplier mini-sites.

If you need volume rather than brand recognition, pair this with the [Tradewheel Email Scraper](https://apify.com/leads-scraper/tradewheel-email-scraper) or the [HKTDC Sourcing Email Scraper](https://apify.com/neuro-scraper/hktdc-sourcing-email-scraper).

### What the Alibaba Email Scraper actually does

The Alibaba Email Scraper builds Google queries with the `site:` operator against `alibaba.com`, fetches result pages through the Apify GOOGLE_SERP proxy, and reads emails out of the titles and snippets.

The Alibaba Email Scraper does not log into Alibaba, use an Alibaba API, or open the Alibaba website. There is no browser, no JavaScript rendering, no authentication and no cookies.

Everything the Alibaba Email Scraper returns is already public in Google's index. That is the whole design: a supplier email list built from what exporters deliberately put on the open web.

Suppliers publish export-sales addresses on purpose, because inbound enquiries are their business. This Actor simply gathers those published china manufacturer contacts into one dataset.

### Alibaba Email Scraper features at a glance

| Feature | What it means for supplier prospecting |
|---|---|
| Google `site:` search | Every query is scoped to `alibaba.com`, so results stay on-platform |
| Query expansion | Base, quoted and `intitle:` variants plus one per query modifier; base queries run first |
| Global deduplication | An email is pushed once, across every query and every page of the run |
| Email normalisation | Understands `name [at] domain [dot] com`, `name (at) domain`, `name @ domain.com`, `domain .com`, zero-width characters and the full-width `＠` |
| Junk filter | Rejects placeholders such as `email@`, `yourname@`, `test@`, `xxx@` and single-character locals |
| Boundary-correct matching | `@gmail.com` never matches inside `@gmail.company` or `@gmail.com.br` |
| Soft-wrap repair | Drops a hit that is only the tail of another email in the same result block |
| Structural block parsing | Locates the `<h3>` title then the smallest surrounding block, instead of relying on Google CSS class names |
| Whole-page fallback parser | A Google layout change degrades to "emails without account details", not "no emails" |
| Block detection | CAPTCHA, "unusual traffic" and consent pages are detected and retried, not counted as empty |
| Retries and re-queue | Up to 3 attempts per page with exponential backoff and a fresh proxy session; failed queries re-queued once at the end |
| Resumable state | Run state is kept in the key-value store keyed by an input hash, and saved on `PERSIST_STATE`, `MIGRATING` and `ABORTING` |
| Concurrency | An `asyncio` worker pool with a shared stop signal on `maxEmails` |
| Run summary | Logs pages fetched, blocked pages, retries and emails per page |

Every one of those features is shared engine behaviour, tuned here by the Alibaba Email Scraper config: the `alibaba.com` domain scope, the default keywords and the export-oriented query modifiers.

### How the Alibaba Email Scraper works, step by step

1. The Alibaba Email Scraper reads your input: keywords, location, email domains and limits.
2. It composes Google queries such as `site:alibaba.com supplier "@gmail.com" "Guangdong"`.
3. It fetches result pages asynchronously through the Apify GOOGLE_SERP proxy using `aiohttp`.
4. It parses each result block structurally to isolate the title, the snippet and the site label.
5. It extracts emails with a domain-filtered regex, normalises them and drops junk.
6. It deduplicates globally and pushes each lead to the Apify dataset immediately.

Because the Alibaba Email Scraper streams results to the dataset as they are found, you can start exporting supplier contacts to CSV, JSON or Excel while the run is still going.

Alibaba gives each supplier its own subdomain, in the form `suppliername.en.alibaba.com`. That subdomain is the handle, which is why the Alibaba Email Scraper resolves `username` and `profileUrl` on most rows.

### Alibaba Email Scraper input fields

| Field | Type | Default | Meaning |
|---|---|---|---|
| `keywords` | array (required) | `["manufacturer", "supplier"]` | Search terms: niche, product vertical, job title, industry |
| `location` | string | `""` | Optional location phrase added to every query |
| `customDomains` | array | `["@gmail.com", "@yahoo.com"]` | Only emails on these domains are kept; the leading `@` is optional |
| `maxEmails` | integer 1-10000 | `20` | Stop once this many unique emails have been collected |
| `countryCode` | string | `""` | Two-letter country for the search proxy (US, GB, DE...) |
| `expandQueries` | boolean | `true` | Search each keyword x domain pair in several phrasings |
| `queryModifiers` | array | `["email", "contact", "export", "wholesale", "sales enquiries"]` | Extra words combined with each keyword when expansion is on |
| `maxPagesPerQuery` | integer 1-50 | `30` | Page cap per query |
| `maxConcurrency` | integer 1-20 | `5` | How many queries run in parallel |

#### Example input for the Alibaba Email Scraper

```json
{
  "keywords": [
    "silicone kitchenware manufacturer",
    "stainless steel cookware supplier",
    "OEM cookware factory"
  ],
  "location": "Guangdong",
  "customDomains": ["@gmail.com", "@163.com", "@qq.com", "@outlook.com"],
  "maxEmails": 400,
  "countryCode": "US",
  "expandQueries": true,
  "queryModifiers": ["email", "contact", "export", "wholesale", "sales enquiries"],
  "maxPagesPerQuery": 30,
  "maxConcurrency": 5
}
```

When you run the Alibaba Email Scraper, Chinese-hosted mailbox domains such as `@163.com`, `@126.com` and `@qq.com` matter a lot. Many mainland export-sales teams publish those instead of a corporate address.

### Alibaba Email Scraper output fields

Every dataset item produced by the Alibaba Email Scraper carries all fourteen fields below, so your CRM import mapping never changes between runs.

| Field | Meaning |
|---|---|
| `network` | Platform name |
| `keyword` | The keyword that produced the lead |
| `query` | The exact Google query used |
| `title` | Raw result title |
| `accountName` | Account label Google prints |
| `fullName` | Display name parsed from a profile-style title; empty for listing captions |
| `username` | URL-safe handle when the platform exposes one; otherwise `null` |
| `profileUrl` | Canonical account URL when a handle is known; otherwise empty |
| `url` | Direct platform link when exposed, else the profile URL |
| `description` | Bio or listing snippet, cleaned of labels and counters |
| `email` | Lower-cased email address |
| `emailDomain` | The matched domain, for example `@gmail.com` |
| `possiblyTruncated` | `true` when Google's snippet ellipsis touched the email |
| `foundAt` | ISO 8601 UTC timestamp |

#### Example output from the Alibaba Email Scraper

```json
{
  "network": "Alibaba",
  "keyword": "silicone kitchenware manufacturer",
  "query": "site:alibaba.com silicone kitchenware manufacturer \"@gmail.com\" \"Guangdong\"",
  "title": "Ningbo Brightex Housewares Co., Ltd. - Silicone Kitchenware",
  "accountName": "Ningbo Brightex Housewares Co., Ltd.",
  "fullName": "Ningbo Brightex Housewares Co., Ltd.",
  "username": "ningbo-brightex",
  "profileUrl": "https://ningbo-brightex.en.alibaba.com/",
  "url": "https://ningbo-brightex.en.alibaba.com/company_profile.html",
  "description": "Silicone spatulas, moulds and bakeware. OEM/ODM welcome. Export sales: brightex.sales@gmail.com",
  "email": "brightex.sales@gmail.com",
  "emailDomain": "@gmail.com",
  "possiblyTruncated": false,
  "foundAt": "2026-08-31T09:14:02Z"
}
```

### Who uses the Alibaba Email Scraper

The Alibaba Email Scraper is built for people who buy from factories rather than people who sell to consumers. The table below maps the main audiences to a concrete job.

| Buyer type | How the Alibaba Email Scraper fits their workflow |
|---|---|
| Importers and wholesale buyers | Build a first-contact list of factories in one product vertical before an RFQ round |
| Procurement and sourcing agents | Keep a running roster of alternate suppliers per category for price benchmarking |
| Private-label and dropship brands | Find OEM/ODM factories that publish an export-sales inbox for sample requests |
| Freight forwarders and customs brokers | Reach shippers in a corridor you already service with capacity offers |
| Trade-show organisers | Invite exhibitors from a category that matches an upcoming Canton or hardware fair |
| Quality-inspection firms | Approach factories in a region where your inspectors already travel |
| Sales teams selling to manufacturers | Prospect packaging, logistics or compliance services into export-ready suppliers |

### Tuning the Alibaba Email Scraper for better yield

Keyword specificity is the single biggest lever on the Alibaba Email Scraper. `supplier` returns generic noise, while `industrial ultrasonic cleaner manufacturer` returns a shortlist you can actually work.

Run the Alibaba Email Scraper with three to eight tight product-vertical keywords rather than one broad category term. Each keyword gets its own expanded query set.

Set `countryCode` to steer the search proxy. `US` and `GB` surface the English-language mini-sites exporters build for Western buyers, which is where published addresses cluster.

`customDomains` is the second lever. Adding `@163.com`, `@126.com`, `@qq.com` and `@foxmail.com` alongside the defaults roughly widens the net for mainland sales staff.

Leave `expandQueries` on. Google caps a single query at roughly 300 results, and expansion is how the Alibaba Email Scraper works around that ceiling.

Raise `maxPagesPerQuery` before you raise `maxConcurrency`. Depth beats parallelism when the platform's indexed footprint is the limiting factor.

### What results to expect from the Alibaba Email Scraper

In a measured test run the Alibaba Email Scraper read 10 Google result blocks, resolved company identity on 7 of them, produced 7 profile URLs, and yielded 2 unique emails.

That ratio is the honest signature of this platform. Identity data is excellent because of the subdomain handles; email volume is low because Alibaba wants you inside its messaging system.

Treat the Alibaba Email Scraper as a precision tool for a marquee marketplace, not a volume engine. For raw email counts, the sibling Actors below do better.

Results vary with keywords, domains and location, and no volume is guaranteed. Run a small `maxEmails` first to calibrate before committing a large run.

### Alibaba Email Scraper limitations

- **Yield.** Alibaba routes buyer contact through its own messaging, so the Alibaba Email Scraper finds only the emails suppliers publish on public mini-site and product pages. Expect few addresses per run.
- Only accounts whose email is **publicly visible in Google's index** can be found.
- Google caps a single query at roughly 300 results, which is exactly why query expansion exists.
- `possiblyTruncated: true` means Google's snippet ellipsis touched the address; verify before sending.
- The Actor requires the Apify GOOGLE_SERP proxy and cannot run without Apify proxy credentials.
- Free Apify plans are capped at 100 emails per run; paid plans are uncapped.
- `username` and `profileUrl` are populated only when Google exposes a handle. Where Google prints just a display name, those rows carry `accountName` and `fullName` with an empty handle. That is a Google limitation, not a bug.
- Results vary with keywords, domains and location; no volume is guaranteed.

### Responsible use, GDPR and trade compliance

Business contact data is still personal data in many jurisdictions. Under GDPR and similar regimes you need a lawful basis, a clear purpose and a working opt-out before you use anything the Alibaba Email Scraper returns.

Keep outreach relevant to the supplier's own trade, identify yourself and your company, and honour unsubscribe requests on the first ask.

Screen counterparties against your own sanctions and denied-party obligations before transacting. This Actor is a discovery tool and performs no screening of its own.

None of the above is legal advice. If your programme touches restricted jurisdictions or regulated goods, take proper counsel.

### Related Actors

| Actor | What it collects |
|---|---|
| [DirectIndustry Email Scraper](https://apify.com/neuro-scraper/directindustry-email-scraper) | Public contact emails from DirectIndustry |
| [DIYTrade Email Scraper](https://apify.com/neuro-scraper/diytrade-email-scraper) | Public contact emails from DIYTrade |
| [ECPlaza Email Scraper](https://apify.com/neuro-scraper/ecplaza-email-scraper) | Public contact emails from ECPlaza |
| [Fibre2Fashion Email Scraper](https://apify.com/neuro-scraper/fibre2fashion-email-scraper) | Public contact emails from Fibre2Fashion |
| [Global Sources Email Scraper](https://apify.com/leads-scraper/global-sources-email-scraper) | Public contact emails from Global Sources |
| [GlobalSpec Email Scraper](https://apify.com/leads-scraper/globalspec-email-scraper) | Public contact emails from GlobalSpec |
| [HKTDC Sourcing Email Scraper](https://apify.com/neuro-scraper/hktdc-sourcing-email-scraper) | Public contact emails from HKTDC Sourcing |
| [IndiaMART Email Scraper](https://apify.com/leads-scraper/indiamart-email-scraper) | Public contact emails from IndiaMART |
| [IndustryStock Email Scraper](https://apify.com/neuro-scraper/industrystock-email-scraper) | Public contact emails from IndustryStock |
| [IQS Directory Email Scraper](https://apify.com/neuro-scraper/iqs-directory-email-scraper) | Public contact emails from IQS Directory |
| [Made-in-China Email Scraper](https://apify.com/leads-scraper/made-in-china-email-scraper) | Public contact emails from Made-in-China |
| [Taiwantrade Email Scraper](https://apify.com/leads-scraper/taiwantrade-email-scraper) | Public contact emails from Taiwantrade |
| [Textile Infomedia Email Scraper](https://apify.com/leads-scraper/textile-infomedia-email-scraper) | Public contact emails from Textile Infomedia |
| [Textile World Email Scraper](https://apify.com/leads-scraper/textile-world-email-scraper) | Public contact emails from Textile World |
| [Thomas Scientific Email Scraper](https://apify.com/leads-scraper/thomas-scientific-email-scraper) | Public contact emails from Thomas Scientific |
| [TradeKey Email Scraper](https://apify.com/neuro-scraper/tradekey-email-scraper) | Public contact emails from TradeKey |
| [Tradewheel Email Scraper](https://apify.com/leads-scraper/tradewheel-email-scraper) | Public contact emails from Tradewheel |
| [Wer Liefert Was Email Scraper](https://apify.com/leads-scraper/wer-liefert-was-email-scraper) | Public contact emails from wlw |
| [DirectIndustry Email and Phone Number Scraper](https://apify.com/neuro-scraper/directindustry-email-and-phone-number-scraper) | Emails and phone numbers from DirectIndustry |
| [DIYTrade Email and Phone Number Scraper](https://apify.com/neuro-scraper/diytrade-email-and-phone-number-scraper) | Emails and phone numbers from DIYTrade |
| [ECPlaza Email and Phone Number Scraper](https://apify.com/neuro-scraper/ecplaza-email-and-phone-number-scraper) | Emails and phone numbers from ECPlaza |
| [Fibre2Fashion Email and Phone Number Scraper](https://apify.com/neuro-scraper/fibre2fashion-email-and-phone-number-scraper) | Emails and phone numbers from Fibre2Fashion |
| [Global Sources Email and Phone Number Scraper](https://apify.com/leads-scraper/global-sources-email-and-phone-number-scraper) | Emails and phone numbers from Global Sources |
| [GlobalSpec Email and Phone Number Scraper](https://apify.com/neuro-scraper/globalspec-email-and-phone-number-scraper) | Emails and phone numbers from GlobalSpec |
| [HKTDC Sourcing Email and Phone Number Scraper](https://apify.com/neuro-scraper/hktdc-sourcing-email-and-phone-number-scraper) | Emails and phone numbers from HKTDC Sourcing |
| [IndiaMART Email and Phone Number Scraper](https://apify.com/leads-scraper/indiamart-email-and-phone-number-scraper) | Emails and phone numbers from IndiaMART |
| [IndustryStock Email and Phone Number Scraper](https://apify.com/neuro-scraper/industrystock-email-and-phone-number-scraper) | Emails and phone numbers from IndustryStock |
| [IQS Directory Email and Phone Number Scraper](https://apify.com/neuro-scraper/iqs-directory-email-and-phone-number-scraper) | Emails and phone numbers from IQS Directory |
| [Made-in-China Email and Phone Number Scraper](https://apify.com/leads-scraper/made-in-china-email-and-phone-number-scraper) | Emails and phone numbers from Made-in-China |
| [TradeKey Email and Phone Number Scraper](https://apify.com/neuro-scraper/tradekey-email-and-phone-number-scraper) | Emails and phone numbers from TradeKey |
| [wlw Email and Phone Number Scraper](https://apify.com/leads-scraper/wer-liefert-was-email-and-phone-number-scraper) | Emails and phone numbers from wlw |
| [DirectIndustry Phone Number Scraper](https://apify.com/neuro-scraper/directindustry-phone-number-scraper) | Public phone numbers from DirectIndustry |
| [DIYTrade Phone Number Scraper](https://apify.com/neuro-scraper/diytrade-phone-number-scraper) | Public phone numbers from DIYTrade |
| [ECPlaza Phone Number Scraper](https://apify.com/neuro-scraper/ecplaza-phone-number-scraper) | Public phone numbers from ECPlaza |
| [Fibre2Fashion Phone Number Scraper](https://apify.com/neuro-scraper/fibre2fashion-phone-number-scraper) | Public phone numbers from Fibre2Fashion |
| [Global Sources Phone Number Scraper](https://apify.com/leads-scraper/global-sources-phone-number-scraper) | Public phone numbers from Global Sources |
| [GlobalSpec Phone Number Scraper](https://apify.com/neuro-scraper/globalspec-phone-number-scraper) | Public phone numbers from GlobalSpec |
| [HKTDC Sourcing Phone Number Scraper](https://apify.com/neuro-scraper/hktdc-sourcing-phone-number-scraper) | Public phone numbers from HKTDC Sourcing |
| [IndiaMART Phone Number Scraper](https://apify.com/leads-scraper/indiamart-phone-number-scraper) | Public phone numbers from IndiaMART |
| [IndustryStock Phone Number Scraper](https://apify.com/neuro-scraper/industrystock-phone-number-scraper) | Public phone numbers from IndustryStock |
| [IQS Directory Phone Number Scraper](https://apify.com/neuro-scraper/iqs-directory-phone-number-scraper) | Public phone numbers from IQS Directory |
| [Made-in-China Phone Number Scraper](https://apify.com/leads-scraper/made-in-china-phone-number-scraper) | Public phone numbers from Made-in-China |

### Alibaba Email Scraper FAQ

#### Does the Alibaba Email Scraper log into Alibaba?

No. It reads Google search results through the Apify GOOGLE_SERP proxy. There is no login, no API key, no browser and no cookies.

#### Does it access contact details Alibaba keeps behind its messaging system?

No. The Alibaba Email Scraper cannot see anything hidden behind Alibaba's messaging or contact-supplier flow. It only reads addresses already public in Google's index.

#### How many results should I expect?

On a measured run: 10 result blocks, 7 with company identity, 7 profile URLs, and 2 unique emails. Identity coverage is high, email yield is low. Plan around that.

#### Why does the Alibaba Email Scraper find so few emails?

Because Alibaba deliberately channels buyer contact through its own messaging. Only suppliers who publish an address on their mini-site or product pages are findable.

#### Why do most rows have a working profile URL?

Alibaba gives every supplier its own subdomain in the form `suppliername.en.alibaba.com`. That subdomain is the handle, so the Alibaba Email Scraper can rebuild a canonical mini-site URL.

#### Does it cover Alibaba Business (B2B) listings?

Yes. The domain scope covers Alibaba Business (B2B) listings alongside the classic supplier mini-sites.

#### Which email domains should I add?

Start with the defaults, then add `@163.com`, `@126.com`, `@qq.com`, `@foxmail.com` and `@outlook.com`. Mainland export-sales staff use those heavily.

#### Does `countryCode` change what I get?

Yes. It steers the search proxy, and different Google locales surface different slices of the Alibaba index. `US` and `GB` favour the English-language mini-sites.

#### What is `possiblyTruncated` for?

Google sometimes cuts a snippet mid-address. When that ellipsis touches the email the flag goes `true`, so you can filter or verify those rows before sending.

#### Can I resume an interrupted run?

Yes. State lives in the key-value store keyed by a hash of your input, and is saved on Apify's `PERSIST_STATE`, `MIGRATING` and `ABORTING` events.

#### Is this affiliated with Alibaba?

No. The Alibaba Email Scraper is an independent Actor and is not supported, endorsed or affiliated with Alibaba in any way.

#### Which Actor should I run if I want volume instead?

Try the Tradewheel, HKTDC Sourcing or DIYTrade Actors in the table above. They return far more addresses per run than the Alibaba Email Scraper.

### Leave a review

If the Alibaba Email Scraper saved you time, please leave a star rating and a short review on
the Actor page.

Reviews are how other buyers judge whether a tool works, and they tell us which features to
build next.

If something did not work, email <neurodata.apify@gmail.com>
instead - bugs get fixed faster than they get complained about.

### Support

Questions, a bug, or a custom build? Email **neurodata.apify@gmail.com**.

# Actor input Schema

## `keywords` (type: `array`):

Search terms describing the Alibaba accounts you want (niche, job title, industry).

## `location` (type: `string`):

Optional location phrase added to every query (e.g. "New York").

## `customDomains` (type: `array`):

Only emails ending with one of these domains are collected. With or without the leading @. Each domain is searched separately, so more domains means more results but a longer run - remove some for a faster, narrower search, or add your own (e.g. @company.com).

## `maxEmails` (type: `integer`):

Stop once this many unique emails have been collected.

## `countryCode` (type: `string`):

Two-letter country code for the search proxy (e.g. US, GB, DE). Empty for any.

## `expandQueries` (type: `boolean`):

Search each keyword x domain pair with several phrasings. Recommended - Google caps a single query at ~300 results.

## `queryModifiers` (type: `array`):

Extra words combined with each keyword when Expand queries is on. Tuned for Alibaba.

## `maxPagesPerQuery` (type: `integer`):

Google rarely returns more than ~30 pages for one query.

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

How many queries run in parallel.

## Actor input object example

```json
{
  "keywords": [
    "manufacturer",
    "supplier"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "maxEmails": 20,
  "countryCode": "",
  "expandQueries": true,
  "queryModifiers": [
    "email",
    "contact",
    "export",
    "wholesale",
    "sales enquiries"
  ],
  "maxPagesPerQuery": 30,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `results` (type: `string`):

Records produced by Alibaba Email Scraper, stored in the run's default dataset.

# 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 = {
    "keywords": [
        "manufacturer",
        "supplier"
    ],
    "location": "",
    "customDomains": [
        "@gmail.com",
        "@yahoo.com"
    ],
    "countryCode": "",
    "queryModifiers": [
        "email",
        "contact",
        "export",
        "wholesale",
        "sales enquiries"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leads-scraper/alibaba-email-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 = {
    "keywords": [
        "manufacturer",
        "supplier",
    ],
    "location": "",
    "customDomains": [
        "@gmail.com",
        "@yahoo.com",
    ],
    "countryCode": "",
    "queryModifiers": [
        "email",
        "contact",
        "export",
        "wholesale",
        "sales enquiries",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("leads-scraper/alibaba-email-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 '{
  "keywords": [
    "manufacturer",
    "supplier"
  ],
  "location": "",
  "customDomains": [
    "@gmail.com",
    "@yahoo.com"
  ],
  "countryCode": "",
  "queryModifiers": [
    "email",
    "contact",
    "export",
    "wholesale",
    "sales enquiries"
  ]
}' |
apify call leads-scraper/alibaba-email-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,leads-scraper/alibaba-email-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/gguLHcGUfeWYwGHZ2/builds/XyEOqjUwtk0XK8SWV/openapi.json
