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

spotify-to-ytmusic

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotify-to-ytmusic

Convert songs from Spotify to YouTube Music!

  • 1.2.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by120%
Maintainers
0
Weekly downloads
 
Created
Source

Spotify to YouTube Music

Convert songs from Spotify to YouTube Music!

Features

  • Super easy-to-use
  • Audio only results (no music videos)
  • Convert multiple songs
  • 99% accuracy
  • Perfect for Discord Bots
  • Access/refresh token not required

Installation

npm install spotify-to-ytmusic

Usage

  • To use spotify-to-ytmusic, first you need to provide your Spotify Credentials, in order to have access to the Spotify API.
  • You can only provide Tracks (Playlists, Albums and Podcasts are NOT supported!)

Example

const SpotifyToYoutubeMusic = require('spotify-to-ytmusic')

async function example() {

    // Set Spotify Credentials

    const spotifyToYoutubeMusic = await SpotifyToYoutubeMusic({
        clientID: "CLIENT_ID",
        clientSecret: "CLIENT_SECRET",
        accessToken: "ACCESS_TOKEN", // Optional
        ytMusicUrl: true // Optional
    })

    // Convert a Spotify Track

    let song = await spotifyToYoutubeMusic('4cOdK2wGLETKBW3PvgPWqT')
    console.log(song) // https://music.youtube.com/watch?v=lYBUbBu4W08
}

example()

Other ways to provide a Spotify Track

await spotifyToYoutubeMusic('https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT')
await spotifyToYoutubeMusic('spotify:track:4cOdK2wGLETKBW3PvgPWqT')
await spotifyToYoutubeMusic('https://api.spotify.com/v1/tracks/4cOdK2wGLETKBW3PvgPWqT')
await spotifyToYoutubeMusic('4cOdK2wGLETKBW3PvgPWqT')
await spotifyToYoutubeMusic(['4cOdK2wGLETKBW3PvgPWqT','06JvOZ39sK8D8SqiqfaxDU'])

Keywords

FAQs

Package last updated on 10 Oct 2024

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