1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "pairs": [
9 {
10 "id": "detergent-example",
11 "left": {
12 "price": "12.50",
13 "currency": "USD",
14 "packSize": "6 x 500 ml",
15 },
16 "right": {
17 "price": "4.20",
18 "currency": "USD",
19 "packSize": "1 L",
20 },
21 },
22 {
23 "id": "paper-example",
24 "left": {
25 "price": "9.00",
26 "currency": "USD",
27 "packSize": "12 pcs",
28 },
29 "right": {
30 "price": "4.50",
31 "currency": "USD",
32 "packSize": "6 pcs",
33 },
34 },
35 {
36 "id": "manual-review-example",
37 "left": {
38 "price": "5.00",
39 "currency": "USD",
40 "packSize": "12 oz",
41 },
42 "right": {
43 "price": "6.00",
44 "currency": "USD",
45 "packSize": "500 g",
46 },
47 },
48 ] }
49
50
51run = client.actor("cooing_openness/pack-price-comparator").call(run_input=run_input)
52
53
54print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
55for item in client.dataset(run.default_dataset_id).iterate_items():
56 print(item)
57
58