1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "products": [
9 {
10 "id": "EXAMPLE-COOKIES",
11 "title": "Example chocolate chip cookies",
12 "ingredients": "Enriched wheat flour, sugar, chocolate chips (sugar, cocoa butter, milk fat), butter, eggs, pecans, salt, soy lecithin.",
13 "contains": "Contains: wheat, milk, egg, soy.",
14 },
15 {
16 "id": "EXAMPLE-GRANOLA",
17 "title": "Example nut-free granola",
18 "claims": "Nut-free",
19 "ingredients": "Rolled oats, honey, sunflower seeds, coconut. May contain peanuts and tree nuts.",
20 },
21 {
22 "id": "EXAMPLE-CURRY",
23 "title": "Example coconut curry sauce",
24 "ingredients": "Coconut milk, water, onion, nutmeg, butternut squash, salt, spices.",
25 "contains": "Contains: coconut.",
26 },
27 {
28 "id": "EXAMPLE-CRACKERS",
29 "title": "Example sesame crackers",
30 "ingredients": "Wheat flour, sesame seeds, olive oil, salt.",
31 "contains": "Contains: wheat, sesame.",
32 },
33 ] }
34
35
36run = client.actor("ultimatemc/food-allergen-label-checker").call(run_input=run_input)
37
38
39print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
40for item in client.dataset(run.default_dataset_id).iterate_items():
41 print(item)
42
43