1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "explore",
12 "exploreFeeds": [
13 "trending"
14 ],
15 "playlistUrls": [
16 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0",
17 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0?page=2"
18 ],
19 "profileUrls": [
20 "https://suno.com/@suno"
21 ],
22 "startUrls": [
23 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0",
24 "https://suno.com/playlist/0d597d0c-cdb2-4f9c-b4da-57931929f0d0?page=2",
25 "https://suno.com/@suno",
26 "https://suno.com/@suno?sort=created_at",
27 "https://suno.com/explore",
28 "https://suno.com/song/12ff82e8-88f7-407a-969d-dd1023df26a3"
29 ],
30 "profileSortBy": "upvote_count",
31 "followProfilePlaylists": false,
32 "includeLyrics": true,
33 "includeComments": false,
34 "maxCommentsPerSong": 20,
35 "maxItems": 20,
36 "maxPages": 0,
37 "proxyConfiguration": {
38 "useApifyProxy": true
39 },
40 "incrementalMode": false,
41 "emitUnchanged": false,
42 "emitExpired": false,
43 "ignoreFieldsForChanges": [],
44 "maxNotifyListings": 50
45};
46
47
48const run = await client.actor("abotapi/suno-music-scraper").call(input);
49
50
51console.log('Results from dataset');
52console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58