1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "offers": [
10 {
11 "asin": "EXAMPLE-001",
12 "title": "Example Widget 2-Pack",
13 "vendor": "Vendor A",
14 "price": "$24.99",
15 "shipping": "free",
16 },
17 {
18 "asin": "EXAMPLE-001",
19 "title": "Example Widget 2-Pack",
20 "vendor": "Vendor B",
21 "price": "21,50 €",
22 "shipping": "3,00 €",
23 },
24 {
25 "asin": "EXAMPLE-001",
26 "title": "Example Widget 2-Pack",
27 "vendor": "Vendor C",
28 "price": 26.4,
29 "currency": "USD",
30 },
31 {
32 "asin": "EXAMPLE-002",
33 "title": "Example Gadget Mini",
34 "vendor": "Vendor A",
35 "price": "$12.00",
36 "shipping": 4.5,
37 "availability": "In stock",
38 },
39 {
40 "asin": "EXAMPLE-002",
41 "title": "Example Gadget Mini",
42 "vendor": "Vendor B",
43 "price": "11,20 €",
44 "shipping": "2,50 €",
45 "availability": "Out of stock",
46 },
47 ],
48 "fxRates": { "EUR": 1.08 },
49 "vendorFees": {
50 "Vendor A": {
51 "percent": 15,
52 "fixed": 0.3,
53 },
54 "Vendor B": { "percent": 8 },
55 },
56}
57
58
59run = client.actor("practical_ai_lab_jp/pal-amazon-competitor-offer-matrix").call(run_input=run_input)
60
61
62print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
63for item in client.dataset(run.default_dataset_id).iterate_items():
64 print(item)
65
66