1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "template": "Amsterdam",
12 "backgroundVideoUrl": "https://reel-templates.roomjs.com/bg/amsterdam.mp4",
13 "audioUrl": "https://reel-templates.roomjs.com/audio/amsterdam.mp3",
14 "title": "Amsterdam",
15 "content": [
16 "1. Amsterdam has over 100 km of canals, earning it the nickname “Venice of the North”",
17 "2. There are more bicycles than people—around 1.2 bikes per resident",
18 "3. The city is built on millions of wooden poles driven deep into soft soil",
19 "4. Anne Frank wrote her diary while hiding in a canal house in Amsterdam",
20 "5. Many canal houses lean forward to help lift goods by pulley"
21 ],
22 "titleFont": "Helvetica",
23 "titleFontSize": "L",
24 "contentFont": "Roboto",
25 "contentFontSize": "S"
26};
27
28
29const run = await client.actor("room_js/reel-video-generator-apify-actor").call(input);
30
31
32console.log('Results from dataset');
33console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34const { items } = await client.dataset(run.defaultDatasetId).listItems();
35items.forEach((item) => {
36 console.dir(item);
37});
38
39