1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "prompt": "Check margin risk for SKU A100 at https://example.com/product. My cost is 22.50 and target margin is 38 percent. Return price, currency, availability, margin status, and recommended action.",
10 "products": [{
11 "sku": "SKU-1",
12 "productUrl": "https://example.com/product",
13 "cost": 20,
14 "targetMarginPercent": 35,
15 "competitorName": "Example Store",
16 }],
17}
18
19
20run = client.actor("techionik9993/techionik-commerce-margin-mcp").call(run_input=run_input)
21
22
23print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
24for item in client.dataset(run["defaultDatasetId"]).iterate_items():
25 print(item)
26
27