1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "bom": [
10 {
11 "bundleSku": "KIT-STARTER",
12 "componentSku": "MUG-BLUE",
13 "quantity": 1,
14 },
15 {
16 "bundleSku": "KIT-STARTER",
17 "componentSku": "TEA-SAMPLER",
18 "quantity": 2,
19 },
20 {
21 "bundleSku": "KIT-GIFT",
22 "componentSku": "MUG-BLUE",
23 "quantity": 1,
24 },
25 {
26 "bundleSku": "KIT-GIFT",
27 "componentSku": "CANDLE-S",
28 "quantity": 1,
29 },
30 {
31 "bundleSku": "KIT-TRAVEL",
32 "componentSku": "BOTTLE-500",
33 "quantity": 1,
34 },
35 {
36 "bundleSku": "KIT-TRAVEL",
37 "componentSku": "POUCH-GREY",
38 "quantity": 1,
39 },
40 ],
41 "before": {
42 "label": "Monday export",
43 "capturedAt": "2026-11-02T09:00:00Z",
44 "rows": [
45 {
46 "sku": "MUG-BLUE",
47 "available": True,
48 },
49 {
50 "sku": "TEA-SAMPLER",
51 "available": True,
52 },
53 {
54 "sku": "CANDLE-S",
55 "available": True,
56 },
57 {
58 "sku": "BOTTLE-500",
59 "available": False,
60 },
61 {
62 "sku": "KIT-STARTER",
63 "available": True,
64 },
65 {
66 "sku": "KIT-GIFT",
67 "available": True,
68 },
69 {
70 "sku": "KIT-TRAVEL",
71 "available": True,
72 },
73 ],
74 },
75 "after": {
76 "label": "Thursday export",
77 "capturedAt": "2026-11-05T09:00:00Z",
78 "rows": [
79 {
80 "sku": "MUG-BLUE",
81 "available": False,
82 },
83 {
84 "sku": "TEA-SAMPLER",
85 "available": True,
86 },
87 {
88 "sku": "CANDLE-S",
89 "available": True,
90 },
91 {
92 "sku": "BOTTLE-500",
93 "available": True,
94 },
95 {
96 "sku": "KIT-STARTER",
97 "available": True,
98 },
99 {
100 "sku": "KIT-GIFT",
101 "available": True,
102 },
103 {
104 "sku": "KIT-TRAVEL",
105 "available": True,
106 },
107 ],
108 },
109}
110
111
112run = client.actor("practical_ai_lab_jp/pal-shopify-bundle-component-availability-audit").call(run_input=run_input)
113
114
115print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
116for item in client.dataset(run.default_dataset_id).iterate_items():
117 print(item)
118
119