1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brandAsins": [
12 "B012345678",
13 "B0ABCDEFGH"
14 ],
15 "capMode": "capped",
16 "checkHours": 6,
17 "configId": "demo-seller-01",
18 "groupCodes": [
19 {
20 "code": "SAVE20",
21 "expiresAt": "2027-06-01T00:00:00.000Z",
22 "scope": "private"
23 },
24 {
25 "code": "INFLU10",
26 "expiresAt": "2027-06-01T00:00:00.000Z",
27 "scope": "influencer"
28 }
29 ],
30 "maxTotalChargeUsd": 3,
31 "stackWatch": true
32};
33
34
35const run = await client.actor("steadyworks/amazon-promo-leak-monitor").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45