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 "market": "cl",
13 "queries": [
14 "iphone"
15 ],
16 "sort": "relevance",
17 "urls": [
18 "https://www.falabella.com/falabella-cl/search?Ntt=iphone",
19 "https://www.falabella.com/falabella-cl/collection/iphone?sred=iphone",
20 "https://www.falabella.com/falabella-cl/category/cat1012/TV-y-Video",
21 "https://www.falabella.com/falabella-cl/category/cat1012",
22 "https://www.falabella.com/falabella-cl/brand/APPLE",
23 "https://www.falabella.com/falabella-cl/brand/APPLE?page=2",
24 "https://www.falabella.com/falabella-cl/search?Ntt=televisor&page=2",
25 "https://www.falabella.com/falabella-cl/category/cat1012/TV-y-Video?sortBy=derived.price.search,asc",
26 "https://www.falabella.com/falabella-cl/category/cat1012/TV-y-Video?f.product.brandName=SAMSUNG",
27 "https://www.falabella.com/falabella-cl/product/80746061/led-smart-tv-58-pud7019-4k-uhd-philips",
28 "https://www.falabella.com.co/falabella-co/search?Ntt=televisor",
29 "https://www.falabella.com.co/falabella-co/category/cat1660941",
30 "https://www.falabella.com.pe/falabella-pe"
31 ],
32 "fetchDetails": false,
33 "maxItems": 20,
34 "maxPages": 0,
35 "proxyConfiguration": {
36 "useApifyProxy": true,
37 "apifyProxyGroups": [
38 "RESIDENTIAL"
39 ]
40 },
41 "incrementalMode": false,
42 "emitUnchanged": false,
43 "emitExpired": false,
44 "maxNotifyListings": 50
45};
46
47
48const run = await client.actor("abotapi/falabella-marketplace-scraper").call(input);
49
50
51console.log('Results from dataset');
52console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58