A practical Node.js example showing how to scrape product listings from 1688.com (Alibaba's Chinese wholesale marketplace) using an Apify actor — no need to build a scraper from scratch.
This example calls the hosted 1688 Listings Scraper actor via the Apify API client and prints the resulting product data.
- Connects to the Apify API using your token
- Calls the
piotrv1001/1688-listings-scraperactor with a search keyword and item limit - Waits for the run to finish
- Fetches the resulting dataset of product listings
- Prints each product to the console
- Node.js 18 or newer
- An Apify account (free tier works)
- Your Apify API token — find it under Settings → Integrations
npm installCopy the example env file and add your Apify token:
cp .env.example .envThen edit .env:
APIFY_TOKEN=your_apify_token_herenpm startThe script will run the actor, wait for it to complete, and print each scraped product to the console along with a link to the dataset in your Apify console.
import { ApifyClient } from 'apify-client';
import 'dotenv/config';
// Initialize the ApifyClient with your Apify API token
// Set APIFY_TOKEN in your .env file (copy .env.example to get started)
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
// Prepare Actor input
const input = {
"keywords": [
"iphone case"
],
"maxItems": 50,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
],
"apifyProxyCountry": "CN"
}
};
// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/1688-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/docsSee sample-output.json for a full example. Each product includes:
offerId— the unique 1688 product IDtitle— product title (in Chinese)priceFrom/priceTo— price range in CNYtierPrices— wholesale tier pricingminOrderQuantity— minimum order quantity (MOQ)soldCount,wantBuy— sales signalsattributes— structured product attributes (material, brand, etc.)images— product image URLsservices— seller-provided services (return policy, shipping guarantees)logistics— shipping origin, delivery time, unit weightsellerCompany,sellerLoginId,sellerWinportUrl— seller info and storefront linklocation— seller locationurl— original 1688 product URLscrapedAt— ISO timestamp
- Product sourcing — find suppliers and wholesale prices for items you want to import
- Competitive price monitoring — track wholesale pricing trends on 1688
- Dropshipping research — discover trending products and reliable suppliers
- Market analysis — analyze categories, MOQs, and seller distribution by region
- Sourcing automation — feed structured product data into ERPs, spreadsheets, or BI tools
Open the 1688 Listings Scraper on Apify
- 📖 Full guide: How to scrape 1688 product listings
- 📚 Apify JavaScript client docs
MIT
