1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "current_csv": """SKU,Price,Quantity
100007,2.30,5
117,3.40,6
12""",
13 "profile": {
14 "profile_version": 1,
15 "profile_id": "synthetic-plain-sku-usd-each-v1",
16 "columns": {
17 "group": "SKU",
18 "sku": "SKU",
19 "options": [],
20 "price": "Price",
21 "quantity": "Quantity",
22 "currency": None,
23 "quantity_unit": None,
24 },
25 "semantics": {
26 "currency": "USD",
27 "decimal_separator": ".",
28 "thousands_separator": None,
29 "price_scale": 2,
30 "quantity_unit": "each",
31 "quantity_must_be_integer": True,
32 "allow_negative_quantity": False,
33 "shared_sku_policy": "forbid",
34 },
35 "snapshots": {
36 "current": "complete",
37 "previous": "complete",
38 },
39 },
40 "previous_csv": """SKU,Price,Quantity
410007,2.30,5
427,3.40,6
438,4.50,1
44""",
45}
46
47
48run = client.actor("ysoserious_h/catalog-snapshot-guard").call(run_input=run_input)
49
50
51print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
52for item in client.dataset(run.default_dataset_id).iterate_items():
53 print(item)
54
55