{"id":14979747,"url":"https://github.com/nkhilgaba/youtubetospotify","last_synced_at":"2025-10-28T19:31:58.140Z","repository":{"id":110364187,"uuid":"182293202","full_name":"nkhilgaba/YoutubeToSpotify","owner":"nkhilgaba","description":"A Python script to fetch tracks of music channels on Youtube, find them on Spotify and add them to a playlist","archived":false,"fork":false,"pushed_at":"2019-04-20T06:48:08.000Z","size":886,"stargazers_count":45,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-29T03:22:17.688Z","etag":null,"topics":["csv","google-api-python-client","googleapi","music","python","python-script","spotify","spotify-api","spotify-library","spotify-playlist","spotify-sdk","spotify-web-api","spotipy","youtube","youtube-api","youtube-api-v3","youtube-channel","youtube-search"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nkhilgaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-19T16:21:33.000Z","updated_at":"2024-08-12T19:48:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"59776198-79d2-4ad5-bc35-e802cc23e08f","html_url":"https://github.com/nkhilgaba/YoutubeToSpotify","commit_stats":null,"previous_names":["nkhilgaba/youtubetospotify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkhilgaba%2FYoutubeToSpotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkhilgaba%2FYoutubeToSpotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkhilgaba%2FYoutubeToSpotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkhilgaba%2FYoutubeToSpotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkhilgaba","download_url":"https://codeload.github.com/nkhilgaba/YoutubeToSpotify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219858899,"owners_count":16556039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","google-api-python-client","googleapi","music","python","python-script","spotify","spotify-api","spotify-library","spotify-playlist","spotify-sdk","spotify-web-api","spotipy","youtube","youtube-api","youtube-api-v3","youtube-channel","youtube-search"],"created_at":"2024-09-24T14:00:35.122Z","updated_at":"2025-10-28T19:31:57.479Z","avatar_url":"https://github.com/nkhilgaba.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YoutubeToSpotify\n\nA Python script to fetch tracks of music channels on Youtube, find them on Spotify and add them to a playlist.\nThe video titles from Youtube are filtered and then searched on Spotify for near perfect results. A CSV file keeps track of the tracks that are added to the Spotify playlist so the script can be executed when required.\n\n![picture](Screenshots/1.png)\n![picture](Screenshots/2.png)\n![picture](Screenshots/3.png)\n### Getting Started\n\nYou need these before running the script:\n* Login to [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/) and create a new app to obtain the Client ID and Client Secret. \nAdd these to **CLIENT_ID** and **CLIENT_SECRET** in the code.\nAfter this, click edit settings of the newly created app and add http://localhost/ to Redirect URIs and save. \n\n* Get the Youtube API key [here](https://developers.google.com/youtube/v3/getting-started) and add it to **API_KEY** in the code.\n\n* [Spotipy](https://spotipy.readthedocs.io/en/latest/) : Spotipy is a lightweight Python library for the Spotify Web API. \nWith Spotipy you get full access to all of the music data provided by the Spotify platform.\n\n* The [Google APIs Client Library](https://developers.google.com/youtube/v3/getting-started) for Python for making requests to Youtube\n\n* Create a new Spotify Playlist and name it anything you want. \nGet your spotify username and the playlist id. \nCopy the username and playlist ID and add them to **SPOTIFY_USERNAME** and **YOUTUBE_PLAYLIST_ID** in the code respectively.\n```\nRight click on the playlist in Spotify and go to Share \u003e Copy Spotify URI. \n```\nYou will receive a URI like this:\n```\nspotify:user:john:playlist:70WcLyhxyzRuSGf678MyPd\n```\n\n### Installing\n\nTo install Spotipy\n```\npip install spotipy\n```\n\nTo install Google API\n\n```\npip install google-api-python-client\n```\n\n## Adding channels \n\nTo add channels from Youtube, simply access a channel page and examine the URL. If it is like:\n```\nhttps://www.youtube.com/user/ChillStepNation\n```\nJust add the part after https://www.youtube.com/user/ to **CHANNEL_USERNAMES** list in the code. In this case, ChillStepNation.\n\nIf the URL is like:\n```\nhttps://www.youtube.com/channel/UCkjnVMHy \n```\nAdd the part after https://www.youtube.com/channel/ (Here, UCkjnVMHy) to **CHANNEL_IDS** dictonary in the code in the format:\n```\n{'channelName' : 'channelID'}\n```\nTo change the number of search results for each channel change **MAX_RESULT** in the code. Default is 20.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkhilgaba%2Fyoutubetospotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkhilgaba%2Fyoutubetospotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkhilgaba%2Fyoutubetospotify/lists"}