1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "profiles": ["nasa"],
10 "resultsPerPage": 100,
11 "resultsPerHashtag": 100,
12 "commentsPerPost": 0,
13 "maxRepliesPerComment": 0,
14 "selectedFields": [
15 "id",
16 "webVideoUrl",
17 "text",
18 "createTime",
19 "createTimeISO",
20 "playCount",
21 "diggCount",
22 "commentCount",
23 "shareCount",
24 "collectCount",
25 "hashtags",
26 "mentions",
27 "authorMeta",
28 "musicMeta",
29 "videoMeta",
30 "input",
31 "fromProfileSection",
32 ],
33}
34
35
36run = client.actor("esdrasdw/tiktok-scraper").call(run_input=run_input)
37
38
39print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
40for item in client.dataset(run.default_dataset_id).iterate_items():
41 print(item)
42
43