1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "products": [
9 {
10 "id": "EXAMPLE-YOGHURT",
11 "title": "Example low fat strawberry yoghurt 500 g",
12 "market": "EU",
13 "nutrition": {
14 "energy-kcal_100g": 98,
15 "fat_100g": 3.4,
16 "saturated-fat_100g": 2.1,
17 "sugars_100g": 12.5,
18 "proteins_100g": 4.2,
19 "salt_100g": 0.12,
20 },
21 },
22 {
23 "id": "EXAMPLE-BAR",
24 "title": "Example high protein cereal bar 40 g",
25 "market": "EU",
26 "nutrition": {
27 "energy-kcal_100g": 410,
28 "fat_100g": 15,
29 "sugars_100g": 22,
30 "fiber_100g": 7.5,
31 "proteins_100g": 18,
32 "salt_100g": 0.4,
33 },
34 },
35 {
36 "id": "EXAMPLE-JUICE",
37 "title": "Example apple drink 1 l, no added sugar",
38 "market": "UK",
39 "ingredients": "Water, apple juice from concentrate (30%), glucose-fructose syrup, acid: citric acid",
40 "nutrition": {
41 "energy-kcal_100g": 32,
42 "sugars_100g": 7.6,
43 },
44 },
45 {
46 "id": "EXAMPLE-CRACKERS",
47 "title": "Example whole wheat crackers, low sodium, good source of fiber",
48 "market": "US",
49 "nutrition": {
50 "energy-kcal_serving": 120,
51 "sodium_serving": "160 mg",
52 "fiber_serving": 3,
53 "fat_serving": 4,
54 },
55 },
56 ] }
57
58
59run = client.actor("ultimatemc/nutrition-claim-checker").call(run_input=run_input)
60
61
62print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
63for item in client.dataset(run.default_dataset_id).iterate_items():
64 print(item)
65
66