
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
spotify-search-wrapper
Advanced tools
Spotify Search is a package to search for Spotify tracks and playlists without the need for a token, totally transparent to the user and that uses the official Spotify Web API.
Overview • Installation • Usage
Spotify Search is a package to search for Spotify tracks and playlists without the need for a token, totally transparent to the user and that uses the official Spotify Web API.
Package install with with npm
npm i spotify-search-wrapper
const spotifySearch = require("spotify-search-wrapper");
spotifySearch.searchTrack("Never Gonna Give You Up").then(tracks => {
console.log(tracks[0].id); // 4PTG3Z6ehGkBFwjybzWkR8
console.log(tracks[0].name); // Never Gonna Give You Up
console.log(tracks[0].href); // https://api.spotify.com/v1/tracks/4PTG3Z6ehGkBFwjybzWkR8
console.log(tracks[0].artists[0].name); // Rick Astley
});
const spotifySearch = require("spotify-search");
spotifySearch.searchPlaylist("Top 50 - Global").then(playlists => {
console.log(playlists[0].id); // 37i9dQZEVXbMDoHDwVN2tF
console.log(playlists[0].name); // Top 50 - Global
console.log(playlists[0].href); // https://api.spotify.com/v1/playlists/37i9dQZEVXbMDoHDwVN2tF
console.log(playlists[0].owner.id); // spotify
});
const spotifySearch = require("spotify-search");
await spotifySearch.getTrackInfoById("4PTG3Z6ehGkBFwjybzWkR8").then(track => {
console.log(track.id); // 4PTG3Z6ehGkBFwjybzWkR8
console.log(track.name); // Never Gonna Give You Up
console.log(track.href); // https://api.spotify.com/v1/tracks/4PTG3Z6ehGkBFwjybzWkR8
console.log(track.artists[0].name); // Rick Astley
});
const spotifySearch = require("spotify-search");
spotifySearch.getPlaylist("37i9dQZEVXbMDoHDwVN2tF").then(playlist => {
console.log(playlist.id); // 37i9dQZEVXbMDoHDwVN2tF
console.log(playlist.name); // Top 50 - Global
console.log(playlist.href); // https://api.spotify.com/v1/playlists/37i9dQZEVXbMDoHDwVN2tF
console.log(playlist.owner.id); // spotify
});
const spotifySearch = require("spotify-search");
console.log(spotifySearch.validateTrackID("4PTG3Z6eh")); // Output: true
console.log(spotifySearch.validateTrackID("")); // Output: false
console.log(spotifySearch.validateTrackID("hello")); // Output: false
FAQs
Spotify Search is a package to search for Spotify tracks and playlists without the need for a token, totally transparent to the user and that uses the official Spotify Web API.
The npm package spotify-search-wrapper receives a total of 4 weekly downloads. As such, spotify-search-wrapper popularity was classified as not popular.
We found that spotify-search-wrapper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.