1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "shortCode": "demo1",
14 "url": "https://example.com/demo/reel-1",
15 "ownerUsername": "demo_plant_shop",
16 "caption": "Why your plants keep dying (and the 1-finger test) #planttips #houseplants",
17 "videoUrl": "https://api.apify.com/v2/key-value-stores/gX2MMbYTVOB7INHXZ/records/reel1.mp4?signature=1HZVs1JtfomVXGswutKPH",
18 "videoPlayCount": 12400,
19 "likesCount": 610,
20 "commentsCount": 42,
21 "timestamp": "2026-10-20T17:00:00.000Z",
22 "videoDuration": 12.6,
23 "musicInfo": {
24 "uses_original_audio": true
25 }
26 },
27 {
28 "shortCode": "demo2",
29 "url": "https://example.com/demo/reel-2",
30 "ownerUsername": "demo_plant_shop",
31 "caption": "3 plants for dark rooms. Save it for your next shop trip 🌿",
32 "videoUrl": "https://api.apify.com/v2/key-value-stores/gX2MMbYTVOB7INHXZ/records/reel2.mp4?signature=Bx7PaWeo6NQGFfu7fsYM",
33 "videoPlayCount": 31800,
34 "likesCount": 2150,
35 "commentsCount": 96,
36 "timestamp": "2026-10-23T17:00:00.000Z",
37 "videoDuration": 11,
38 "musicInfo": {
39 "uses_original_audio": true
40 }
41 },
42 {
43 "shortCode": "demo3",
44 "url": "https://example.com/demo/reel-3",
45 "ownerUsername": "demo_plant_shop",
46 "caption": "Stop watering on a schedule. Free care guide in bio.",
47 "videoUrl": "https://api.apify.com/v2/key-value-stores/gX2MMbYTVOB7INHXZ/records/reel3.mp4?signature=13xhSgTd9FO1qjxlyQKWE",
48 "videoPlayCount": 8900,
49 "likesCount": 380,
50 "commentsCount": 18,
51 "timestamp": "2026-10-26T17:00:00.000Z",
52 "videoDuration": 9.6,
53 "musicInfo": {
54 "uses_original_audio": true
55 }
56 }
57 ],
58 "brandBrief": "Leafline is a small online shop for easy-care houseplants and pots, shipping across the EU. Audience: renters aged 22-35 who kill plants and live in small, dark flats. Tone: warm, a little self-deprecating, practical, no plant jargon. Goal: grow followers and send people to the free 'plant rescue' guide via the link in bio. Avoid: fear tactics, discount spam."
59};
60
61
62const run = await client.actor("seasons-ai/competitor-content-hooks").call(input);
63
64
65console.log('Results from dataset');
66console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
67const { items } = await client.dataset(run.defaultDatasetId).listItems();
68items.forEach((item) => {
69 console.dir(item);
70});
71
72