Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spotify-metadata-search

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotify-metadata-search

A Node.js module for using the Spotify Metadata Search API

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by37.5%
Maintainers
1
Weekly downloads
 
Created
Source

A Node.js module for using the Spotify Metadata Search API. Detailed information about the responses and their structure can be found in the Spotify documentation.

Install it

npm install spotify-metadata-search

Require it

var SpotifySearch = require( 'spotify-metadata-search' );

Search Tracks

var search = SpotifySearch();

// This is the string you want to search for
var searchText = "whatever";

// Use this to page through the Spotify response
var optionPageNumber = 2;

search.track( searchText, optionPageNumber, function ( err, data ) {
    if ( err ) {
        // handle error
    }
    // 'data' contains a complete Spotify Track search JSON response
} );

Search Albums

var search = SpotifySearch();

// This is the string you want to search for
var searchText = "whatever";

// Use this to page through the Spotify response
var optionPageNumber = 2;

search.album( searchText, optionPageNumber, function ( err, data ) {
    if ( err ) {
        // handle error
    }
    // 'data' contains a complete Spotify Track search JSON response
} );

Search Artists

var search = SpotifySearch();

// This is the string you want to search for
var searchText = "whatever";

// Use this to page through the Spotify response
var optionPageNumber = 2;

search.artist( searchText, optionPageNumber, function ( err, data ) {
    if ( err ) {
        // handle error
    }
    // 'data' contains a complete Spotify Track search JSON response
} );

Lookup By URI

var search = SpotifySearch();

var spotifyURI = "spotify:track:1hP6wr5qYhXy5Am2tvndrZ";

search.lookup( spotifyURI, null, function ( err, data ) {
    if ( err ) {
        // handle error
    }
    // 'data' contains a complete Spotify lookup JSON response
} );

The second parameter for lookup can be an array of words that are passed as extras to Spotify. These only apply if you pass in an artist or and album URI. For more information about extras check out the Spotify Metadata API documentation.

Keywords

FAQs

Package last updated on 27 Apr 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc