# 1688 Wholesale, Factory & Image Search Scraper (BYOK) (`flowery_bluebird_jay/cn-1688-wholesale-supplier-scraper`) Actor

Extract 1688.com wholesale products, CNY/USD prices, MOQ, factories, and reverse image search via your own JustOneAPI key (BYOK). Zero captchas, 512MB pure HTTP, clean analytics JSON/CSV/Excel & MCP ready.

- **URL**: https://apify.com/flowery_bluebird_jay/cn-1688-wholesale-supplier-scraper.md
- **Developed by:** [方圆 方](https://apify.com/flowery_bluebird_jay) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 1688 product or factory record extracteds

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?

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

## 1688 Wholesale, Supplier & Image Search Scraper

Find wholesale offers, compare minimum order quantities, inspect supplier fields and match product images on 1688. This Actor uses your own JustOneAPI token (BYOK) and makes pure HTTP requests; no browser is launched. The recommended/default memory is **512 MB**. It is useful for sourcing research and supplier shortlists; factory flags and product claims are provider data, not independent supplier verification.

Local release status: **`ppe_active_ready_to_publish`**. The configured identity is `flowery_bluebird_jay/cn-1688-wholesale-supplier-scraper`. This local package has not established publication or a successful live provider run. API examples below require that Actor to be published and accessible to your Apify account.

### Two-minute setup

1. Register at [JustOneAPI](https://justoneapi.com), open its dashboard and copy an active token with access to the 1688 endpoints. Check current provider pricing, quota and balance; top up when required. A free provider allowance is **not promised**. Registration, approval or funding can take longer than two minutes.
2. Paste the token into the secret input **`justOneApiToken`**, or provide `JUSTONEAPI_TOKEN` in a local environment. Your Apify token is a different credential.
3. Select `search`, enter one keyword, set `maxResults` to `3`, keep enrichment off and run at 512 MB. Review the dataset and provider usage before increasing the limit. Existing funded accounts can usually fill these fields in about two minutes; execution time depends on the provider.
4. Export the default dataset as JSON, CSV or Excel from Apify. Empty valid results produce no rows. Account or malformed-response errors fail the run with a short setup message.

### Inputs and modes

Every array contains strings, including numeric IDs. All input keys remain compatible with the local input schema.

| Key | Type / default | Meaning |
|---|---|---|
| `justOneApiToken` | secret string, required | Your own active, funded JustOneAPI token. Local fallback: `JUSTONEAPI_TOKEN`. |
| `mode` | string, `search` | `search`, `image_search`, `detail`, `factory_search`. |
| `keywords` | string array; omitted: `["蓝牙耳机"]` | Search/factory queries. Explicit `[]` makes no queries. |
| `imageUrls` | string array, `[]` | Public HTTPS image URLs for `image_search`; no redirects are resolved locally. |
| `offerIds` | string array, `[]` | 8–16 digit IDs or HTTP(S) 1688 offer URLs for `detail`. |
| `sortBy` | string, `default` | `default`, `sales`, `price_asc`, `price_desc`. |
| `maxResults` | integer, `20` | 1–500 per keyword/image. At most 25 pages, stopping on an empty or repeated page. |
| `moq` | optional positive integer | Provider filter for the maximum minimum order quantity. Omit for no MOQ filter. |
| `priceStart` / `priceEnd` | decimal strings, `""` | Optional inclusive CNY bounds; start must not exceed end. |
| `includeDetailEnrichment` | boolean, `false` | Enrich `search` results with offer details; adds `detail-enriched` events for non-empty saved details. |
| `includeReviews` | boolean, `false` | Attach the first review page in `detail` mode; provider usage still applies. |
| `language` | string, `zh` | `zh` or `en` detail preference; provider translation coverage varies. |
| `cnyToUsdRate` | positive finite number, `0.138` | User-supplied CNY→USD estimate; not a live FX rate. |

For `image_search`, provide `imageUrls`; for `detail`, provide `offerIds`; for `search`/`factory_search`, provide `keywords` (the omitted keyword default above applies). An explicitly empty relevant array exits without queries or result fees. Unsupported modes, wrong types, invalid IDs/URLs, invalid prices and out-of-range limits fail before any provider request. Short/share links are not followed; use the final product URL or ID. Image matching and factory availability depend on your provider access.

Complete copyable search input (replace the token):

```json
{
  "justOneApiToken": "YOUR_JUSTONEAPI_TOKEN",
  "mode": "search",
  "keywords": ["phone case"],
  "imageUrls": [],
  "offerIds": [],
  "sortBy": "default",
  "maxResults": 3,
  "moq": 100,
  "priceStart": "1",
  "priceEnd": "50",
  "includeDetailEnrichment": false,
  "includeReviews": false,
  "language": "zh",
  "cnyToUsdRate": 0.138
}
```

Other mode fixtures:

```json
{"justOneApiToken":"YOUR_JUSTONEAPI_TOKEN","mode":"image_search","imageUrls":["https://example.com/product.jpg"],"maxResults":3}
```

```json
{"justOneApiToken":"YOUR_JUSTONEAPI_TOKEN","mode":"detail","offerIds":["https://detail.1688.com/offer/738184770922.html"],"includeReviews":true,"language":"en"}
```

```json
{"justOneApiToken":"YOUR_JUSTONEAPI_TOKEN","mode":"factory_search","keywords":["phone case factory"],"maxResults":3}
```

The example image URL is a placeholder; replace it with an actual publicly accessible product photo. Example IDs are illustrative and are not a promise of current availability.

### Output fixture

This synthetic fixture shows every standard output key. `record_type` is `product`, `image_match`, `factory` or `product_detail`. Fields unavailable from the provider remain empty/null. `raw_fields` preserves provider fields with credential-like fields redacted. Times use UTC.

```json
{
  "status": "ok",
  "record_type": "product",
  "source_query": "phone case",
  "offer_id": "738184770922",
  "title": "Phone case",
  "price_cny": 18.5,
  "price_usd_est": 2.55,
  "moq": 10,
  "sales_text": "1000+",
  "repurchase_rate": "20%",
  "supplier_name": "Example supplier",
  "supplier_member_id": "example-member",
  "province_city": "Guangdong / Shenzhen",
  "is_factory": false,
  "image_url": "https://example.com/product.jpg",
  "url": "https://detail.1688.com/offer/738184770922.html",
  "raw_fields": {"offerId":"738184770922","subject":"Phone case","price":"18.50","minOrderQuantity":10},
  "scraped_at": "2026-11-27T00:00:00+00:00"
}
```

When requested and returned, enrichment adds `"detail": {"offerId":"738184770922","subject":"Phone case","skuList":[]}` to a search row. Detail-mode reviews add `"reviews": [{"feedback":"Illustrative buyer review"}]`. These optional values are provider-native objects, so SKU/review fields vary. Empty detail objects produce no record. Error-shaped responses produce no error row or result event; the Actor fails instead. Earlier saved rows can remain if a later request fails.

The Actor output schema's `results` property links to the default dataset items endpoint. Nested `detail`, `reviews` and `raw_fields` are easiest to consume as JSON; CSV/Excel export may need flattening for your downstream workflow.

### Transparent pricing

**Two independent bills:** Apify PPE is the Actor orchestration fee; JustOneAPI charges your own provider account separately according to its current endpoint pricing and usage. You must maintain both accounts. More keywords, pagination, details and reviews increase provider requests. Transient retries can also consume provider usage. There is no provider credit or free data included in these prices.

The exact local PPE plan is `.actor/pay_per_event_plan.json`:

| Exact event | 1 event (USD) | 100 events (USD) | 1,000 events (USD) |
|---|---:|---:|---:|
| `apify-actor-start` | 0.002 | 0.20 | 2.00 |
| `item-scraped` | 0.0015 | 0.15 | 1.50 |
| `detail-enriched` | 0.0025 | 0.25 | 2.50 |

`apify-actor-start` is platform built-in and is not manually charged by the code. `item-scraped` applies once per saved search/image/factory row. A search row with non-empty details adds one `detail-enriched`; a direct detail row uses only `detail-enriched`. Attached 1688 reviews have no separate Actor review event. For example, one run saving 100 basic product rows has a local PPE estimate of **$0.152**, plus provider usage. Empty results have no result events; platform start billing may still apply. Confirm the published Actor's pricing before running because local readiness does not verify remote billing.

### Four integrations

#### 1. Python (`apify-client`)

Install `apify-client` in your own integration environment. Set `APIFY_TOKEN` and `JUSTONEAPI_TOKEN` as environment secrets, then run:

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("flowery_bluebird_jay/cn-1688-wholesale-supplier-scraper").call(
    run_input={
        "justOneApiToken": os.environ["JUSTONEAPI_TOKEN"],
        "mode": "search",
        "keywords": ["phone case"],
        "maxResults": 3,
        "includeDetailEnrichment": False,
    }
)
if run["status"] != "SUCCEEDED":
    raise RuntimeError(f"Actor finished with status {run['status']}; check its status message")
rows = client.dataset(run["defaultDatasetId"]).list_items().items
print(rows)
```

#### 2. Node.js (`apify-client`)

Install `apify-client`; save this as an `.mjs` script. Use your secret environment variables:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('flowery_bluebird_jay/cn-1688-wholesale-supplier-scraper').call({
  justOneApiToken: process.env.JUSTONEAPI_TOKEN,
  mode: 'search',
  keywords: ['phone case'],
  maxResults: 3,
  includeDetailEnrichment: false,
});
if (run.status !== 'SUCCEEDED') throw new Error(`Actor status: ${run.status}; check its status message`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### 3. n8n / Make (HTTP)

1. Add an HTTP Request node/module. Method `POST`; URL `https://api.apify.com/v2/acts/flowery_bluebird_jay~cn-1688-wholesale-supplier-scraper/runs`. Set headers `Authorization: Bearer YOUR_APIFY_TOKEN` and `Content-Type: application/json`. Store both tokens in your workflow's credential store; do not log the request body.
2. Use this JSON body, mapping the provider token from your secret store:

```json
{"justOneApiToken":"YOUR_JUSTONEAPI_TOKEN","mode":"search","keywords":["phone case"],"maxResults":3,"includeDetailEnrichment":false}
```

3. Save `data.id` from the response. Poll `GET https://api.apify.com/v2/actor-runs/RUN_ID` using the same authorization header until `data.status` is terminal. Continue only on `SUCCEEDED`; route `FAILED`, `ABORTED` or `TIMED-OUT` to an error step showing `data.statusMessage`.
4. Read `data.defaultDatasetId`, then `GET https://api.apify.com/v2/datasets/DATASET_ID/items?format=json&clean=true`. Map the resulting array to Sheets, your sourcing database or an alert. Add a polling limit in the workflow.

#### 4. Claude Desktop / Cursor (local MCP)

Use the accompanying local `apify_cn_mcp_server` package. Replace `/ABSOLUTE/PATH` with its real parent directory; Node must be available on your PATH. Add this JSON to your client's MCP configuration and restart the client:

```json
{
  "mcpServers": {
    "china-data": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/apify_cn_mcp_server/src/server.mjs"],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_TOKEN",
        "JUSTONEAPI_TOKEN": "YOUR_JUSTONEAPI_TOKEN"
      }
    }
  }
}
```

Call **`cn_1688_wholesale_search`** with arguments `{"keywords":["phone case"],"maxResults":3}`. The server fills `justOneApiToken` from `JUSTONEAPI_TOKEN`; keep credentials out of chat. The local server must be installed separately and the configured Actor must be published/accessibly deployed before remote calls can succeed.

### Reliability and FAQ

**Why do I need two tokens?** `APIFY_TOKEN` authorizes your integration to run Actors; `justOneApiToken` authorizes provider data requests. They are not interchangeable.

**Invalid/expired token, HTTP 401/403, quota or insufficient balance?** Register at JustOneAPI if needed, paste an active provider token into `justOneApiToken`, check endpoint access and your dashboard, top up the balance, then rerun. These account errors fail the Actor clearly and are not retried or emitted as successful result rows. Provider messages and token values are not printed.

**What is retried?** At most three attempts per operation, with 1-second then 2-second waits, only for HTTP/provider 429, 5xx or transport timeouts. Other 4xx, business errors, malformed/empty JSON and wrong nested shapes fail immediately. HTTP transport timeout is 30 seconds per request phase. No retry uses an overlapping worker thread.

**Can the dataset be empty?** Yes. Valid empty lists, empty detail objects, empty input arrays or exhausted pages return zero rows and zero result fees. A later failure can leave earlier persisted rows and fees; check the existing run before repeating work.

**Are prices, stock, factories and English fields guaranteed?** No. Coverage and freshness depend on JustOneAPI and 1688. `is_factory` includes provider flags (and the factory-search classification), not an audit. `price_usd_est` uses your rate and excludes shipping, tax, exchange fees and volume-tier interpretation.

**Can I use a browser session or cookies?** No cookies are requested. The Actor delegates HTTP data access to your provider account; this does not guarantee every product or endpoint will be available.

Every returned page is checked before saving: product rows require a numeric ID and non-empty title (detail can use the requested ID); factory rows require a supplier/company name; review rows require non-empty `feedback` or `rateContent` text. A mixed valid/invalid page fails clearly before any rows from that response are saved or charged. Image-only or empty automatic reviews are rejected.

### Local verification

No dependencies, network or paid API are needed for the regression tests:

```sh
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v
```

The suite mocks external boundaries; it does not prove container execution, live endpoint access, publication or remote billing. See `AUDIT.md` for the observed local verification and remaining acceptance work.

# Actor input Schema

## `justOneApiToken` (type: `string`):

Register at https://justoneapi.com, copy an active token and paste it here. Check endpoint access and top up your balance in the provider dashboard before rerunning. Provider fees are separate from Apify PPE fees.

## `mode` (type: `string`):

Choose keyword search, image search, offer details or factory search. Empty input arrays return no records.

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

Array of Chinese or English keywords for search or factory_search. Each query has its own result limit. An empty array makes no queries.

## `imageUrls` (type: `array`):

Array of public HTTPS image URLs for image_search. Image matching availability depends on the provider.

## `offerIds` (type: `array`):

Array of 8-16 digit offer ID strings or HTTP(S) 1688 offer URLs for detail mode. Short redirect links are not resolved.

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

Choose the provider search sort preference: default, sales, price_asc or price_desc.

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

Integer from 1 to 500. Applies separately to each keyword or image; pagination stops at 25 pages, an empty page or a repeated page.

## `moq` (type: `integer`):

Optional positive integer. Ask the provider to return offers whose minimum order quantity is at or below this value.

## `priceStart` (type: `string`):

Optional non-negative decimal price string. Leave empty for no lower bound; must not exceed priceEnd.

## `priceEnd` (type: `string`):

Optional non-negative decimal price string. Leave empty for no upper bound; must not be less than priceStart.

## `includeDetailEnrichment` (type: `boolean`):

In search mode, request offer details for each result with an offer ID. Each non-empty saved detail adds a detail-enriched PPE event and provider usage.

## `includeReviews` (type: `boolean`):

In detail mode, attach the first provider review page to each offer. Reviews have no additional Actor PPE event but consume provider usage.

## `language` (type: `string`):

Choose zh or en for provider detail requests. Translation completeness depends on the provider response.

## `cnyToUsdRate` (type: `number`):

Finite positive multiplier for price_usd_est, rounded to two decimals. This is your supplied estimate, not a live exchange rate.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "蓝牙耳机",
    "phone case"
  ],
  "imageUrls": [],
  "offerIds": [],
  "sortBy": "default",
  "maxResults": 20,
  "moq": 1,
  "priceStart": "",
  "priceEnd": "",
  "includeDetailEnrichment": false,
  "includeReviews": false,
  "language": "zh",
  "cnyToUsdRate": 0.138
}
```

# Actor output Schema

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

Default dataset containing all extracted 1688 wholesale products and factories.

# 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 = {
    "mode": "search",
    "keywords": [
        "蓝牙耳机",
        "phone case"
    ],
    "imageUrls": [],
    "offerIds": [],
    "sortBy": "default",
    "maxResults": 20,
    "moq": 1,
    "priceStart": "",
    "priceEnd": "",
    "includeDetailEnrichment": false,
    "includeReviews": false,
    "language": "zh",
    "cnyToUsdRate": 0.138
};

// Run the Actor and wait for it to finish
const run = await client.actor("flowery_bluebird_jay/cn-1688-wholesale-supplier-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 = {
    "mode": "search",
    "keywords": [
        "蓝牙耳机",
        "phone case",
    ],
    "imageUrls": [],
    "offerIds": [],
    "sortBy": "default",
    "maxResults": 20,
    "moq": 1,
    "priceStart": "",
    "priceEnd": "",
    "includeDetailEnrichment": False,
    "includeReviews": False,
    "language": "zh",
    "cnyToUsdRate": 0.138,
}

# Run the Actor and wait for it to finish
run = client.actor("flowery_bluebird_jay/cn-1688-wholesale-supplier-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 '{
  "mode": "search",
  "keywords": [
    "蓝牙耳机",
    "phone case"
  ],
  "imageUrls": [],
  "offerIds": [],
  "sortBy": "default",
  "maxResults": 20,
  "moq": 1,
  "priceStart": "",
  "priceEnd": "",
  "includeDetailEnrichment": false,
  "includeReviews": false,
  "language": "zh",
  "cnyToUsdRate": 0.138
}' |
apify call flowery_bluebird_jay/cn-1688-wholesale-supplier-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,flowery_bluebird_jay/cn-1688-wholesale-supplier-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/XbqKw8Ctkb46tqc6r/builds/Eun45hrOCRTUFOaTf/openapi.json
