1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "upstream_source": "public",
12 "video_snapshot": {
13 "observed_at": "2026-10-28T09:51:22.853000+00:00",
14 "source": "clockworks/tiktok-video-scraper/5bzRfhtq8ggnuJ98L (saved example; not a live query)",
15 "records": [
16 {
17 "id": "7673512242951752973",
18 "creator": "tntdealss",
19 "url": "https://www.tiktok.com/@tntdealss/video/7673512242951752973",
20 "description": "Cozy at home 📽️ 🛌 #miniprojector #smartprojector #magcubicprojector #movienight #bedrotting ",
21 "view_count": 19800000,
22 "likes": 148700,
23 "comments": 428,
24 "shares": 23500,
25 "created_at": "2026-08-14T17:37:00+00:00",
26 "is_sponsored": true,
27 "is_ad": true
28 },
29 {
30 "id": "7697826975758535942",
31 "creator": "viralproducts1990",
32 "url": "https://www.tiktok.com/@viralproducts1990/video/7697826975758535942",
33 "description": "Mini Projector \n#gadgets #viral #tech #foryoupage #tiktok #fyp #viralvideo ",
34 "view_count": 27600,
35 "likes": 386,
36 "comments": 11,
37 "shares": 53,
38 "created_at": "2026-10-18T02:20:18+00:00",
39 "is_sponsored": false,
40 "is_ad": false
41 },
42 {
43 "id": "7694514643976555796",
44 "creator": "viralproducts1990",
45 "url": "https://www.tiktok.com/@viralproducts1990/video/7694514643976555796",
46 "description": "Gadgets \n#tech #tiktok #fyp #MiniProjector ",
47 "view_count": 87700,
48 "likes": 1278,
49 "comments": 29,
50 "shares": 179,
51 "created_at": "2026-10-09T04:06:52+00:00",
52 "is_sponsored": false,
53 "is_ad": false
54 }
55 ]
56 },
57 "proxyConfiguration": {
58 "useApifyProxy": false
59 },
60 "example_mode": true
61};
62
63
64const run = await client.actor("hirepulse/viral-product-radar").call(input);
65
66
67console.log('Results from dataset');
68console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
69const { items } = await client.dataset(run.defaultDatasetId).listItems();
70items.forEach((item) => {
71 console.dir(item);
72});
73
74