1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "html": `<!DOCTYPE html>
12<html><body>
13<div data-composition-id="demo" data-width="320" data-height="180" data-duration="1" data-no-timeline data-fps="30"
14 style="width:320px;height:180px;background:#222;color:#fff;display:flex;align-items:center;justify-content:center;">
15 Hello
16</div>
17</body></html>`,
18 "variables": {}
19};
20
21
22const run = await client.actor("optimdex/hyperframes-render").call(input);
23
24
25console.log('Results from dataset');
26console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
27const { items } = await client.dataset(run.defaultDatasetId).listItems();
28items.forEach((item) => {
29 console.dir(item);
30});
31
32