1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "hashtags": ["webscraping"],
10 "resultsPerPage": 10,
11 "sortBy": "relevance",
12 "excludePinnedPosts": False,
13 "oldestPostDateUnified": "",
14 "newestPostDate": "",
15 "shouldDownloadVideos": False,
16 "shouldDownloadCovers": False,
17 "shouldDownloadSlideshowImages": False,
18 "downloadSubtitlesOptions": "NEVER_DOWNLOAD_SUBTITLES",
19 "videoKvStoreIdOrName": "",
20 "disableTelemetry": False,
21}
22
23
24run = client.actor("meka.im/tiktok-hashtag-scraper").call(run_input=run_input)
25
26
27print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
28for item in client.dataset(run.default_dataset_id).iterate_items():
29 print(item)
30
31