1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "hashtags": ["cooking"],
10 "contentType": "all",
11 "includeVideoStats": False,
12 "detectLanguage": False,
13 "includeChannelAnalytics": False,
14 "outputHashtag": True,
15 "outputVideoId": True,
16 "outputVideoUrl": True,
17 "outputTitle": True,
18 "outputChannelName": True,
19 "outputChannelId": True,
20 "outputChannelUrl": True,
21 "outputIsVerified": True,
22 "outputThumbnailUrl": True,
23 "outputViewCount": True,
24 "outputViewCountText": True,
25 "outputPublishedText": True,
26 "outputDuration": True,
27 "outputDurationSeconds": True,
28 "outputContentType": True,
29 "outputScrapedAt": True,
30 "concurrency": 3,
31 "proxyConfig": {
32 "useApifyProxy": True,
33 "apifyProxyGroups": [],
34 },
35}
36
37
38run = client.actor("lurkapi/youtube-hashtag-scraper").call(run_input=run_input)
39
40
41print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
42for item in client.dataset(run["defaultDatasetId"]).iterate_items():
43 print(item)
44
45