Actor picture

Aliexpress Scraper

tugkan/aliexpress-scraper

Scrape data from Aliexpress. Extract descriptions, image, feedback, questions, prices, and all other product details. You can specify country, language, and region for shipping.

Author's avatarTuğkan Cengiz
  • Modified
  • Users613
  • Runs14,664
Actor picture

Aliexpress Scraper

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running actors via the API in Apify Docs.

const { ApifyClient } = require('apify-client');

// Initialize the ApifyClient with API token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.aliexpress.com/category/200003482/dresses.html"
        },
        {
            "url": "https://www.aliexpress.com/item/32940810951.html"
        }
    ],
    "language": "en_US",
    "shipTo": "US",
    "currency": "USD",
    "maxItems": 50,
    "proxy": {
        "useApifyProxy": true
    },
    "extendOutputFunction": ($) => { return {} }
};

(async () => {
    // Run the actor and wait for it to finish
    const run = await client.actor("tugkan/aliexpress-scraper").call(input);

    // Fetch and print actor results from the run's dataset (if any)
    console.log('Results from dataset');
    const { items } = await client.dataset(run.defaultDatasetId).listItems();
    items.forEach((item) => {
        console.dir(item);
    });
})();