limit on .api.library.playlists()?

Been playing around trying to pull my cloud playlists using musickit.js however it seems there's a max limit of 100? How do I change that?



let apple_player = MusicKit.getInstance();

var params = { limit: 2000 }

let apple_playlists = apple_player.api.library.playlists(params).then ( function( playlists ) {

// user's cloudPlaylists

alert ( playlists.length);

console.log( JSON.stringify(playlists) );

});


this only returns 100.

From the raw endpoint https://developer.apple.com/documentation/applemusicapi/get_all_library_playlists it seems unlikely you'll be able to fetch more than 100 playlists. You can paginate through the results using "offset" in your params object or by using the "next" link returned (though I haven't found a nice way of using the "next" link directly with MusicKit JS, aside from crafting a request manually).

limit on .api.library.playlists()?
 
 
Q