1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "video_urls": ["https://www.youtube.com/watch?v=veRbckoCwkc"],
10 "what_to_extract": "Extract detailed information about the supplements discussed, including dosages, benefits, and foundational habits required.",
11 "schema": {
12 "main_topic": {
13 "type": "String",
14 "description": "The overarching theme of the discussion",
15 },
16 "supplements_mentioned": {
17 "type": "Array",
18 "description": "List of all supplements discussed",
19 "items": {
20 "type": "Object",
21 "description": "Information about a specific supplement",
22 "properties": {
23 "name": {
24 "type": "String",
25 "description": "Name of the supplement",
26 },
27 "recommended_dosage_mg": {
28 "type": "Number",
29 "description": "Recommended daily dosage in milligrams",
30 },
31 },
32 },
33 },
34 },
35}
36
37
38run = client.actor("invideoiq/ai-video-data-extractor").call(run_input=run_input)
39
40
41print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
42for item in client.dataset(run["defaultDatasetId"]).iterate_items():
43 print(item)
44
45