1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "searchTerms": [
13 "prada bag"
14 ],
15 "categories": [
16 "women/bags"
17 ],
18 "urls": [
19 "https://www.ounass.ae/women/bags",
20 "https://www.ounass.ae/women/designers/gucci",
21 "https://www.ounass.ae/women/bags?designerCategoryName%5B%5D=Gucci&designerCategoryName%5B%5D=Prada",
22 "https://kuwait.ounass.com/women/clothing?priceTypeBySaleId%5B%5D=sale",
23 "https://kuwait.ounass.com/women/bags?rangeAttribute=priceBySaleId&min=100&max=200",
24 "https://kuwait.ounass.com/men?fh_location=%2F%24s%3Dgucci%20sneakers",
25 "https://www.ounass.ae/women/clothing?fh_start_index=24",
26 "https://ar.ounass.ae/women/bags",
27 "https://www.ounass.ae/shop-solace-london-dandridge-maxi-dress-for-women-220085751_181.html",
28 "https://www.ounass.ae/220085857.html"
29 ],
30 "market": "AE",
31 "fetchDetails": true,
32 "maxItems": 20,
33 "proxy": {
34 "useApifyProxy": true,
35 "apifyProxyGroups": [
36 "RESIDENTIAL"
37 ]
38 },
39 "incrementalMode": false,
40 "compactUpdates": false,
41 "emitUnchanged": false,
42 "emitExpired": false,
43 "ignoreFieldsForChanges": [
44 "wishlistCount",
45 "stockQuantity",
46 "totalStock",
47 "badges"
48 ]
49};
50
51
52const run = await client.actor("abotapi/ounass-scraper").call(input);
53
54
55console.log('Results from dataset');
56console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
57const { items } = await client.dataset(run.defaultDatasetId).listItems();
58items.forEach((item) => {
59 console.dir(item);
60});
61
62