SHAWZIFY

Getting music in: YouTube and Spotify

What each service actually permits, what SHAWZIFY does with that, and why the two are used together rather than either alone.

Spotify: exact identity, no audio

Spotify's Web API is excellent at saying what a track is and refuses to give you the track. Both halves matter.

What was removed, and when

On 27 November 2024 Spotify restricted a group of endpoints for any application registered after that date (announcement):

Endpoint Status for new apps
GET /audio-features Unavailable
GET /audio-analysis Unavailable
GET /recommendations Unavailable
GET /artists/{id}/related-artists Unavailable
GET /browse/featured-playlists Unavailable
30-second preview_url Restricted
Algorithmic / editorial playlists Unavailable

Apps that already had extended access keep it; everything registered since gets 403. There is no official replacement.

audio-features is the one that would have been tempting — it returned tempo, key, mode, time signature, energy and valence. It is worth being clear that losing it costs SHAWZIFY almost nothing: the product measures all of that from the audio itself, because it has to transcribe the notes anyway. A tempo number from an API is no use without the notes it belongs to.

What still works, and what SHAWZIFY uses

With client-credentials auth (the user's own app, created at developer.spotify.com/dashboard):

SHAWZIFY uses exactly this and nothing else. The duration in particular is load-bearing: it is how a resolved recording is checked against the track that was asked for.

Credentials live in %LOCALAPPDATA%\Shawzify\spotify.json or in SPOTIFY_CLIENT_ID / SPOTIFY_CLIENT_SECRET. Without them the provider reports itself unavailable and says how to enable it; nothing else breaks.

SpotifyProvider.fetch() never pretends. It raises an error that says Spotify does not allow applications to download audio, and points at the alternative.

YouTube: audio, and a lot of near-misses

yt-dlp is an optional dependency, deliberately not bundled: it is a fast-moving tool that breaks and gets fixed on a weekly cadence, and users are better off running pip install -U yt-dlp themselves than waiting for a SHAWZIFY release. When it is absent the route is disabled with that instruction.

What SHAWZIFY does:

Putting them together

A Spotify link goes: metadata from Spotify → search YouTube → verify → download.

The verification step is the interesting part, because a search for "Artist - Title" returns the studio version alongside live versions, covers, karaoke tracks, sped-up edits, "8D audio", and one-hour loops. Each candidate is scored on:

Signal Weight Why
Duration agreement 0.50 The strongest evidence two recordings are the same one
Title similarity 0.30
Artist agreement 0.20
"official audio", a - Topic channel up to +0.20 Marks the studio upload
"live", "cover", "remix", "1 hour", … up to −0.90 Marks a different recording

Two details make it work in practice:

The chosen match and its confidence are always reported. Below 60% the UI says the match is uncertain, and --candidate N (CLI) picks a different result.

Legality and scope

Usage

# Straight to a song code
shawzify convert "https://www.youtube.com/watch?v=..." --focus hook

# Spotify: identified by Spotify, heard via YouTube
shawzify convert "https://open.spotify.com/track/..."

# Just the audio
shawzify fetch "https://youtu.be/..." -o song.m4a
shawzify fetch "https://youtu.be/..." --candidate 2   # a different search result

In the app, paste a link on the home screen. It identifies the track as you pause typing, then Convert fetches and arranges it.