1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mapPolicy": [
12 {
13 "sku": "GS-LEGGING-ONYX",
14 "productName": "Gymshark Everyday Seamless Legging",
15 "category": "Apparel",
16 "mapPrice": 55,
17 "currency": "USD",
18 "retailers": [
19 {
20 "name": "Gymshark",
21 "url": "https://www.gymshark.com/products/gymshark-everyday-seamless-washed-legging-2-0-gs-onyx-grey-wash"
22 }
23 ]
24 },
25 {
26 "sku": "ALLBIRDS-WR-BLACK",
27 "productName": "Allbirds Wool Runners",
28 "category": "Footwear",
29 "mapPrice": 110,
30 "currency": "USD",
31 "retailers": [
32 {
33 "name": "Allbirds",
34 "url": "https://www.allbirds.com/products/mens-wool-runners"
35 }
36 ]
37 },
38 {
39 "sku": "MVMT-CLASSIC-40",
40 "productName": "MVMT Classic Watch 40mm",
41 "category": "Accessories",
42 "mapPrice": 128,
43 "currency": "USD",
44 "retailers": [
45 {
46 "name": "MVMT",
47 "url": "https://www.mvmt.com/watches/mens/classic-40mm-40000107-d"
48 }
49 ]
50 }
51 ],
52 "proxyConfiguration": {
53 "useApifyProxy": false
54 }
55};
56
57
58const run = await client.actor("e-commerce/map-compliance-monitor").call(input);
59
60
61console.log('Results from dataset');
62console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
63const { items } = await client.dataset(run.defaultDatasetId).listItems();
64items.forEach((item) => {
65 console.dir(item);
66});
67
68