# DHgate Listings Scraper (`powerbox/dhgate-listings-scraper`) Actor

Scrape DHgate wholesale search listings — prices, MOQ, sellers, coupons, and links

- **URL**: https://apify.com/powerbox/dhgate-listings-scraper.md
- **Developed by:** [PowerBox](https://apify.com/powerbox) (community)
- **Categories:** Agents
- **Stats:** 2 total users, 1 monthly users, 33.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

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

## DHgate Listings Scraper

Turn DHgate wholesale search results into clean JSON. Capture each listing’s title, price, minimum order, seller feedback, coupons, free-shipping flag, images, and product / store links — useful for sourcing, price monitoring, and supplier research.

`Prices` · `MOQ` · `Sellers` · `Coupons` · `Shipping` · `Images` · `URLs`

### Features

- **Keywords or search URLs** — run one or more terms, or paste result-page URLs with sort/filters already applied
- **Pagination** — walk `/w/keyword/N.html` (or `pageNum`) until your product or page limit
- **Deduplication** — the same `itemCode` across pages and overlapping searches is stored once
- **Seller signals** — feedback percent, review count, recently sold text, store name and store URL
- **Coupons & shipping** — seller coupon strings and a free-shipping flag when shown on the card

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `search_keywords` | array | — | Search terms |
| `searchUrls` | array | — | DHgate search result URLs (`/w/*.html`, wholesale search, refine URLs) |
| `limitType` | string | `maxItems` | Cap by product count or page count (per source) |
| `maxItems` | integer | `100` | Products per keyword / URL (`0` = unlimited within page hard cap) |
| `maxPages` | integer | `3` | Pages per keyword / URL (~40 products per page) |
| `proxyConfiguration` | object | Apify Proxy on | Optional proxy settings |

Provide at least one of `search_keywords` or `searchUrls`.

#### Example

```json
{
  "search_keywords": ["phone case"],
  "searchUrls": [
    "https://www.dhgate.com/w/sneakers.html?sinfo=price&stype=up"
  ],
  "limitType": "maxItems",
  "maxItems": 80
}
```

#### Supported URL forms

- `/w/<keyword>.html` and `/w/<keyword>/<page>.html` (optional `pageNum` query)
- `/wholesale/search.do?act=search&searchkey=...`
- Category-filtered wholesale searches (`/wholesale/.../s.html`, `/wholesale-refine/...`)

Tracking parameters (`dspm`, `resource_id`, `utm_*`) are ignored. Product-detail, store, and category-hub pages are skipped.

### Output

One Dataset item per product, including:

- Identity: `itemCode`, `productId`, `productName`, `alt`
- Pricing / MOQ: `price` (display text, including ranges), `minOrder`
- Seller: `domainName`, `sellerStoreUrl`, `feedbackPercent`, `reviewCount`, `recentlySold`
- Offers: `freeShipping`, `coupons`, `sevenReturn`, `afterSale`
- Links: `imageUrl`, `productDetailUrl`, `scrapedAt`

`price` is the text DHgate shows (e.g. `US $39.20 - 41.06`). Prefixed image URLs starting with `//` are normalized to `https:`.

### Tips

- Start with `maxItems: 40` (about one page) before a large run
- Keep sort/filter params in your Search URLs (`sinfo`, `stype`, `freeshipping`, `minprice`, `maxprice`)
- Prefer residential proxies for reliable production runs
- Product and store pages are not accepted — use search result pages only

### Pricing

Pay-per-event: low run-start fee plus about **$1.00 per 1,000 product results**.

# Actor input Schema

## `search_keywords` (type: `array`):

One or more product keywords. Each keyword is scraped independently with pagination; results are merged and deduplicated. Required unless you supply Search URLs.

## `searchUrls` (type: `array`):

Optional DHgate search result URLs (plain strings). Accepts /w/\*.html (optional /N.html or pageNum), /wholesale/search.do?searchkey=..., or category-filtered wholesale searches. Sort and filter query params are kept. Leave empty when using Search keywords only. Product, store, and category hub pages are skipped.

## `limitType` (type: `string`):

Which cap applies per keyword / per Search URL. The other limit field is ignored.

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

Used when Limit by = Product count. Products per keyword / per Search URL. Set 0 for no product cap (still bounded by a 100-page hard limit).

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

Used when Limit by = Page count. Result pages per keyword / per Search URL (~40 products per page).

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

Optional pause between page requests.

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

Optional Apify Proxy settings. Residential proxies recommended for production.

## Actor input object example

```json
{
  "search_keywords": [
    "sneakers"
  ],
  "limitType": "maxItems",
  "maxItems": 100,
  "maxPages": 3,
  "requestDelayMs": 250,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "search_keywords": [
        "sneakers"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerbox/dhgate-listings-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 = { "search_keywords": ["sneakers"] }

# Run the Actor and wait for it to finish
run = client.actor("powerbox/dhgate-listings-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 '{
  "search_keywords": [
    "sneakers"
  ]
}' |
apify call powerbox/dhgate-listings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerbox/dhgate-listings-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/ItvEi7vnFN9m0gRvH/builds/uOwuVDrpV0gsZIf43/openapi.json
