1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "productsA": [
10 {
11 "id": "A1",
12 "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones, Black",
13 "brand": "Sony",
14 "price": 349.99,
15 "url": "https://shop-a.example/p/sony-wh1000xm5",
16 },
17 {
18 "id": "A2",
19 "title": "Apple iPhone 15 128GB Black",
20 "brand": "Apple",
21 "price": 799,
22 "url": "https://shop-a.example/p/iphone-15-128-black",
23 },
24 {
25 "id": "A3",
26 "title": "Samsung Galaxy S24 Ultra 256GB Titanium Gray",
27 "brand": "Samsung",
28 "price": 1299.99,
29 "url": "https://shop-a.example/p/s24-ultra-256",
30 },
31 {
32 "id": "A4",
33 "title": "Coca-Cola Original Taste 6 x 330ml cans",
34 "brand": "Coca-Cola",
35 "price": 4.99,
36 "url": "https://shop-a.example/p/coke-6x330",
37 },
38 {
39 "id": "A5",
40 "title": "L'Oréal Paris Revitalift Laser X3 Day Cream 50ml",
41 "brand": "L'Oréal Paris",
42 "price": 24.9,
43 "gtin": "3600523257461",
44 "url": "https://shop-a.example/p/revitalift-laser",
45 },
46 {
47 "id": "A6",
48 "title": "Nike Air Force 1 '07 Men's Shoes White Size 42",
49 "brand": "Nike",
50 "price": 110,
51 "url": "https://shop-a.example/p/af1-white-42",
52 },
53 ],
54 "productsB": [
55 {
56 "id": "B1",
57 "title": "SONY WH1000XM5 Noise-Cancelling Bluetooth Headphones (Black)",
58 "price": 329,
59 "url": "https://shop-b.example/item/1",
60 },
61 {
62 "id": "B2",
63 "title": "iPhone 15 256 GB - Black - Apple",
64 "price": 899,
65 "url": "https://shop-b.example/item/2",
66 },
67 {
68 "id": "B3",
69 "title": "Apple iPhone 15 (128 GB) – Black",
70 "price": 779,
71 "url": "https://shop-b.example/item/3",
72 },
73 {
74 "id": "B4",
75 "title": "Samsung Galaxy S24 Ultra 256 Go Gris Titane",
76 "price": 1249,
77 "url": "https://shop-b.example/item/4",
78 },
79 {
80 "id": "B5",
81 "title": "Coca-Cola Original 330 ml can",
82 "price": 0.99,
83 "url": "https://shop-b.example/item/5",
84 },
85 {
86 "id": "B6",
87 "title": "L'Oreal Revitalift Laser X3 Anti-Ageing Day Cream 50 ml",
88 "price": 21.99,
89 "gtin": "03600523257461",
90 "url": "https://shop-b.example/item/6",
91 },
92 ],
93}
94
95
96run = client.actor("freecamp008/product-matcher").call(run_input=run_input)
97
98
99print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
100for item in client.dataset(run.default_dataset_id).iterate_items():
101 print(item)
102
103