1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "explore",
10 "exploreFeeds": ["trending"],
11 "playlistUrls": [
12 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0",
13 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0?page=2",
14 ],
15 "profileUrls": ["https://suno.com/@suno"],
16 "startUrls": [
17 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0",
18 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0?page=2",
19 "https://suno.com/@suno",
20 "https://suno.com/@suno?sort=created_at",
21 "https://suno.com/explore",
22 "https://suno.com/song/12ff82e8-88f7-407a-969d-dd1023df26a3",
23 ],
24 "profileSortBy": "upvote_count",
25 "followProfilePlaylists": False,
26 "includeLyrics": True,
27 "includeComments": False,
28 "maxCommentsPerSong": 20,
29 "maxItems": 20,
30 "maxPages": 0,
31 "proxyConfiguration": { "useApifyProxy": True },
32 "incrementalMode": False,
33 "emitUnchanged": False,
34 "emitExpired": False,
35 "ignoreFieldsForChanges": [],
36 "maxNotifyListings": 50,
37}
38
39
40run = client.actor("abotapi/suno-music-scraper").call(run_input=run_input)
41
42
43print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
44for item in client.dataset(run.default_dataset_id).iterate_items():
45 print(item)
46
47