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 ],
18 "profileUrls": [
19 "https://suno.com/@suno"
20 ],
21 "profileSortBy": "upvote_count",
22 "followProfilePlaylists": false,
23 "includeLyrics": true,
24 "maxItems": 20,
25 "maxPages": 200,
26 "incrementalMode": false,
27 "emitUnchanged": false,
28 "emitExpired": false,
29 "maxNotifyListings": 50,
30 "proxyConfiguration": {
31 "useApifyProxy": true
32 }
33};
34
35
36const run = await client.actor("abotapi/suno-music-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46