Skip to content

wfgsss/dhgate-scraper-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DHgate Products Scraper

License: MIT Apify Store Node.js

Scrape product data from DHgate.com — China's leading cross-border wholesale platform. Extract product names, prices, supplier info, feedback ratings, and more from search results.

Fast and lightweight — no browser needed. Pure HTTP requests with server-side rendered data extraction.

Features

  • 🔍 Keyword search with pagination support
  • 📦 60+ products per page, up to 50 pages per keyword
  • 📊 Rich data fields: product name, price range, min order, seller info, feedback rating, images
  • 🔄 Sort options: best match, price, orders, newest
  • 🌍 Ship-to country filter (affects pricing and availability)
  • No browser required — fast, low-cost execution
  • 🤖 Polite scraping with built-in delays and retry logic

Quick Start

Option 1: Run on Apify Platform

npx apify-cli run -p

Option 2: Run Locally

git clone https://github.com/wfgsss/dhgate-scraper-example.git
cd dhgate-scraper-example
npm install
echo '{"searchKeywords": ["phone case"], "maxPages": 1}' > storage/key_value_stores/default/INPUT.json
npm start

Results are saved to storage/datasets/default/.

Option 3: Use via Apify API

curl -X POST "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchKeywords": ["bluetooth earbuds", "led lights"],
    "maxPages": 3,
    "sortType": "orders_desc",
    "shipCountry": "us"
  }'

Input Parameters

Parameter Type Default Description
searchKeywords Array ["phone case"] Keywords to search
maxPages Integer 3 Max pages per keyword (~60 products/page)
sortType String "" Sort: price_asc, price_desc, orders_desc, newest
shipCountry String "us" Ship-to country code

Output Data

Each product includes:

Field Description
productName Product title
price Price range (e.g., "US $2.54 - 10.78")
simHighPrice Highest price in range
minOrder Minimum order quantity
productUrl Direct link to product page
imageUrl Product image URL
sellerName Seller/store name
sellerStoreUrl Link to seller's store
sellerLevel Seller tier level
feedbackPercent Positive feedback percentage
freeShipping Whether free shipping is available
isAd Whether the listing is sponsored
searchKeyword The keyword that found this product

Sample Output

{
    "itemcode": 1071872302,
    "productName": "Liquid Silicone Phone Case For iPhone 17 16 15 14 13 Pro Max",
    "price": "US $2.54 - 10.78",
    "simHighPrice": "10.78",
    "minOrder": "1 Piece",
    "productUrl": "https://www.dhgate.com/product/liquid-silicone-phone-case/1071872302.html",
    "imageUrl": "https://img4.dhresource.com/260x260/f3/albu/...",
    "sellerName": "bluetoothheadphone1",
    "feedbackPercent": "98.9%",
    "freeShipping": false,
    "isAd": false,
    "searchKeyword": "phone case"
}

Use Cases

  • Dropshipping research — Find trending products with competitive pricing
  • Price monitoring — Track wholesale prices across categories
  • Supplier discovery — Identify reliable sellers by feedback rating
  • Market analysis — Compare product availability and pricing trends
  • Competitor research — Monitor what's selling on DHgate

Cost Estimate

Very lightweight. A typical run searching 3 keywords × 3 pages ≈ ~540 products costs less than $0.01 in Apify platform usage.

Related Tools

  • Yiwugo Scraper — Scrape China's largest offline wholesale market (Yiwu)
  • Use both tools together to compare wholesale prices across platforms

Related Articles

License

MIT

Disclaimer

This tool is intended for legitimate business research purposes. Please respect DHgate's Terms of Service and use responsibly.

Releases

No releases published

Packages

 
 
 

Contributors