1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "catalogue": [
12 {
13 "sku": "ACME-500",
14 "title": "Acme Hydro Flask 500ml",
15 "brand": "Acme",
16 "model": "HF-500",
17 "size": "500ml",
18 "packCount": 1,
19 "map": 24.99,
20 "currency": "USD"
21 },
22 {
23 "sku": "ACME-750",
24 "title": "Acme Insulated Bottle 750ml",
25 "brand": "Acme",
26 "model": "IB-750",
27 "size": "750ml",
28 "packCount": 1,
29 "map": 29.99,
30 "currency": "USD"
31 },
32 {
33 "sku": "ACME-500-4PK",
34 "title": "Acme Hydro Flask 500ml 4 Pack",
35 "brand": "Acme",
36 "model": "HF-500",
37 "size": "500ml",
38 "packCount": 4,
39 "map": 89.99,
40 "currency": "USD"
41 }
42 ],
43 "listings": [
44 {
45 "retailer": "discount-outlet.example",
46 "title": "Acme Hydro Flask 500ml Bottle",
47 "price": 17.99,
48 "url": "https://discount-outlet.example/p/123",
49 "currency": "USD",
50 "timestamp": "2026-11-20T09:00:00Z"
51 },
52 {
53 "retailer": "main-street-store.example",
54 "title": "Acme Hydro Flask 500ml",
55 "price": 24.99,
56 "url": "https://main-street-store.example/items/hf500",
57 "currency": "USD"
58 },
59 {
60 "retailer": "discount-outlet.example",
61 "title": "Acme Insulated Bottle 750ml Silver",
62 "price": 27.49,
63 "url": "https://discount-outlet.example/p/456",
64 "currency": "USD"
65 },
66 {
67 "retailer": "main-street-store.example",
68 "title": "Acme Hydro Flask 500ml 2 Pack",
69 "price": 45,
70 "url": "https://main-street-store.example/items/hf500-2pk",
71 "currency": "USD"
72 },
73 {
74 "retailer": "kitchen-hub.example",
75 "title": "Ceramic Coffee Mug 350ml White",
76 "price": 5.5,
77 "url": "https://kitchen-hub.example/p/789",
78 "currency": "USD"
79 }
80 ]
81};
82
83
84const run = await client.actor("that_red_bird/map-violation-detector").call(input);
85
86
87console.log('Results from dataset');
88console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
89const { items } = await client.dataset(run.defaultDatasetId).listItems();
90items.forEach((item) => {
91 console.dir(item);
92});
93
94