1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "specificHashtags",
12 "maxItems": 10,
13 "hashtags": [
14 "fyp",
15 "foryou",
16 "viral",
17 "trending",
18 "tiktok",
19 "dance",
20 "comedy",
21 "food",
22 "travel",
23 "fashion",
24 "beauty",
25 "makeup",
26 "skincare",
27 "fitness",
28 "workout",
29 "gym",
30 "motivation",
31 "lifestyle",
32 "ootd",
33 "style",
34 "cooking",
35 "recipe",
36 "diy",
37 "art",
38 "music",
39 "singing",
40 "guitar",
41 "piano",
42 "pets",
43 "cat",
44 "dog",
45 "puppy",
46 "funny",
47 "meme",
48 "prank",
49 "challenge",
50 "duet",
51 "trend",
52 "instagood",
53 "love",
54 "happy",
55 "sunset",
56 "nature",
57 "sports",
58 "football",
59 "basketball",
60 "gaming",
61 "fortnite",
62 "roblox",
63 "minecraft"
64 ],
65 "period": 7,
66 "countryCode": "US"
67};
68
69
70const run = await client.actor("parseforge/tiktok-hashtag-analytics-scraper").call(input);
71
72
73console.log('Results from dataset');
74console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
75const { items } = await client.dataset(run.defaultDatasetId).listItems();
76items.forEach((item) => {
77 console.dir(item);
78});
79
80