1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "id": "sku-a",
14 "product": "Wireless Earbuds",
15 "seller": "Alpha Store",
16 "market": "BR",
17 "price": 89.9,
18 "stock": 42,
19 "sold": 780,
20 "discountPct": 25,
21 "date": "2026-09-23"
22 },
23 {
24 "id": "sku-b",
25 "product": "Portable Blender",
26 "seller": "Beta Shop",
27 "market": "BR",
28 "price": 119,
29 "stock": 8,
30 "sold": 430,
31 "discountPct": 15,
32 "date": "2026-09-23"
33 },
34 {
35 "id": "sku-c",
36 "product": "Gaming Mouse",
37 "seller": "Gamma Tech",
38 "market": "SG",
39 "price": 31.5,
40 "stock": 75,
41 "sold": 920,
42 "discountPct": 10,
43 "date": "2026-09-23"
44 }
45 ],
46 "previousItems": [
47 {
48 "id": "sku-a",
49 "product": "Wireless Earbuds",
50 "seller": "Alpha Store",
51 "market": "BR",
52 "price": 99.9,
53 "stock": 70,
54 "sold": 690,
55 "discountPct": 18,
56 "date": "2026-09-16"
57 },
58 {
59 "id": "sku-b",
60 "product": "Portable Blender",
61 "seller": "Beta Shop",
62 "market": "BR",
63 "price": 119,
64 "stock": 31,
65 "sold": 390,
66 "discountPct": 15,
67 "date": "2026-09-16"
68 }
69 ]
70};
71
72
73const run = await client.actor("quanmatrix/shopee-seller-price-stock-shift-intelligence").call(input);
74
75
76console.log('Results from dataset');
77console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
78const { items } = await client.dataset(run.defaultDatasetId).listItems();
79items.forEach((item) => {
80 console.dir(item);
81});
82
83