1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "dealerHosts": [
12 "hardware.shopify.com"
13 ],
14 "productUrls": [
15 "https://hardware.shopify.com/products/shopify-pos-go"
16 ],
17 "catalog": [
18 {
19 "id": "shopify-pos-go",
20 "sku": "887675103492",
21 "barcode": "887675103492"
22 }
23 ],
24 "maxResults": 1,
25 "maxRequests": 4,
26 "maxRetries": 1,
27 "maxSeconds": 40,
28 "maxResponseBytes": 500000,
29 "maxBudgetUsd": 0.02
30};
31
32
33const run = await client.actor("felixgoldwin/shopify-reseller-price-stock-monitor").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43