1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "videoUrls": [
10 "https://www.youtube.com/shorts/C4exbdl5H-s",
11 "https://www.tiktok.com/@tiktok/video/7681695065927912735",
12 ],
13 "datasetVideoField": "videoUrl",
14 "layers": [
15 "transcriptSegments",
16 "transcriptFull",
17 "hook",
18 "onscreenText",
19 "keywords",
20 "chapters",
21 ],
22 "language": "auto",
23 "hookSeconds": 3,
24 "whisperModel": "small",
25 "ocrMaxVideoSeconds": 180,
26 "timeoutPerVideo": 240,
27 "proxyConfiguration": {
28 "useApifyProxy": True,
29 "apifyProxyGroups": ["RESIDENTIAL"],
30 },
31}
32
33
34run = client.actor("ntriqpro/video-transcript-hooks").call(run_input=run_input)
35
36
37print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
38for item in client.dataset(run.default_dataset_id).iterate_items():
39 print(item)
40
41