1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "stores": [
12 "https://www.allbirds.com"
13 ],
14 "watch": [
15 "new-product",
16 "removed-product",
17 "price-drop",
18 "price-increase",
19 "sale-started",
20 "sale-ended",
21 "restock",
22 "out-of-stock",
23 "variant-added",
24 "variant-removed"
25 ],
26 "minPriceChangePct": 0,
27 "firstRunBehavior": "emit-all",
28 "trackInventory": false,
29 "collections": [],
30 "productHandles": [],
31 "maxInventoryLookups": 100,
32 "maxProductsPerStore": 25,
33 "maxChangesPerStore": 2000,
34 "outageGuardThreshold": 10,
35 "stateStoreName": "shopify-store-monitor-state",
36 "requestTimeoutSecs": 20,
37 "maxConcurrency": 3,
38 "maxRunSecs": 240,
39 "proxyConfiguration": {
40 "useApifyProxy": true
41 }
42};
43
44
45const run = await client.actor("insight.solutions/shopify-store-monitor").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55