1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "offers": [
9 {
10 "asin": "B0SAMPLE01",
11 "seller": "Seller A",
12 "price": 12.99,
13 "currency": "USD",
14 "packCount": 1,
15 "unitSize": 32,
16 "unit": "oz",
17 },
18 {
19 "asin": "B0SAMPLE01",
20 "seller": "Seller B",
21 "price": 9.99,
22 "currency": "USD",
23 "packCount": 1,
24 "unitSize": 12,
25 "unit": "oz",
26 },
27 {
28 "asin": "B0SAMPLE01",
29 "seller": "Seller C",
30 "price": 24.5,
31 "currency": "USD",
32 "packCount": 2,
33 "unitSize": 16,
34 "unit": "oz",
35 },
36 {
37 "asin": "B0SAMPLE01",
38 "seller": "Seller D",
39 "price": 11.5,
40 "currency": "USD",
41 "unitSize": 24,
42 "unit": "oz",
43 },
44 {
45 "asin": "B0SAMPLE02",
46 "seller": "Seller A",
47 "price": 8,
48 "currency": "USD",
49 "packCount": 4,
50 "unit": "count",
51 },
52 {
53 "asin": "B0SAMPLE02",
54 "seller": "Seller B",
55 "price": 14,
56 "currency": "USD",
57 "packCount": 12,
58 "unit": "count",
59 },
60 {
61 "asin": "B0SAMPLE02",
62 "seller": "Seller E",
63 "price": 12,
64 "currency": "EUR",
65 "packCount": 6,
66 "unit": "count",
67 },
68 ] }
69
70
71run = client.actor("practical_ai_lab_jp/pal-amazon-unit-price-pack-size-audit").call(run_input=run_input)
72
73
74print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
75for item in client.dataset(run.default_dataset_id).iterate_items():
76 print(item)
77
78