1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "targetUrls": ["https://www.youtube.com/@MrBeast"],
10 "maxChannelVideos": 50,
11 "maxChannelShorts": 0,
12 "includeChannelAbout": True,
13 "maxPlaylistVideos": 0,
14 "includeCommunityPosts": False,
15 "maxCommunityPostsPerChannel": 20,
16 "searchQueries": [],
17 "videosPerQuery": 10,
18 "shortsPerQuery": 0,
19 "streamsPerQuery": 0,
20 "fetchTranscripts": False,
21 "storeTranscriptsInKvs": False,
22 "transcriptLanguage": "en",
23 "preferAutoCaptions": False,
24 "transcriptFormat": "srt",
25 "resultsSortOrder": "",
26 "uploadDateFilter": "",
27 "contentTypeFilter": "",
28 "videoLengthFilter": "",
29 "videoIsHD": False,
30 "videoHasCC": False,
31 "videoIsCreativeCommons": False,
32 "videoIs3D": False,
33 "videoIsLive": False,
34 "videoIsPurchased": False,
35 "videoIs4K": False,
36 "videoIs360": False,
37 "videoHasLocation": False,
38 "videoIsHDR": False,
39 "videoIsVR180": False,
40 "publishedAfterDate": "",
41 "finalSortField": "",
42 "proxyConfiguration": { "useApifyProxy": False },
43}
44
45
46run = client.actor("simpleapi/youtube-scraper").call(run_input=run_input)
47
48
49print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
50for item in client.dataset(run["defaultDatasetId"]).iterate_items():
51 print(item)
52
53