constSpotify=require("better-spotify-api");letspotify=newSpotify()//You can provide spotify url as well as query tooletdata=awaitspotify.search("https://open.spotify.com/playlist/1MuDVTTNqRmEUV1dzyfMnB?si=ffbe046d6b0c478b")letsong=awaitSpotity.search("Tum hi aana");
With ClientID and clientSecret
constSpotify=require("better-spotify-api");letspotify=newSpotify({clientID:"cb41529dc3bd4d8f8a240dbee0fff4e8",clientSecret:"bcca82f42930498aa385a8289fdf276b"})//You can provide spotify url as well as query tooletdata=awaitspotify.search("https://open.spotify.com/playlist/1MuDVTTNqRmEUV1dzyfMnB?si=ffbe046d6b0c478b")letsong=awaitSpotity.search("Tum hi aana");