1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://www.daraz.pk/invisible-unisex-fashion-3/?clickTrackInfo=matchType--20___description--237K%252B%2Bsearch___seedItemMatchType--c2i___bucket--0___spm_id--category.hp___seedItemScore--0.0___abId--379344___score--0.1___pvid--c761fd39-ded8-4005-b0f2-5ceb8de2c38d___refer--___appId--7253___seedItemId--170714327___scm--1007.17253.379344.0___categoryId--10001971___timestamp--1767356326893&from=hp_categories&item_id=170714327&page=2¶ms=%7B%22catIdLv1%22%3A%221819%22%2C%22pvid%22%3A%22c761fd39-ded8-4005-b0f2-5ceb8de2c38d%22%2C%22src%22%3A%22ald%22%2C%22categoryName%22%3A%22Hoodies%2B%2BSweatshirts%22%2C%22categoryId%22%3A%2210001971%22%7D&q=hoodies%2B%2Bsweatshirts&service=hp_categories&spm=a2a0e.tm80335142.categoriesPC.d_5_10001971&src=hp_categories&up_id=170714327&version=v2"
13 ],
14 "ignore_url_failures": true,
15 "max_items_per_url": 20
16};
17
18
19const run = await client.actor("stealth_mode/daraz-product-search-scraper").call(input);
20
21
22console.log('Results from dataset');
23console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
24const { items } = await client.dataset(run.defaultDatasetId).listItems();
25items.forEach((item) => {
26 console.dir(item);
27});
28
29