1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "videoUrls": [
12 "https://www.instagram.com/reel/DckEW9NNVsJ/",
13 "https://www.instagram.com/reel/DcfuoMqAoHE/"
14 ],
15 "profiles": [],
16 "searchQueries": [
17 "morning routine"
18 ],
19 "hashtags": [],
20 "resultsLimitPerProfile": 10,
21 "searchSort": "most-viewed",
22 "resultsLimitPerSearch": 10,
23 "minViews": 0,
24 "skipPinned": false,
25 "skipVideosWithoutSpeech": false,
26 "compareWithAuthor": true,
27 "includeTranscriptSegments": true,
28 "includeSrt": false,
29 "chunkWords": 0,
30 "includeRunSummary": false,
31 "includeOnScreenText": false,
32 "aiAnalysis": false,
33 "onlyNewVideos": false,
34 "transcriptionMode": "captions-first",
35 "quality": "fast",
36 "language": "auto",
37 "maximumVideoDurationSeconds": 300,
38 "ocrFps": "1.5"
39};
40
41
42const run = await client.actor("lergassy/instagram-reels-transcript-scraper").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52