Skip to content

piotrv1001/1688-scraper-nodejs-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Scrape 1688 Product Listings in Node.js

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.

1688 product listings scraping results

What this example does

  • Connects to the Apify API using your token
  • Calls the piotrv1001/1688-listings-scraper actor 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

Prerequisites

Installation

npm install

Environment setup

Copy the example env file and add your Apify token:

cp .env.example .env

Then edit .env:

APIFY_TOKEN=your_apify_token_here

Usage

npm start

The 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.

Code example

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/docs

Example output

See sample-output.json for a full example. Each product includes:

  • offerId — the unique 1688 product ID
  • title — product title (in Chinese)
  • priceFrom / priceTo — price range in CNY
  • tierPrices — wholesale tier pricing
  • minOrderQuantity — minimum order quantity (MOQ)
  • soldCount, wantBuy — sales signals
  • attributes — structured product attributes (material, brand, etc.)
  • images — product image URLs
  • services — seller-provided services (return policy, shipping guarantees)
  • logistics — shipping origin, delivery time, unit weight
  • sellerCompany, sellerLoginId, sellerWinportUrl — seller info and storefront link
  • location — seller location
  • url — original 1688 product URL
  • scrapedAt — ISO timestamp

Use cases

  • 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

Try the actor on Apify

Open the 1688 Listings Scraper on Apify

Related resources

License

MIT

About

How to scrape 1688.com product listings in Node.js using an Apify actor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors