1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "previousSnapshot": {
10 "sourceId": "example-store",
11 "scope": "all-public-products",
12 "capturedAt": "2026-09-03T12:00:00Z",
13 "complete": True,
14 "products": [
15 {
16 "id": 1,
17 "type": "simple",
18 "name": "Product 1",
19 "sku": "SKU-1",
20 "is_in_stock": True,
21 "prices": {
22 "price": "1000",
23 "currency_code": "USD",
24 "currency_minor_unit": 2,
25 },
26 },
27 {
28 "id": 2,
29 "type": "simple",
30 "name": "Product 2",
31 "sku": "SKU-2",
32 "is_in_stock": True,
33 "prices": {
34 "price": "1000",
35 "currency_code": "USD",
36 "currency_minor_unit": 2,
37 },
38 },
39 {
40 "id": 3,
41 "type": "simple",
42 "name": "Product 3",
43 "sku": "SKU-3",
44 "is_in_stock": True,
45 "prices": {
46 "price": "1000",
47 "currency_code": "USD",
48 "currency_minor_unit": 2,
49 },
50 },
51 {
52 "id": 4,
53 "type": "simple",
54 "name": "Product 4",
55 "sku": "SKU-4",
56 "is_in_stock": True,
57 "prices": {
58 "price": "1000",
59 "currency_code": "USD",
60 "currency_minor_unit": 2,
61 },
62 },
63 {
64 "id": 5,
65 "type": "simple",
66 "name": "Product 5",
67 "sku": "SKU-5",
68 "is_in_stock": True,
69 "prices": {
70 "price": "1000",
71 "currency_code": "USD",
72 "currency_minor_unit": 2,
73 },
74 },
75 ],
76 },
77 "currentSnapshot": {
78 "sourceId": "example-store",
79 "scope": "all-public-products",
80 "capturedAt": "2026-09-04T12:00:00Z",
81 "complete": False,
82 "products": [
83 {
84 "id": 1,
85 "type": "simple",
86 "name": "Product 1",
87 "sku": "SKU-1",
88 "is_in_stock": True,
89 "prices": {
90 "price": "1",
91 "currency_code": "USD",
92 "currency_minor_unit": 2,
93 },
94 },
95 {
96 "id": 2,
97 "type": "simple",
98 "name": "Product 2",
99 "sku": "SKU-2",
100 "is_in_stock": False,
101 "prices": {
102 "price": "1000",
103 "currency_code": "USD",
104 "currency_minor_unit": 2,
105 },
106 },
107 {
108 "id": 3,
109 "type": "simple",
110 "name": "Product 3",
111 "sku": "SKU-3",
112 "is_in_stock": True,
113 "prices": {
114 "price": "900",
115 "currency_code": "EUR",
116 "currency_minor_unit": 2,
117 },
118 },
119 {
120 "id": 4,
121 "type": "simple",
122 "name": "Product 4",
123 "sku": "SKU-4",
124 "is_in_stock": True,
125 "prices": {
126 "price": "",
127 "currency_code": "USD",
128 "currency_minor_unit": 2,
129 },
130 },
131 ],
132 },
133}
134
135
136run = client.actor("willing_relic/woocommerce-catalog-change-guard").call(run_input=run_input)
137
138
139print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
140for item in client.dataset(run.default_dataset_id).iterate_items():
141 print(item)
142
143