1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "products": [
10 {
11 "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones",
12 "description": "Over-ear Bluetooth headphones with active noise cancellation",
13 "tags": [
14 "audio",
15 "wireless",
16 "bluetooth",
17 ],
18 },
19 {
20 "title": "KitchenAid 5-Quart Stand Mixer",
21 "description": "Countertop mixer for baking with dough hook and whisk attachments",
22 "tags": [
23 "kitchen",
24 "baking",
25 ],
26 },
27 {
28 "title": "Nike Air Zoom Pegasus Running Shoes",
29 "description": "Men's lightweight running shoes with breathable mesh upper",
30 "tags": [
31 "footwear",
32 "running",
33 ],
34 },
35 ],
36 "taxonomy": [
37 "Electronics > Audio > Headphones",
38 "Electronics > Audio > Speakers",
39 "Home & Kitchen > Small Appliances > Mixers",
40 "Home & Kitchen > Small Appliances > Blenders",
41 "Clothing & Shoes > Footwear > Running Shoes",
42 "Clothing & Shoes > Footwear > Boots",
43 ],
44}
45
46
47run = client.actor("that_red_bird/product-taxonomy-classifier").call(run_input=run_input)
48
49
50print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
51for item in client.dataset(run.default_dataset_id).iterate_items():
52 print(item)
53
54