# AI Alibaba Sourcing Agent — Ranked Price Comparison & CSV (`rumi7911/sourcing-agent`) Actor

Give it a product and get back a ranked sourcing sheet of real Alibaba listings — unit price normalized to your target order size, MOQ and seller verification called out where available, best no-MOQ test-order option flagged, plus a downloadable CSV.

- **URL**: https://apify.com/rumi7911/sourcing-agent.md
- **Developed by:** [Muhammad Sohaib Roomi](https://apify.com/rumi7911) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $250.00 / 1,000 sourcing report generateds

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?

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

## AI Alibaba Sourcing Agent — Ranked Price Comparison & CSV

Give it a product and get back a ranked sourcing sheet of real Alibaba listings — unit price normalized to your target order size, MOQ and seller verification called out where available, and the best no-MOQ option flagged for a test order. Includes a downloadable CSV.

### How it works

This Actor orchestrates Apify's own [E-commerce Scraping Tool](https://apify.com/apify/e-commerce-scraping-tool) — a production scraper with residential proxies and full browser rendering — against Alibaba, then uses Gemini to read the real scraped listings and build a normalized, ranked comparison. You get the sourcing analysis; the hard scraping problem is handled by Apify's own battle-tested infrastructure.

**Why Alibaba only**: we directly tested AliExpress, JD.com, Shein, and Temu as additional sources and dropped all four. JD.com, Shein, and Temu got blocked at the very first step (couldn't even load a search page) even through Apify's own residential-proxy + browser-rendering infrastructure. AliExpress's search step worked, but its per-product detail-page follow-up timed out completely with zero results in repeated testing, including with an extended 8-minute timeout. Rather than advertise sources that reliably return nothing, this Actor sticks to the one that actually and consistently works. More sources will be added if and when they're verified to work.

**Important on cost**: the underlying Alibaba scraping (browser rendering, residential proxy, product listing events) is billed by `apify/e-commerce-scraping-tool` **directly to your own Apify account**, in addition to this Actor's own price below. Use `maxListingsPerMarketplace` to control that cost.

### Tutorial: how to run it

1. Click **Try for free** (or **Start**) on this page.
2. Fill in `product` — or leave the prefilled carry-on-duffel-bag example to see it work immediately.
3. Set `targetUnits` to your real order size so unit prices are normalized correctly.
4. Click **Start** and open the **Output** tab once the run finishes.
5. Read `rankedOffers` (cheapest first) and `bestNoMoqOption`, or download the `sourcing-sheet.csv` from the key-value store.

### Common questions, answered directly

#### How do I compare Alibaba supplier prices for a product?

Give it a product description — it scrapes real Alibaba listings and returns them ranked cheapest-first, normalized to your actual order size.

#### Is there a tool to find the cheapest Alibaba listing normalized to my order size?

Yes — that's the `unitPriceAtTargetUnits` field: every offer is converted to a per-unit price at the quantity you actually plan to order, not the seller's default price break.

#### How do I find a no-MOQ Alibaba supplier for a test order?

The `bestNoMoqOption` field flags the cheapest listing with no minimum order quantity, so you can validate a product before committing to a bulk order.

### What you can use this for

- **Product sourcing / dropshipping** — find and rank real Alibaba suppliers for a product spec, normalized to your actual order size, instead of eyeballing raw listings.
- **Price benchmarking** — see the going rate for a product category before negotiating with a supplier.
- **Test-order planning** — quickly find a no-MOQ option to validate a product before committing to a bulk order.

### Input

| Field | Description | Default |
|---|---|---|
| `product` | The product to source | `carry-on duffel travel bag` |
| `targetUnits` | Order size to normalize unit prices to | `100` |
| `marketplaces` | Which marketplaces to check (currently `alibaba` only) | `alibaba` |
| `maxListingsPerMarketplace` | Cap on listings scraped (controls sub-actor cost) | `20` |
| `model` | Gemini model | `gemini-3.8-flash` |
| `apiKey` | Your own Gemini API key (optional — leave blank to use the Actor's key) | — |

### Output

```json
{
  "product": "carry-on duffel travel bag",
  "targetUnits": 100,
  "listingsScraped": 5,
  "rankedOffers": [
    { "marketplace": "alibaba", "title": "...", "unitPriceAtTargetUnits": 3.45, "currency": "GBP", "moq": null, "sellerVerification": null, "matchConfidence": "exact", "url": "https://..." }
  ],
  "bestNoMoqOption": null,
  "summary": "...",
  "model": "gemini-3.8-flash",
  "verifiedAt": "2026-09-20T12:00:00.000Z"
}
```

A `sourcing-sheet.csv` is also written to the run's key-value store, ready to download.

### Pricing

Pay-per-event: **$0.25 per sourcing run**. This covers the orchestration and AI analysis only — the underlying Alibaba scraping bills separately to your own Apify account via `apify/e-commerce-scraping-tool`.

### Actor recommendations

- 🛒 [Online Store Scam Checker](https://apify.com/rumi7911/ecommerce-scam-checker) — screen a supplier's own storefront for scam risk before you order.
- 🔎 [Grounded Research API](https://apify.com/rumi7911/grounded-research-api) — the general-purpose version of this Actor's research pipeline, for any cited fact lookup with a schema you define.
- 🏢 [Company & Person Verification API](https://apify.com/rumi7911/entity-verifier) — a due-diligence check on a supplier before committing to a bulk order.

# Actor input Schema

## `product` (type: `string`):

Describe the product you want to source, as specifically as you can (include the spec you care about).

## `targetUnits` (type: `integer`):

Offers are normalized to unit price at this quantity.

## `marketplaces` (type: `array`):

Which marketplaces to search. Currently Alibaba only -- AliExpress, JD.com, Shein, and Temu were tested and dropped because their scraping reliably failed even through Apify's own anti-bot infrastructure. More sources may be added as they're verified to work.

## `maxListingsPerMarketplace` (type: `integer`):

Caps how many products are scraped per marketplace, and keeps the AI synthesis step fast and affordable. Each listing scraped is billed by the underlying e-commerce-scraping-tool actor directly to your Apify account.

## `model` (type: `string`):

Which Gemini model to use for the sourcing analysis.

## `apiKey` (type: `string`):

Leave blank to use the Actor's own configured key.

## Actor input object example

```json
{
  "product": "carry-on duffel travel bag",
  "targetUnits": 100,
  "marketplaces": [
    "alibaba"
  ],
  "maxListingsPerMarketplace": 20,
  "model": "gemini-3.8-flash"
}
```

# Actor output Schema

## `sourcingSheet` (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("rumi7911/sourcing-agent").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("rumi7911/sourcing-agent").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 rumi7911/sourcing-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rumi7911/sourcing-agent"
        }
    }
}
```

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/v4iN1UywHeHLV7KoF/builds/9I3HkmFgdjoUh8uh7/openapi.json
