1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "baseline": {
10 "sourceType": "inline",
11 "label": "Approved catalog",
12 "format": "auto",
13 "items": [
14 {
15 "sku": "PHX-100",
16 "title": "Example black mug",
17 "price": "19.99",
18 "currency": "EUR",
19 "stock": "in stock",
20 "image_url": "https://example.com/images/mug.jpg",
21 "product_url": "https://example.com/products/mug",
22 },
23 {
24 "sku": "PHX-200",
25 "title": "Example desk mat",
26 "price": "29.99",
27 "currency": "EUR",
28 "stock": "in stock",
29 "image_url": "https://example.com/images/mat.jpg",
30 "product_url": "https://example.com/products/mat",
31 },
32 ],
33 },
34 "current": {
35 "sourceType": "inline",
36 "label": "Current catalog",
37 "format": "auto",
38 "items": [
39 {
40 "sku": "PHX-100",
41 "title": "Example black mug",
42 "price": "21.99",
43 "currency": "EUR",
44 "stock": "out of stock",
45 "image_url": "",
46 "product_url": "https://example.com/products/mug",
47 },
48 {
49 "sku": "PHX-300",
50 "title": "Example laptop stand",
51 "price": "39.99",
52 "currency": "EUR",
53 "stock": "in stock",
54 "image_url": "https://example.com/images/stand.jpg",
55 "product_url": "https://example.com/products/stand",
56 },
57 ],
58 },
59}
60
61
62run = client.actor("phoenix-tools/phoenix-catalog-proof").call(run_input=run_input)
63
64
65print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
66for item in client.dataset(run.default_dataset_id).iterate_items():
67 print(item)
68
69