1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "monitorId": "sample",
12 "productUrls": [
13 {
14 "url": "https://www.graza.co/products/hot-n-sweet-olive-oil-potato-chips",
15 "sku": "CHP-HS55"
16 },
17 {
18 "url": "https://olaplex.com/products/olaplex-the-healthy-hair-travel-set-us",
19 "sku": "VB000030"
20 },
21 {
22 "url": "https://www.beardbrand.com/products/fox-hunt-mens-cologne",
23 "sku": "32836920"
24 }
25 ],
26 "catalog": [
27 {
28 "sku": "CHP-HS55",
29 "gtin": "850062393370",
30 "mpn": "850062393370",
31 "title": "Hot 'n Sweet Olive Oil Potato Chips",
32 "packSize": 1,
33 "brand": "Graza"
34 },
35 {
36 "sku": "VB000030",
37 "gtin": null,
38 "mpn": "VB000030",
39 "title": "THE HEALTHY HAIR TRAVEL SET",
40 "packSize": 1,
41 "brand": "OLAPLEX"
42 },
43 {
44 "sku": "32836920",
45 "gtin": null,
46 "mpn": "32836920",
47 "title": "Fox Hunt Men's Cologne",
48 "packSize": 1,
49 "brand": "Beardbrand"
50 }
51 ],
52 "policies": [
53 {
54 "policyId": "SAMPLE-CHIPS",
55 "sku": "CHP-HS55",
56 "minAdvertisedPrice": 24,
57 "currency": "USD",
58 "effectiveFrom": "2026-01-01",
59 "effectiveTo": null,
60 "packSize": 1,
61 "appliesToCondition": "new"
62 },
63 {
64 "policyId": "SAMPLE-OLAPLEX",
65 "sku": "VB000030",
66 "minAdvertisedPrice": 0.01,
67 "currency": "USD",
68 "effectiveFrom": "2026-01-01",
69 "effectiveTo": null,
70 "packSize": 1,
71 "appliesToCondition": "new"
72 },
73 {
74 "policyId": "SAMPLE-COLOGNE",
75 "sku": "32836920",
76 "minAdvertisedPrice": 0.01,
77 "currency": "USD",
78 "effectiveFrom": "2026-01-01",
79 "effectiveTo": null,
80 "packSize": 1,
81 "appliesToCondition": "new"
82 }
83 ],
84 "approvedSellers": [
85 {
86 "sellerId": "graza",
87 "name": "Graza",
88 "aliases": [
89 "Graza",
90 "Graza Olive Oil"
91 ],
92 "domains": [
93 "graza.co",
94 "www.graza.co"
95 ]
96 },
97 {
98 "sellerId": "olaplex",
99 "name": "OLAPLEX",
100 "aliases": [
101 "OLAPLEX",
102 "OLAPLEX Inc.",
103 "Olaplex"
104 ],
105 "domains": [
106 "olaplex.com",
107 "www.olaplex.com"
108 ]
109 }
110 ],
111 "exemptions": [
112 {
113 "exemptionId": "SAMPLE-UNUSED",
114 "sku": "NOT-IN-THIS-RUN",
115 "sellerId": "graza",
116 "reason": "Example exemption shape. It does not match the sample URLs.",
117 "effectiveFrom": "2026-01-01",
118 "effectiveTo": "2026-12-31",
119 "condition": "new",
120 "floorPrice": null
121 }
122 ],
123 "stateStoreName": "map-price-policy-state"
124};
125
126
127const run = await client.actor("plusonets/map-price-policy-monitor").call(input);
128
129
130console.log('Results from dataset');
131console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
132const { items } = await client.dataset(run.defaultDatasetId).listItems();
133items.forEach((item) => {
134 console.dir(item);
135});
136
137