1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "snapshots": [
9 {
10 "store": "demo-store",
11 "label": "October",
12 "capturedAt": "2026-10-01",
13 "products": [
14 {
15 "id": 1,
16 "handle": "trail-shoe",
17 "title": "Trail Shoe",
18 "vendor": "Northpeak",
19 "product_type": "Footwear",
20 "variants": [{
21 "price": "89.00",
22 "available": True,
23 }],
24 },
25 {
26 "id": 2,
27 "handle": "rain-jacket",
28 "title": "Rain Jacket",
29 "vendor": "Northpeak",
30 "product_type": "Outerwear",
31 "variants": [{
32 "price": "120.00",
33 "available": True,
34 }],
35 },
36 {
37 "id": 3,
38 "handle": "wool-sock",
39 "title": "Wool Sock",
40 "vendor": "Fieldwool",
41 "product_type": "Accessories",
42 "variants": [{
43 "price": "14.00",
44 "available": True,
45 }],
46 },
47 ],
48 },
49 {
50 "store": "demo-store",
51 "label": "November",
52 "capturedAt": "2026-11-01",
53 "products": [
54 {
55 "id": 1,
56 "handle": "trail-shoe",
57 "title": "Trail Shoe",
58 "vendor": "Northpeak",
59 "product_type": "Footwear",
60 "variants": [{
61 "price": "79.00",
62 "available": True,
63 }],
64 },
65 {
66 "id": 2,
67 "handle": "rain-jacket",
68 "title": "Rain Jacket",
69 "vendor": "Northpeak",
70 "product_type": "Outerwear",
71 "variants": [{
72 "price": "120.00",
73 "available": False,
74 }],
75 },
76 {
77 "id": 4,
78 "handle": "city-bag",
79 "title": "City Bag",
80 "vendor": "Urbanloop",
81 "product_type": "Bags",
82 "variants": [{
83 "price": "65.00",
84 "available": True,
85 }],
86 },
87 ],
88 },
89 ] }
90
91
92run = client.actor("practical_ai_lab_jp/pal-shopify-brand-assortment-shifts").call(run_input=run_input)
93
94
95print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
96for item in client.dataset(run.default_dataset_id).iterate_items():
97 print(item)
98
99