1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "products": [
9 {
10 "id": "rice-500",
11 "price": "2.50",
12 "currency": "USD",
13 "comparisonGroup": "plain-rice",
14 "quantityText": "500g",
15 },
16 {
17 "id": "rice-1kg",
18 "price": "4.00",
19 "currency": "USD",
20 "comparisonGroup": "plain-rice",
21 "quantity": {
22 "value": "1",
23 "unit": "kg",
24 "packCount": 1,
25 },
26 },
27 ] }
28
29
30run = client.actor("superfreshlabs/unit-price-normalizer").call(run_input=run_input)
31
32
33print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
34for item in client.dataset(run.default_dataset_id).iterate_items():
35 print(item)
36
37