Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Yiwugo Scraper Example

CI License: MIT Apify Store Node.js

Example code and scripts for the Yiwugo.com Scraper on Apify — extract product data from China's largest B2B wholesale marketplace.

What is Yiwugo.com?

Yiwugo.com (义乌购) is China's largest B2B wholesale marketplace, featuring millions of products from Yiwu — the world's largest small commodity market. This scraper extracts product data including prices, suppliers, specifications, and images.

Quick Start

Option 1: No Code (Apify Console)

  1. Go to Yiwugo Scraper on Apify Store
  2. Click "Try for free"
  3. Enter a search URL or product URL
  4. Hit Start → download results as JSON/CSV/Excel

Option 2: JavaScript

const { ApifyClient } = require('apify-client');
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor("jungle_intertwining/yiwugo-scraper").call({
 startUrls: [{ url: "https://www.yiwugo.com/search/p-1.html?keywords=backpack" }],
 maxItems: 50,
 proxyConfiguration: { useApifyProxy: true },
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} products`);

Option 3: Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("jungle_intertwining/yiwugo-scraper").call(run_input={
 "startUrls": [{"url": "https://www.yiwugo.com/search/p-1.html?keywords=backpack"}],
 "maxItems": 50,
 "proxyConfiguration": {"useApifyProxy": True},
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
 print(f"{item['title']} - {item['price']}")

Sample Output

Each product is returned as a structured JSON object:

×ばつ45cm", "Weight": "0.6kg", "Color": "Black, Navy, Grey" }, "url": "https://www.yiwugo.com/offer/123456.html", "scrapedAt": "2026-02-12T10:30:00.000Z" }">
{
 "title": "2026新款时尚双肩包 大容量旅行背包",
 "price": "25円.00 - 38円.00",
 "minOrder": "100 pieces",
 "supplier": "义乌市锦程箱包有限公司",
 "location": "Yiwu, Zhejiang",
 "category": "Bags & Luggage > Backpacks",
 "images": [
 "https://img.yiwugo.com/img/product/2026/01/backpack-001.jpg",
 "https://img.yiwugo.com/img/product/2026/01/backpack-002.jpg"
 ],
 "specifications": {
 "Material": "Oxford cloth",
 "Size": "×ばつ45cm",
 "Weight": "0.6kg",
 "Color": "Black, Navy, Grey"
 },
 "url": "https://www.yiwugo.com/offer/123456.html",
 "scrapedAt": "2026年02月12日T10:30:00.000Z"
}

Input Examples

Search by keyword:

{
 "startUrls": [{ "url": "https://www.yiwugo.com/search/p-1.html?keywords=led+lights" }],
 "maxItems": 100
}

Scrape a specific product:

{
 "startUrls": [{ "url": "https://www.yiwugo.com/offer/123456.html" }]
}

Browse a category:

{
 "startUrls": [{ "url": "https://www.yiwugo.com/category/bags/" }],
 "maxItems": 200
}

Use Cases

Price Monitoring

Track wholesale price changes over time. Run on a schedule and compare snapshots:

const { ApifyClient } = require('apify-client');
const fs = require('fs');
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
async function monitorPrices() {
 const run = await client.actor("jungle_intertwining/yiwugo-scraper").call({
 startUrls: [{ url: "https://www.yiwugo.com/search/p-1.html?keywords=led+lights" }],
 maxItems: 200,
 proxyConfiguration: { useApifyProxy: true },
 });
 const { items } = await client.dataset(run.defaultDatasetId).listItems();
 const snapshot = {
 date: new Date().toISOString().split('T')[0],
 products: items.map(({ title, price, supplier, url }) => ({ title, price, supplier, url })),
 };
 // Load history and detect changes
 const historyFile = 'price-history.json';
 const history = fs.existsSync(historyFile) ? JSON.parse(fs.readFileSync(historyFile, 'utf8')) : [];
 
 if (history.length > 0) {
 const prevMap = Object.fromEntries(history.at(-1).products.map(p => [p.url, p.price]));
 for (const p of snapshot.products) {
 if (prevMap[p.url] && prevMap[p.url] !== p.price) {
 console.log(`💰 ${p.title}: ${prevMap[p.url]}${p.price}`);
 }
 }
 }
 history.push(snapshot);
 fs.writeFileSync(historyFile, JSON.stringify(history, null, 2));
 console.log(`Saved ${items.length} products (${snapshot.date})`);
}
monitorPrices();

Tip: Use Apify Schedules to run daily/weekly without a server.

Supplier Comparison

Find the best suppliers across multiple product categories:

from apify_client import ApifyClient
import json
client = ApifyClient("YOUR_APIFY_TOKEN")
keywords = ["bluetooth speaker", "bluetooth earphone", "wireless charger"]
all_products = []
for kw in keywords:
 run = client.actor("jungle_intertwining/yiwugo-scraper").call(run_input={
 "startUrls": [{"url": f"https://www.yiwugo.com/search/p-1.html?keywords={kw.replace(' ', '+')}"}],
 "maxItems": 50,
 "proxyConfiguration": {"useApifyProxy": True},
 })
 for item in client.dataset(run["defaultDatasetId"]).iterate_items():
 item["search_keyword"] = kw
 all_products.append(item)
# Rank suppliers by product variety
suppliers = {}
for p in all_products:
 suppliers.setdefault(p.get("supplier", "Unknown"), []).append(p)
for name, products in sorted(suppliers.items(), key=lambda x: -len(x[1]))[:10]:
 print(f" {name}: {len(products)} products")

Export to CSV

from apify_client import ApifyClient
import csv
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("jungle_intertwining/yiwugo-scraper").call(run_input={
 "startUrls": [{"url": "https://www.yiwugo.com/search/p-1.html?keywords=toys"}],
 "maxItems": 500,
 "proxyConfiguration": {"useApifyProxy": True},
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
if items:
 with open("yiwugo-products.csv", "w", newline="", encoding="utf-8-sig") as f:
 writer = csv.DictWriter(f, fieldnames=["title", "price", "minOrder", "supplier", "location", "url"], extrasaction="ignore")
 writer.writeheader()
 writer.writerows(items)
 print(f"Exported {len(items)} products")

Scripts

The examples/ directory contains ready-to-run scripts:

Script Description Usage
price-monitor.js Track prices over time, detect changes APIFY_TOKEN=xxx node examples/price-monitor.js "led lights" 100

Resources

Related Articles

Support

Questions or issues? Visit the Apify Store page or open an issue.

License

MIT


Built with ❤️ on the Apify platform

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /