1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "baselineDate": "2026-10-01",
10 "baselineProducts": [
11 {
12 "id": 1001,
13 "handle": "city-tee",
14 "title": "City Tee",
15 "published_at": "2026-09-01T00:00:00Z",
16 "options": [
17 { "name": "Size" },
18 { "name": "Color" },
19 ],
20 "variants": [
21 {
22 "id": 5001,
23 "sku": "TEE-S-BLK",
24 "barcode": "4006381333931",
25 "option1": "S",
26 "option2": "Black",
27 "available": True,
28 },
29 {
30 "id": 5002,
31 "sku": "TEE-M-BLK",
32 "barcode": "",
33 "option1": "M",
34 "option2": "Black",
35 "available": True,
36 },
37 ],
38 },
39 {
40 "id": 1002,
41 "handle": "canvas-tote",
42 "title": "Canvas Tote",
43 "published_at": "2026-09-01T00:00:00Z",
44 "options": [{ "name": "Color" }],
45 "variants": [{
46 "id": 5101,
47 "sku": "TOTE-NAT",
48 "barcode": "5012345678900",
49 "option1": "Natural",
50 "available": True,
51 }],
52 },
53 ],
54 "currentDate": "2026-11-01",
55 "currentProducts": [
56 {
57 "id": 1001,
58 "handle": "city-tee",
59 "title": "City Tee - Organic Cotton",
60 "published_at": "2026-09-01T00:00:00Z",
61 "options": [
62 { "name": "Size" },
63 { "name": "Colour" },
64 ],
65 "variants": [
66 {
67 "id": 5001,
68 "sku": "TEE-S-BLK",
69 "barcode": "4006381333931",
70 "option1": "S",
71 "option2": "Black",
72 "available": True,
73 },
74 {
75 "id": 5002,
76 "sku": "TEE-M-BLK",
77 "barcode": "4006381333948",
78 "option1": "M",
79 "option2": "Black",
80 "available": True,
81 },
82 {
83 "id": 5003,
84 "sku": "TEE-L-BLK",
85 "barcode": "",
86 "option1": "L",
87 "option2": "Black",
88 "available": False,
89 },
90 ],
91 },
92 {
93 "id": 1002,
94 "handle": "canvas-tote",
95 "title": "Canvas Tote",
96 "published_at": None,
97 "options": [{ "name": "Color" }],
98 "variants": [{
99 "id": 5101,
100 "sku": "TOTE-NAT",
101 "barcode": "5012345678900",
102 "option1": "Natural",
103 "available": True,
104 }],
105 },
106 ],
107}
108
109
110run = client.actor("practical_ai_lab_jp/pal-shopify-variant-listing-drift-audit").call(run_input=run_input)
111
112
113print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
114for item in client.dataset(run.default_dataset_id).iterate_items():
115 print(item)
116
117