1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "search": [
10 "anime",
11 "tiktok",
12 ],
13 "startUrls": [
14 "https://www.tiktok.com/search?q=%23music&t=1670685477846",
15 "https://www.tiktok.com/search?q=%23dance&t=1670685484412",
16 "https://www.tiktok.com/search?q=%23challenge&t=1670685494590",
17 ],
18 "maxItems": 10,
19 "endPage": 1,
20 "extendOutputFunction": "($) => { return {} }",
21 "customMapFunction": "(object) => { return {...object} }",
22 "proxy": { "useApifyProxy": True },
23}
24
25
26run = client.actor("epctex/tiktok-hashtag-scraper").call(run_input=run_input)
27
28
29print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
30for item in client.dataset(run["defaultDatasetId"]).iterate_items():
31 print(item)
32
33