1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "resolution": {
12 "width": 1080,
13 "height": 1920
14 },
15 "styling": {
16 "fontFamily": "Arial",
17 "fontSize": 80,
18 "fontWeight": "900",
19 "textColor": "#ffffff",
20 "highlightColor": "#ffff00",
21 "strokeColor": "#000000",
22 "strokeWidth": 4,
23 "yPosition": 80,
24 "textAlign": "center",
25 "maxWidth": 80,
26 "shadow": true
27 }
28};
29
30
31const run = await client.actor("eggvelop_official/caption-overlay-actor").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41