Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itsgox/spotify-to-ytmusic
Convert songs from Spotify to YouTube Music!
https://github.com/itsgox/spotify-to-ytmusic
spotify spotify-to-youtube spotify-to-yt spotoyt sty youtube youtube-music youtube-music-api
Last synced: 2 months ago
JSON representation
Convert songs from Spotify to YouTube Music!
- Host: GitHub
- URL: https://github.com/itsgox/spotify-to-ytmusic
- Owner: itsgox
- Created: 2022-05-31T21:27:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-10T22:26:27.000Z (2 months ago)
- Last Synced: 2024-10-10T22:51:26.018Z (2 months ago)
- Topics: spotify, spotify-to-youtube, spotify-to-yt, spotoyt, sty, youtube, youtube-music, youtube-music-api
- Language: JavaScript
- Homepage: https://npmjs.com/spotify-to-ytmusic
- Size: 13.7 KB
- Stars: 17
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
npm install spotify-to-ytmusic
```## Usage
- To use **spotify-to-ytmusic**, first you need to provide your **[Spotify Credentials](https://www.avermedia.com/us/creator_central_spotify)**, in order to have access to the **Spotify API**.
- You can only provide **Tracks** *(Playlists, Albums and Podcasts are **NOT** supported!)*## Example
```javascript
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
```javascript
await spotifyToYoutubeMusic('https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT')
```
```javascript
await spotifyToYoutubeMusic('spotify:track:4cOdK2wGLETKBW3PvgPWqT')
```
```javascript
await spotifyToYoutubeMusic('https://api.spotify.com/v1/tracks/4cOdK2wGLETKBW3PvgPWqT')
```
```javascript
await spotifyToYoutubeMusic('4cOdK2wGLETKBW3PvgPWqT')
```
```javascript
await spotifyToYoutubeMusic(['4cOdK2wGLETKBW3PvgPWqT','06JvOZ39sK8D8SqiqfaxDU'])
```