1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "storeUrls": [
12 {
13 "url": "https://www.glossier.com"
14 },
15 {
16 "url": "https://www.outdoorvoices.com"
17 },
18 {
19 "url": "https://www.kyliecosmetics.com"
20 }
21 ],
22 "historyEnabled": true,
23 "historyStoreName": "shopify-price-history",
24 "outputMode": "all",
25 "minDropPct": 5,
26 "maxProducts": 10,
27 "scanLimitPerStore": 1000,
28 "mode": "on-sale",
29 "maxProductsPerStore": 5,
30 "minDiscountPct": 0,
31 "includeStoreSummary": true,
32 "referenceTolerancePct": 1,
33 "trackHistory": true,
34 "proxyConfiguration": {
35 "useApifyProxy": true,
36 "apifyProxyGroups": [
37 "RESIDENTIAL"
38 ]
39 }
40};
41
42
43const run = await client.actor("kondasviktor/shopify-discount-promo-tracker").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53