1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "types": [
12 "hashtags"
13 ],
14 "countries": [
15 "US"
16 ],
17 "maxItemsPerType": 1000,
18 "hashtagPeriods": [
19 "7"
20 ],
21 "hashtagIndustries": [
22 "all",
23 "10000000000",
24 "11000000000",
25 "12000000000",
26 "14000000000",
27 "15000000000",
28 "17000000000",
29 "18000000000",
30 "19000000000",
31 "21000000000",
32 "22000000000",
33 "23000000000",
34 "25000000000",
35 "27000000000",
36 "28000000000",
37 "29000000000"
38 ],
39 "videoPeriods": [
40 "7"
41 ],
42 "videoSortBy": [
43 "views"
44 ],
45 "videoContentTags": [
46 "all"
47 ],
48 "topAdsPeriods": [
49 "7"
50 ],
51 "topAdsIndustries": [
52 "all"
53 ],
54 "topAdsSortBy": [
55 "for_you"
56 ],
57 "proxyConfiguration": {
58 "useApifyProxy": true
59 }
60};
61
62
63const run = await client.actor("symphonic_mullite/tiktok-creative-center-trends").call(input);
64
65
66console.log('Results from dataset');
67console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
68const { items } = await client.dataset(run.defaultDatasetId).listItems();
69items.forEach((item) => {
70 console.dir(item);
71});
72
73