soundcloud-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,787 @@
1
+ // Copyright (c) 2026 BlazeInferno64 --> https://github.com/blazeinferno64.
2
+ //
3
+ // Author(s) -> BlazeInferno64
4
+ //
5
+ // Last updated: 09/09/2026
6
+
7
+ // Type definitions for 'soundcloud-core'
8
+
9
+ /// <reference types="node" />
10
+ /// <reference lib="dom" />
11
+ /// <reference lib="dom.iterable" />
12
+
13
+ /**
14
+ * Basic artist/uploader information attached to a track.
15
+ */
16
+ interface Artist {
17
+ /**
18
+ * The unique identifier for the artist.
19
+ */
20
+ id: number;
21
+ /**
22
+ * The username of the artist on SoundCloud.
23
+ */
24
+ username: string;
25
+ /**
26
+ * The URL of the artist's profile on SoundCloud.
27
+ */
28
+ profileUrl: string;
29
+ /**
30
+ * The URL of the artist's avatar image on SoundCloud.
31
+ */
32
+ avatarUrl: string;
33
+ }
34
+
35
+ /**
36
+ * Engagement statistics for a single track.
37
+ */
38
+ interface Stats {
39
+ /**
40
+ * The number of times the track has been played on SoundCloud.
41
+ */
42
+ plays: number;
43
+ /**
44
+ * The number of likes the track has received on SoundCloud.
45
+ */
46
+ likes: number;
47
+ /**
48
+ * The number of times the track has been reposted on SoundCloud.
49
+ */
50
+ reposts: number;
51
+ /**
52
+ * The number of comments the track has received on SoundCloud.
53
+ */
54
+ comments: number;
55
+ }
56
+
57
+ /**
58
+ * Fully resolved metadata for a single SoundCloud track, including a
59
+ * playable (though short-lived) stream URL.
60
+ */
61
+ interface MetaData {
62
+ /**
63
+ * The unique identifier for the track.
64
+ */
65
+ id: number;
66
+ /**
67
+ * The title of the track.
68
+ */
69
+ title: string;
70
+ /**
71
+ * The description of the track.
72
+ */
73
+ description: string;
74
+ /**
75
+ * The duration of the track in milliseconds (ms).
76
+ */
77
+ duration: number;
78
+ /**
79
+ * The genre of the track.
80
+ */
81
+ genre: string;
82
+ /**
83
+ * The date and time when the track was created, in ISO 8601 format.
84
+ */
85
+ createdAt: string;
86
+ /**
87
+ * The artist information associated with the track.
88
+ */
89
+ artist: Artist;
90
+ /**
91
+ * The URL of the artwork image for the track.
92
+ */
93
+ artworkUrl: string;
94
+ /**
95
+ * The album associated with the track, if any.
96
+ */
97
+ album: string | null;
98
+ /**
99
+ * The label associated with the track, if any. If the track is not associated with a label, this property will be null.
100
+ */
101
+ label: string | null;
102
+ /**
103
+ * The URL of the track's streamable audio file. This URL can be used to stream the track's audio.
104
+ *
105
+ * **Please note that the stream URLs are short-lived and may expire after a certain period of time**
106
+ */
107
+ streamUrl: string;
108
+ /**
109
+ * The authorization token required to access the track's streamable audio file. This token is used in conjunction with the stream URL to authenticate the request for streaming the track.
110
+ */
111
+ trackAuthorization: string;
112
+ /**
113
+ * Stats associated with the track, including plays, likes, reposts, and comments.
114
+ */
115
+ stats: Stats;
116
+ }
117
+
118
+ /**
119
+ * Geographic location information for a user, as set on their profile.
120
+ */
121
+ interface LocationInfo {
122
+ /**
123
+ * The city where the user is located, if specified.
124
+ */
125
+ city: string | null;
126
+ /**
127
+ * The country where the user is located, if specified.
128
+ */
129
+ country: string | null;
130
+ }
131
+
132
+ /**
133
+ * Verification and subscription-tier badges shown next to a username.
134
+ */
135
+ interface Badges {
136
+ /**
137
+ * Indicates whether the user account is verified by SoundCloud.
138
+ */
139
+ verified: boolean;
140
+ /**
141
+ * Indicates whether the user holds a Pro subscription tier.
142
+ */
143
+ pro: boolean;
144
+ /**
145
+ * Indicates whether the user holds a Pro Unlimited subscription tier.
146
+ */
147
+ proUnlimited: boolean;
148
+ }
149
+
150
+ /**
151
+ * Subscription information tied to a user's account.
152
+ */
153
+ interface Subscriptions {
154
+ /**
155
+ * A list of active creator-specific subscriptions.
156
+ */
157
+ creatorSubscriptions: any[];
158
+ /**
159
+ * The current creator subscription tier level (e.g., 'free').
160
+ */
161
+ creatorSubscription: string;
162
+ }
163
+
164
+ /**
165
+ * A user's "station" is what SoundCloud autoplays after their tracks
166
+ * finish (their own auto-generated radio mix).
167
+ */
168
+ interface Station {
169
+ /**
170
+ * The Uniform Resource Name for the artist's automated station playlist.
171
+ */
172
+ urn: string | null;
173
+ /**
174
+ * The permalink identifier for the artist station.
175
+ */
176
+ permalink: string | null;
177
+ }
178
+
179
+ /**
180
+ * A single external link listed in a profile's "Links" section
181
+ * (personal site, Instagram, Twitter/X, etc.).
182
+ */
183
+ interface WebProfile {
184
+ /**
185
+ * The network/platform the link belongs to (e.g. "instagram", "personal").
186
+ */
187
+ network: string;
188
+ /**
189
+ * The display title of the link, if the user set a custom one.
190
+ */
191
+ title: string | null;
192
+ /**
193
+ * The full URL of the linked resource.
194
+ */
195
+ url: string;
196
+ }
197
+
198
+ /**
199
+ * Aggregate activity and engagement metrics shown on a user's profile page.
200
+ */
201
+ interface UserStats {
202
+ /**
203
+ * The total count of users following this profile.
204
+ */
205
+ followers: number;
206
+ /**
207
+ * The total count of users this profile follows.
208
+ */
209
+ following: number;
210
+ /**
211
+ * The total number of audio tracks uploaded by the user.
212
+ */
213
+ tracks: number;
214
+ /**
215
+ * The total number of playlists created by the user.
216
+ */
217
+ playlists: number;
218
+ /**
219
+ * The number of playlists liked by the user.
220
+ */
221
+ playlistLikes: number;
222
+ /**
223
+ * The number of tracks liked by the user.
224
+ */
225
+ likes: number;
226
+ /**
227
+ * The number of reposts made by the user, if available.
228
+ */
229
+ reposts: number | null;
230
+ /**
231
+ * The number of comments posted by the user.
232
+ */
233
+ comments: number;
234
+ /**
235
+ * The number of community groups the user has joined.
236
+ */
237
+ groups: number;
238
+ /**
239
+ * The user's birth date, if provided.
240
+ */
241
+ dateOfBirth: string | null;
242
+ }
243
+
244
+ /**
245
+ * Fully resolved profile data for a SoundCloud user.
246
+ */
247
+ interface Profile {
248
+ /**
249
+ * The unique numerical identifier for the user account.
250
+ */
251
+ id: number;
252
+ /**
253
+ * The SoundCloud Uniform Resource Name for the user entity (e.g. "soundcloud:users:1197971329").
254
+ * Useful if you're caching/de-duping across requests.
255
+ */
256
+ urn: string | null;
257
+ /**
258
+ * The unique display username of the user.
259
+ */
260
+ username: string;
261
+ /**
262
+ * The first name associated with the account.
263
+ */
264
+ firstName: string | null;
265
+ /**
266
+ * The last name associated with the account, if any.
267
+ */
268
+ lastName: string | null;
269
+ /**
270
+ * The combined full name of the user.
271
+ */
272
+ fullName: string | null;
273
+ /**
274
+ * The URL-friendly path slug for the user profile (e.g. "blazeinferno64"), as opposed to the full `permalinkUrl` below.
275
+ */
276
+ permalink: string | null;
277
+ /**
278
+ * The full public web URL to the user's SoundCloud profile.
279
+ */
280
+ permalinkUrl: string;
281
+ /**
282
+ * The user bio or profile description text.
283
+ */
284
+ description: string | null;
285
+ /**
286
+ * The entity classification type. Should always be "user" for a resolved profile, but included for completeness.
287
+ */
288
+ kind: string | null;
289
+ /**
290
+ * Geographic location information for the user.
291
+ */
292
+ location: LocationInfo;
293
+ /**
294
+ * The direct image URL for the user's profile avatar.
295
+ */
296
+ avatarUrl: string | undefined;
297
+ /**
298
+ * The direct image URL for the user's profile header banner, taken from the profile's `visuals` data. `null` if the user hasn't set one.
299
+ */
300
+ headerUrl: string | null;
301
+ /**
302
+ * Verification and pro status badge flags.
303
+ */
304
+ badges: Badges;
305
+ /**
306
+ * Detailed information on active account subscriptions.
307
+ */
308
+ subscriptions: Subscriptions;
309
+ /**
310
+ * An array of linked external social or web link objects, from the profile's "Links" section.
311
+ */
312
+ webProfiles: WebProfile[];
313
+ /**
314
+ * The automated radio station stream configuration for the artist.
315
+ */
316
+ station: Station;
317
+ /**
318
+ * Quantitative metrics tracking activity, engagement, and library size for the user.
319
+ */
320
+ stats: UserStats;
321
+ /**
322
+ * The ISO timestamp indicating when the user account was created, if available.
323
+ */
324
+ createdAt: string | null;
325
+ /**
326
+ * The ISO timestamp of the most recent profile modification, if available.
327
+ */
328
+ lastModified: string | null;
329
+ }
330
+
331
+ /**
332
+ * A single track result returned from a search query. A lighter-weight
333
+ * shape than {@link MetaData} - it's a search candidate, not a fully
334
+ * resolved track, so it has no `streamUrl` or `trackAuthorization`.
335
+ */
336
+ interface Search {
337
+ /**
338
+ * The unique identifier for the track.
339
+ */
340
+ id: number;
341
+ /**
342
+ * The title of the track.
343
+ */
344
+ title: string;
345
+ /**
346
+ * The permalink URL of the track on SoundCloud.
347
+ */
348
+ permalinkUrl: string;
349
+ /**
350
+ * The duration of the track in milliseconds (ms).
351
+ */
352
+ duration: number;
353
+ /**
354
+ * The genre of the track.
355
+ */
356
+ genre: string;
357
+ /**
358
+ * The URL of the artwork image for the track. This can be used to display the track's cover art in applications or websites.
359
+ */
360
+ artworkUrl: string | undefined;
361
+ /**
362
+ * The artist information associated with the track, including the artist's ID, username, profile URL, and avatar URL.
363
+ */
364
+ artist: Artist;
365
+ /**
366
+ * The stats associated with the track, including the number of plays, likes, reposts, and comments. This information can be used to display the track's popularity and engagement metrics.
367
+ */
368
+ stats: Stats;
369
+ }
370
+
371
+ /**
372
+ * Minimal artist information attached to a track inside a playlist.
373
+ * Unlike {@link Artist}, this shape has no `avatarUrl` since playlist
374
+ * track data doesn't inline it.
375
+ */
376
+ interface PlaylistTrackArtist {
377
+ /**
378
+ * The unique identifier for the artist.
379
+ */
380
+ id: number;
381
+ /**
382
+ * The username of the artist on SoundCloud.
383
+ */
384
+ username: string;
385
+ /**
386
+ * The URL of the artist's profile on SoundCloud.
387
+ */
388
+ profileUrl: string;
389
+ }
390
+
391
+ /**
392
+ * A single track entry within a resolved playlist. Fields are nullable
393
+ * because a track stub that couldn't be resolved (deleted, private, or
394
+ * geo-blocked) still needs to appear in the list, just with empty data.
395
+ */
396
+ interface PlaylistTrack {
397
+ /**
398
+ * The unique identifier for the track. Always present, even for an unresolved/stub track.
399
+ */
400
+ id: number;
401
+ /**
402
+ * The title of the track. `null` if the track could not be resolved.
403
+ */
404
+ title: string | null;
405
+ /**
406
+ * The permalink URL of the track on SoundCloud. `null` if the track could not be resolved.
407
+ */
408
+ permalinkUrl: string | null;
409
+ /**
410
+ * The duration of the track in milliseconds (ms). `null` if the track could not be resolved.
411
+ */
412
+ duration: number | null;
413
+ /**
414
+ * The genre of the track. `null` if the track could not be resolved.
415
+ */
416
+ genre: string | null;
417
+ /**
418
+ * The URL of the artwork image for the track, falling back to the artist's avatar. `null` if the track could not be resolved.
419
+ */
420
+ artworkUrl: string | null;
421
+ /**
422
+ * The artist information associated with the track. `null` if the track could not be resolved.
423
+ */
424
+ artist: PlaylistTrackArtist | null;
425
+ }
426
+
427
+ /**
428
+ * Information about the user who curated (created) a playlist.
429
+ */
430
+ interface PlaylistCurator {
431
+ /**
432
+ * The unique identifier for the curator.
433
+ */
434
+ id: number;
435
+ /**
436
+ * The username of the curator on SoundCloud.
437
+ */
438
+ username: string;
439
+ /**
440
+ * The URL of the curator's profile on SoundCloud.
441
+ */
442
+ profileUrl: string;
443
+ /**
444
+ * The URL of the curator's avatar image on SoundCloud.
445
+ */
446
+ avatarUrl: string | undefined;
447
+ }
448
+
449
+ /**
450
+ * Engagement statistics for a playlist.
451
+ */
452
+ interface PlaylistStats {
453
+ /**
454
+ * The number of likes the playlist has received on SoundCloud.
455
+ */
456
+ likes: number;
457
+ /**
458
+ * The number of times the playlist has been reposted on SoundCloud.
459
+ */
460
+ reposts: number;
461
+ }
462
+
463
+ /**
464
+ * Fully resolved metadata for a SoundCloud playlist (or "set"), including
465
+ * its populated track list.
466
+ */
467
+ interface Playlist {
468
+ /**
469
+ * The unique identifier for the playlist.
470
+ */
471
+ id: number;
472
+ /**
473
+ * The title of the playlist.
474
+ */
475
+ title: string;
476
+ /**
477
+ * The description of the playlist, if any.
478
+ */
479
+ description: string | null;
480
+ /**
481
+ * The permalink URL of the playlist on SoundCloud.
482
+ */
483
+ permalinkUrl: string;
484
+ /**
485
+ * The total number of tracks in the playlist on SoundCloud. Not affected by the `limit` option passed to {@link SoundCloudClient.getPlaylist} - see `tracks.length` for how many actually came back.
486
+ */
487
+ trackCount: number;
488
+ /**
489
+ * The total duration of the playlist in milliseconds (ms).
490
+ */
491
+ duration: number;
492
+ /**
493
+ * The genre of the playlist.
494
+ */
495
+ genre: string;
496
+ /**
497
+ * The date and time when the playlist was created, in ISO 8601 format.
498
+ */
499
+ createdAt: string;
500
+ /**
501
+ * The user who created/curated the playlist.
502
+ */
503
+ curator: PlaylistCurator;
504
+ /**
505
+ * The URL of the artwork image for the playlist, falling back to the curator's avatar.
506
+ */
507
+ artworkUrl: string | undefined;
508
+ /**
509
+ * Engagement stats for the playlist, including likes and reposts.
510
+ */
511
+ stats: PlaylistStats;
512
+ /**
513
+ * The resolved list of tracks in the playlist, up to the requested `limit`.
514
+ */
515
+ tracks: PlaylistTrack[];
516
+ }
517
+
518
+ /**
519
+ * Options accepted by the {@link SoundCloudClient} constructor.
520
+ */
521
+ interface SoundCloudClientOptions {
522
+ /**
523
+ * A custom `User-Agent` header to use for all outgoing requests. Falls back to a built-in default user agent when omitted.
524
+ */
525
+ userAgent?: string;
526
+ /**
527
+ * A pre-fetched SoundCloud `client_id` to use for all requests. When omitted, one is fetched automatically the first time it's needed.
528
+ */
529
+ clientId?: string;
530
+ }
531
+
532
+ /**
533
+ * Options accepted by {@link SoundCloudClient.getMetaData}.
534
+ */
535
+ interface SongOptions {
536
+ /**
537
+ * The full SoundCloud URL of the track to resolve.
538
+ */
539
+ url: string;
540
+ /**
541
+ * A custom `User-Agent` header to use for this request only. Falls back to the client's configured user agent when omitted.
542
+ */
543
+ userAgent?: string;
544
+ }
545
+
546
+ /**
547
+ * How many tracks to include when resolving a playlist: a positive
548
+ * integer, or the string `"max"` to return every track in the playlist.
549
+ */
550
+ type PlaylistLimit = number | "max";
551
+
552
+ /**
553
+ * Options accepted by {@link SoundCloudClient.getPlaylist}.
554
+ */
555
+ interface PlaylistOptions {
556
+ /**
557
+ * The full SoundCloud URL of the playlist (or "set") to resolve.
558
+ */
559
+ url: string;
560
+ /**
561
+ * A custom `User-Agent` header to use for this request only. Falls back to the client's configured user agent when omitted.
562
+ */
563
+ userAgent?: string;
564
+ /**
565
+ * How many tracks to include in the resolved playlist - a positive integer, or `"max"` for the entire playlist. Defaults to `10`.
566
+ */
567
+ limit?: PlaylistLimit;
568
+ }
569
+
570
+ /**
571
+ * Options accepted by {@link SoundCloudClient.getProfile}.
572
+ */
573
+ interface ProfileOptions {
574
+ /**
575
+ * Either a bare username (e.g. `"BlazeInferno64"`) or a full SoundCloud profile URL.
576
+ */
577
+ username: string;
578
+ /**
579
+ * A custom `User-Agent` header to use for this request only. Falls back to the client's configured user agent when omitted.
580
+ */
581
+ userAgent?: string;
582
+ }
583
+
584
+ /**
585
+ * Options accepted by {@link SoundCloudClient.search}. Any additional
586
+ * search-tuning properties beyond `query` and `userAgent` are passed
587
+ * through to the underlying search request.
588
+ */
589
+ interface SearchOptions {
590
+ /**
591
+ * The search query text to look up tracks for.
592
+ */
593
+ query: string;
594
+ /**
595
+ * A custom `User-Agent` header to use for this request only. Falls back to the client's configured user agent when omitted.
596
+ */
597
+ userAgent?: string;
598
+ /**
599
+ * The maximum number of results to return. Defaults to `10`, matching the web app's initial batch size.
600
+ */
601
+ limit?: number;
602
+ /**
603
+ * Additional, forward-compatible search options passed through to the underlying SoundCloud search request.
604
+ */
605
+ [key: string]: any;
606
+ }
607
+
608
+ /**
609
+ * A lightweight, dependency-driven client for interacting with SoundCloud's
610
+ * unofficial `api-v2` endpoints - resolving tracks, playlists, and user
611
+ * profiles, and searching for tracks, without requiring an official API key.
612
+ *
613
+ * @example
614
+ * ```js
615
+ * const { SoundCloudClient } = require('soundcloud-core');
616
+ *
617
+ * const client = new SoundCloudClient();
618
+ *
619
+ * const track = await client.getMetaData({ url: 'https://soundcloud.com/martingarrix/martin-garrix-animals-original' });
620
+ * // Logs the streammable cdn url of the track, which is short-lived and expires after a few minutes.
621
+ * console.log(track.streamUrl);
622
+ * ```
623
+ */
624
+ declare class SoundCloudClient {
625
+ /**
626
+ * Creates a new SoundCloud client instance.
627
+ *
628
+ * @param options - Optional configuration for the client.
629
+ * @param options.userAgent - A custom `User-Agent` header to use for all requests made by this client. Defaults to a built-in user agent when omitted.
630
+ * @param options.clientId - A pre-fetched SoundCloud `client_id` to reuse. When omitted, a fresh one is fetched automatically the first time it's needed.
631
+ *
632
+ * @example
633
+ * ```js
634
+ * // Use built-in defaults, fetching a client_id lazily on first use
635
+ * const client = new SoundCloudClient();
636
+ *
637
+ * // Or provide your own user agent and/or client_id up front
638
+ * const client2 = new SoundCloudClient({ clientId: 'your_client_id' });
639
+ * ```
640
+ */
641
+ constructor(options?: SoundCloudClientOptions);
642
+
643
+ /**
644
+ * Returns the client's current SoundCloud `client_id`, fetching a fresh
645
+ * one automatically if none has been set yet.
646
+ *
647
+ * @returns A promise that resolves with the client's `client_id`.
648
+ *
649
+ * @example
650
+ * ```js
651
+ * const clientId = await client.getClientId();
652
+ * // Returns a string type value
653
+ * ```
654
+ */
655
+ getClientId(): Promise<string>;
656
+
657
+ /**
658
+ * Resolves a SoundCloud track URL into fully populated metadata,
659
+ * including a playable stream URL.
660
+ *
661
+ * @param songOptions - Options describing which track to fetch.
662
+ * @param songOptions.url - The full SoundCloud URL of the track to resolve.
663
+ * @param songOptions.userAgent - A custom `User-Agent` header for this request only.
664
+ *
665
+ * @returns A promise that resolves with the track's {@link MetaData}.
666
+ *
667
+ * @throws If no URL is provided, no client ID is available, the URL doesn't resolve to a track, or no playable stream could be found.
668
+ *
669
+ * @example
670
+ * ```js
671
+ * const track = await client.getMetaData({ url: 'https://soundcloud.com/martingarrix/martin-garrix-animals-original' });
672
+ * console.log(track.title, track.streamUrl);
673
+ * ```
674
+ */
675
+ getMetaData(songOptions: SongOptions): Promise<MetaData>;
676
+
677
+ /**
678
+ * Resolves a SoundCloud playlist (or "set") URL into fully populated
679
+ * metadata, including its track list.
680
+ *
681
+ * @param playlistOptions - Options describing which playlist to fetch.
682
+ * @param playlistOptions.url - The full SoundCloud URL of the playlist to resolve.
683
+ * @param playlistOptions.userAgent - A custom `User-Agent` header for this request only.
684
+ * @param playlistOptions.limit - How many tracks to include - a positive integer, or `"max"` for every track. Defaults to `10`.
685
+ *
686
+ * @returns A promise that resolves with the {@link Playlist}.
687
+ *
688
+ * @throws If no URL is provided, no client ID is available, the URL doesn't resolve to a playlist, or an invalid `limit` is given.
689
+ *
690
+ * @example
691
+ * ```js
692
+ * // Only the first 5 tracks
693
+ * const playlist = await client.getPlaylist({ url: 'https://soundcloud.com/blazeinferno64/sets/only-house', limit: 5 });
694
+ *
695
+ * // The entire playlist
696
+ * const fullPlaylist = await client.getPlaylist({ url: 'https://soundcloud.com/blazeinferno64/sets/only-house', limit: 'max' });
697
+ * ```
698
+ */
699
+ getPlaylist(playlistOptions: PlaylistOptions): Promise<Playlist[]>;
700
+
701
+ /**
702
+ * Resolves a SoundCloud username or profile URL into fully populated
703
+ * profile data.
704
+ *
705
+ * @param profileOptions - Options describing which profile to fetch.
706
+ * @param profileOptions.username - Either a bare username (e.g. `"BlazeInferno64"`) or a full profile URL.
707
+ * @param profileOptions.userAgent - A custom `User-Agent` header for this request only.
708
+ *
709
+ * @returns A promise that resolves with the {@link Profile}.
710
+ *
711
+ * @throws If no username/URL is provided, no client ID is available, or the URL doesn't resolve to a user profile.
712
+ *
713
+ * @example
714
+ * ```js
715
+ * // Attaching my profile for example purposes :)
716
+ * const profile = await client.getProfile({ username: 'BlazeInferno64' });
717
+ * console.log(profile.stats.followers);
718
+ * ```
719
+ */
720
+ getProfile(profileOptions: ProfileOptions): Promise<Profile>;
721
+
722
+ /**
723
+ * Searches SoundCloud for tracks matching a query.
724
+ *
725
+ * @param searchOptions - Options describing the search.
726
+ * @param searchOptions.query - The search query text.
727
+ * @param searchOptions.userAgent - A custom `User-Agent` header for this request only.
728
+ * @param searchOptions.limit - The maximum number of results to return. Defaults to `10`.
729
+ *
730
+ * @returns A promise that resolves with an array of matching {@link Search} results. Resolves to an empty array if the search returns no results.
731
+ *
732
+ * @throws If no query is provided, no client ID is available, or the search request fails.
733
+ *
734
+ * @example
735
+ * ```js
736
+ * const results = await client.search({ query: 'Martin Garrix - Animals', limit: 20 });
737
+ * // Logs the titles of the first 20 search results
738
+ * results.forEach(track => console.log(track.title));
739
+ * ```
740
+ */
741
+ search(searchOptions: SearchOptions): Promise<Search[]>;
742
+ }
743
+
744
+ declare namespace soundcloudJs {
745
+ export {
746
+ SoundCloudClient,
747
+ SoundCloudClientOptions,
748
+ SongOptions,
749
+ PlaylistOptions,
750
+ PlaylistLimit,
751
+ ProfileOptions,
752
+ SearchOptions,
753
+ MetaData,
754
+ Profile,
755
+ Playlist,
756
+ Search,
757
+ Artist,
758
+ Stats,
759
+ LocationInfo,
760
+ Badges,
761
+ Subscriptions,
762
+ Station,
763
+ WebProfile,
764
+ UserStats,
765
+ PlaylistTrack,
766
+ PlaylistTrackArtist,
767
+ PlaylistCurator,
768
+ PlaylistStats
769
+ }
770
+ }
771
+
772
+
773
+ /**
774
+ * soundcloud-core is a Fast, Minimalist, Unofficial SoundCloud v2 API client wrapper for [Node.js](https://nodejs.org)
775
+ *
776
+ * SoundCloud API Requests done right!
777
+ *
778
+ * Learn more about it from [here](https://github.com/blazeinferno64/soundcloud-core)
779
+ * @example
780
+ * // Require it in your project by doing -
781
+ * const { SoundCloudClient } = require("soundcloud-core");
782
+ *
783
+ * // Or import it to your project if its an ES module by doing -
784
+ * import { SoundCloudClient } from "soundcloud-core";
785
+ */
786
+ declare const soundcloud: typeof soundcloudJs;
787
+ export = soundcloud;