# DHgate 爬蟲｜跨境批發商品、價格、MOQ、供應商一鍵匯出（免 API） (`claude_code_reviewer/dhgate-scraper`) Actor

免登入抓 DHgate 商品：關鍵字搜尋列表，含批發價格區間、最低起訂量 MOQ、近期銷量、評分、賣家好評率與供應商，輸出 JSON／CSV／Excel。跨境批發選品、比價、供應商情報必備。

- **URL**: https://apify.com/claude\_code\_reviewer/dhgate-scraper.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** SEO tools, Lead generation, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 搜尋商品

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/platform/actors/running/actors-in-store#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

## DHgate 爬蟲｜跨境批發商品、價格、MOQ、供應商一鍵下載（免 API）

抓 **DHgate** 搜尋結果：標題、批發價格區間、**最低起訂量（MOQ）**、近期銷量、評分、賣家好評率、供應商與圖片。走網頁內嵌 JSON，**不用登入、不用 API key、不用 token**。批量貼上關鍵字，輸出乾淨的 snake\_case 結構化資料（JSON / CSV / Excel）。

適合：跨境批發選品、比價、供應商情報、Dropshipping 找貨、競品監控。

***

### 輸出欄位

| 欄位 | 說明 |
|---|---|
| `item_code` | 商品編號，主鍵 |
| `product_id` | 商品 ID |
| `title` | 商品標題 |
| `url` | 商品連結 |
| `image` | 商品圖片 |
| `price_show` | 批發價格區間顯示，如 `US $18.33 - 27.31`（階梯報價）|
| `price_min` | 區間最低價（數值）|
| `price_max` | 區間最高價（數值）|
| `original_price_show` | 折扣前價格顯示 |
| `price_discount` | 折扣係數（0.95 = 打 95 折）|
| `min_order` | 最低起訂量顯示，如 `1 Piece` |
| `min_order_num` | 最低起訂數量（數值）|
| `recently_sold` | 近期銷量 |
| `review_count` | 評論數 |
| `rating` | 評分（0–5）|
| `feedback_percent` | 賣家好評率，如 `98.5%` |
| `free_shipping` | 是否免運 |
| `is_ad` | 是否廣告 |
| `supplier_id` | 供應商 ID |
| `seller_store_url` | 賣家店鋪連結 |
| `keyword` | 對應的搜尋關鍵字 |
| `scraped_at` | 抓取時間（ISO 8601）|

> 缺值一律補 `null`，欄位不省略。價格為階梯批發區間，以實際頁面為準。

### 模式

| 模式 | 說明 | 狀態 |
|---|---|---|
| `search`（搜尋） | 關鍵字 → 商品列表 | ✅ v1.0 |
| `detail`（詳情） | 商品 → 完整規格、階梯報價、運費、供應商 | 🔜 v1.1 |

### 輸入參數

| 參數 | 型別 | 說明 | 預設 |
|---|---|---|---|
| `keywords` | 陣列 | 搜尋關鍵字（至少一個）| — |
| `bulkInput` | 文字 | 一行一個關鍵字，自動併入 | — |
| `maxItems` | 整數 | **每個關鍵字**上限（1–500）| `50` |
| `proxyConfiguration` | Proxy | 預設不用 proxy；被擋時再開 | 關閉 |

### 輸入範例

**1. 無線耳機（前 10 筆）**

```json
{ "keywords": ["wireless earbuds"], "maxItems": 10 }
```

**2. 迷你投影機**

```json
{ "keywords": ["mini projector"], "maxItems": 15 }
```

**3. 批量多關鍵字**

```json
{ "bulkInput": "phone case\nsmart watch\nled strip", "maxItems": 10 }
```

### 注意事項

- **價格是階梯批發區間**：DHgate 是 B2B 批發，價格常為「量越多越便宜」的區間；`price_show` 保留原字串，`price_min`／`price_max` 為解析出的數值。
- **MOQ 是關鍵**：`min_order`／`min_order_num` 是最低起訂量，批發選品必看。
- **`maxItems` 是每個關鍵字**：3 個關鍵字 × 50 = 最多 150 筆。同一商品在兩個關鍵字都出現時只輸出一次。
- **銷量／評分是快照**：以實際 DHgate 頁面為準。

### FAQ

**Q：需要 DHgate 帳號或 API key 嗎？**
不用。只抓公開搜尋結果，無需登入或 token。

**Q：抓得到最低起訂量（MOQ）嗎？**
可以，`min_order`／`min_order_num` 就是 MOQ，這是 DHgate B2B 選品的核心欄位。

**Q：價格為什麼是區間？**
DHgate 是批發平台，多數商品按數量階梯定價，所以是區間（`price_min` 到 `price_max`）。

**Q：怎麼計費？**
分項計費（PPE）：啟動一次 $0.005 + 商品每筆 $0.002。只有成功寫入資料後才計費。

### 免責聲明

本工具僅抓取 DHgate 公開可見的商品資訊，供跨境批發選品與市場研究之用。使用者應遵守 DHgate 服務條款及當地法律，自行負責資料的使用方式。本工具不蒐集任何需登入才能存取的私人資料。商品內容與價格以網站實際顯示為準。

***

*關鍵字：DHgate 爬蟲、DHgate scraper、跨境批發、wholesale、B2B 選品、MOQ、供應商情報、Dropshipping、跨境電商、product data、price scraper、DHgate API、批發比價*

# Actor input Schema

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

v1.0 為搜尋列表模式。商品詳情（完整規格、階梯報價、運費、供應商）規劃於 v1.1。

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

搜尋關鍵字，例如：wireless earbuds、smart watch、phone case。一個概念一個關鍵字最準。

## `bulkInput` (type: `string`):

**一行一個關鍵字**，按 Enter 換行，不要加引號或逗號。執行時自動併入上面的關鍵字欄位。

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

**每個關鍵字**最多抓幾筆。N 個關鍵字最多 N×此數。越多費用越高。

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

DHgate 搜尋頁對 datacenter 請求友善，預設不用 proxy 即可運作。大量抓取遇到 Cloudflare 擋時才建議開 residential。

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "wireless earbuds"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "mode": "search",
    "keywords": [
        "wireless earbuds"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/dhgate-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": ["wireless earbuds"],
}

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/dhgate-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "wireless earbuds"
  ]
}' |
apify call claude_code_reviewer/dhgate-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=claude_code_reviewer/dhgate-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zZaNc5naYfhgjP53p/builds/5rJeyQirjQUcaoGLD/openapi.json
