1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "products": [{
10 "id": "sku-1",
11 "title": "Women's waterproof hiking boots",
12 "description": "Leather trail boots with rubber sole",
13 "brand": "North Peak",
14 }],
15 "taxonomy": [
16 {
17 "id": "footwear-boots",
18 "name": "Hiking Boots",
19 "path": "Apparel > Footwear > Boots",
20 "keywords": [
21 "hiking",
22 "trail",
23 "trekking",
24 "waterproof",
25 ],
26 },
27 {
28 "id": "footwear-sneakers",
29 "name": "Sneakers",
30 "path": "Apparel > Footwear > Sneakers",
31 "keywords": [
32 "sneaker",
33 "trainer",
34 "running",
35 ],
36 },
37 ],
38}
39
40
41run = client.actor("webdata_labs/ai-product-taxonomy-mapper-api").call(run_input=run_input)
42
43
44print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
45for item in client.dataset(run["defaultDatasetId"]).iterate_items():
46 print(item)
47
48